Fix broken SDL builds on macOS and Windows
This commit is contained in:
parent
7c9508ae96
commit
8a99d41c31
6
Makefile
6
Makefile
@ -103,7 +103,8 @@ endif
|
|||||||
ifeq ($(PLATFORM),windows32)
|
ifeq ($(PLATFORM),windows32)
|
||||||
CFLAGS += -IWindows -Drandom=rand
|
CFLAGS += -IWindows -Drandom=rand
|
||||||
LDFLAGS += -lmsvcrt -lcomdlg32 -lSDL2main -Wl,/MANIFESTFILE:NUL
|
LDFLAGS += -lmsvcrt -lcomdlg32 -lSDL2main -Wl,/MANIFESTFILE:NUL
|
||||||
SDL_LDFLAGS := -lSDL2 -lopengl32
|
SDL_LDFLAGS := -lSDL2
|
||||||
|
GL_LDFLAGS := -lopengl32
|
||||||
else
|
else
|
||||||
LDFLAGS += -lc -lm -ldl
|
LDFLAGS += -lc -lm -ldl
|
||||||
endif
|
endif
|
||||||
@ -113,7 +114,8 @@ SYSROOT := $(shell xcodebuild -sdk macosx -version Path 2> /dev/null)
|
|||||||
CFLAGS += -F/Library/Frameworks
|
CFLAGS += -F/Library/Frameworks
|
||||||
OCFLAGS += -x objective-c -fobjc-arc -Wno-deprecated-declarations -isysroot $(SYSROOT) -mmacosx-version-min=10.9
|
OCFLAGS += -x objective-c -fobjc-arc -Wno-deprecated-declarations -isysroot $(SYSROOT) -mmacosx-version-min=10.9
|
||||||
LDFLAGS += -framework AppKit -framework PreferencePanes -framework Carbon -framework QuartzCore -weak_framework Metal -weak_framework MetalKit -mmacosx-version-min=10.9
|
LDFLAGS += -framework AppKit -framework PreferencePanes -framework Carbon -framework QuartzCore -weak_framework Metal -weak_framework MetalKit -mmacosx-version-min=10.9
|
||||||
SDL_LDFLAGS := -F/Library/Frameworks -framework SDL2 -framework OpenGL
|
SDL_LDFLAGS := -F/Library/Frameworks -framework SDL2
|
||||||
|
GL_LDFLAGS := -framework OpenGL
|
||||||
endif
|
endif
|
||||||
CFLAGS += -Wno-deprecated-declarations
|
CFLAGS += -Wno-deprecated-declarations
|
||||||
ifeq ($(PLATFORM),windows32)
|
ifeq ($(PLATFORM),windows32)
|
||||||
|
Loading…
Reference in New Issue
Block a user