summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2020-04-18 23:14:43 -0700
committerMichael Pavone <pavone@retrodev.com>2020-04-18 23:14:43 -0700
commit41659d2dd35bd9ad39366899ee9581643e38d0d8 (patch)
tree4cf9f3e0b0db4f1d5a08c1b4181ed0a5c40ad3c3 /Makefile
parent6f24fe6971e31837abecb3367967ddc8d8c103dd (diff)
Allow override of SDL2 include path for "portable" builds
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
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))