Mercurial > repos > blastem
comparison Makefile @ 1935:f23e70fb6607
Allow override of SDL2 include path for "portable" builds
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 18 Apr 2020 23:14:43 -0700 |
parents | 253c62b7144e |
children | 2c1c88cd1a3f 794a5c9a2c73 |
comparison
equal
deleted
inserted
replaced
1934:253c62b7144e | 1935:f23e70fb6607 |
---|---|
94 CFLAGS+= -DGLEW_STATIC -Iglew/include | 94 CFLAGS+= -DGLEW_STATIC -Iglew/include |
95 LDFLAGS:=-lm glew/lib/libGLEW.a | 95 LDFLAGS:=-lm glew/lib/libGLEW.a |
96 endif | 96 endif |
97 | 97 |
98 ifeq ($(OS),Darwin) | 98 ifeq ($(OS),Darwin) |
99 CFLAGS+= -IFrameworks/SDL2.framework/Headers | 99 SDL_INCLUDE_PATH:=Frameworks/SDL2.framework/Headers |
100 LDFLAGS+= -FFrameworks -framework SDL2 -framework OpenGL -framework AppKit | 100 LDFLAGS+= -FFrameworks -framework SDL2 -framework OpenGL -framework AppKit |
101 FIXUP:=install_name_tool -change @rpath/SDL2.framework/Versions/A/SDL2 @executable_path/Frameworks/SDL2.framework/Versions/A/SDL2 | 101 FIXUP:=install_name_tool -change @rpath/SDL2.framework/Versions/A/SDL2 @executable_path/Frameworks/SDL2.framework/Versions/A/SDL2 |
102 else | 102 else |
103 CFLAGS+= -Isdl/include | 103 SDL_INCLUDE_PATH:=sdl/include |
104 LDFLAGS+= -Wl,-rpath='$$ORIGIN/lib' -Llib -lSDL2 | 104 LDFLAGS+= -Wl,-rpath='$$ORIGIN/lib' -Llib -lSDL2 |
105 ifndef USE_GLES | 105 ifndef USE_GLES |
106 LDFLAGS+= $(shell pkg-config --libs gl) | 106 LDFLAGS+= $(shell pkg-config --libs gl) |
107 endif | 107 endif |
108 endif #Darwin | 108 endif #Darwin |
109 CFLAGS+= -I$(SDL_INCLUDE_PATH) | |
109 | 110 |
110 else | 111 else |
111 ifeq ($(MAKECMDGOALS),libblastem.$(SO)) | 112 ifeq ($(MAKECMDGOALS),libblastem.$(SO)) |
112 LDFLAGS:=-lm | 113 LDFLAGS:=-lm |
113 else | 114 else |