From 8a99d41c3199f5e1dcb2f53e51ec424aece5716e Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Thu, 26 Dec 2019 02:00:58 +0200 Subject: [PATCH] Fix broken SDL builds on macOS and Windows --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index bc2b371..1c23610 100644 --- a/Makefile +++ b/Makefile @@ -103,7 +103,8 @@ endif ifeq ($(PLATFORM),windows32) CFLAGS += -IWindows -Drandom=rand LDFLAGS += -lmsvcrt -lcomdlg32 -lSDL2main -Wl,/MANIFESTFILE:NUL -SDL_LDFLAGS := -lSDL2 -lopengl32 +SDL_LDFLAGS := -lSDL2 +GL_LDFLAGS := -lopengl32 else LDFLAGS += -lc -lm -ldl endif @@ -113,7 +114,8 @@ SYSROOT := $(shell xcodebuild -sdk macosx -version Path 2> /dev/null) CFLAGS += -F/Library/Frameworks 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 -SDL_LDFLAGS := -F/Library/Frameworks -framework SDL2 -framework OpenGL +SDL_LDFLAGS := -F/Library/Frameworks -framework SDL2 +GL_LDFLAGS := -framework OpenGL endif CFLAGS += -Wno-deprecated-declarations ifeq ($(PLATFORM),windows32)