From 41659d2dd35bd9ad39366899ee9581643e38d0d8 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sat, 18 Apr 2020 23:14:43 -0700 Subject: Allow override of SDL2 include path for "portable" builds --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5a26137..36a93c5 100644 --- a/Makefile +++ b/Makefile @@ -96,16 +96,17 @@ LDFLAGS:=-lm glew/lib/libGLEW.a endif ifeq ($(OS),Darwin) -CFLAGS+= -IFrameworks/SDL2.framework/Headers +SDL_INCLUDE_PATH:=Frameworks/SDL2.framework/Headers LDFLAGS+= -FFrameworks -framework SDL2 -framework OpenGL -framework AppKit FIXUP:=install_name_tool -change @rpath/SDL2.framework/Versions/A/SDL2 @executable_path/Frameworks/SDL2.framework/Versions/A/SDL2 else -CFLAGS+= -Isdl/include +SDL_INCLUDE_PATH:=sdl/include LDFLAGS+= -Wl,-rpath='$$ORIGIN/lib' -Llib -lSDL2 ifndef USE_GLES LDFLAGS+= $(shell pkg-config --libs gl) endif endif #Darwin +CFLAGS+= -I$(SDL_INCLUDE_PATH) else ifeq ($(MAKECMDGOALS),libblastem.$(SO)) -- cgit v1.2.3