From 2eec1f805b72055c3ffe59f0bc15ae26486fb8a5 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sat, 7 Jul 2018 13:51:49 +0200 Subject: [PATCH] build Mac OS X binary with SDL2 --- src/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Makefile b/src/Makefile index 42a55181..4a360dc7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -190,6 +190,11 @@ else SDLLOPT = -isysroot $(MACOSX_SYSROOT) $(MACOSX_ARCH) -L/usr/lib -framework SDL -framework SDL_image -framework Cocoa -framework Carbon -framework OpenGL SDLCOPT = $(MACOSX_ARCH) -I$(FWDIR)/SDL.framework/Headers -I$(FWDIR)/SDL_image.framework/Headers -I$(FWDIR)/SDL_ttf.framework/Headers -D_THREAD_SAFE endif +endif +ifeq ($(API),sdl2) + SDLCOPT = $(shell sdl2-config --cflags) + SDLLOPT = $(shell sdl2-config --libs) $(shell pkg-config --libs SDL2_image) + SDLLOPT += -Wl,-framework,Cocoa endif # these are for use with macports