OSX: statically build with SDL 1.2.x too

This commit is contained in:
Thomas BERNARD 2018-11-29 13:06:34 +01:00
parent 227cf3b466
commit a03e9da0af

View File

@ -188,7 +188,17 @@ ifeq ($(API),sdl)
ifneq ($(SDLCONFIG), )
# these are for use with macports
SDLCOPT = $(shell sdl-config --cflags)
ifeq ($(OSX_STATIC), 1)
SDLLOPT = $(shell sdl-config --static-libs | sed 's/-lSDL //' | sed 's/-lX[^ ]*//g' | sed 's/-L[^ ]*//g')
SDLLIBDIR = $(shell pkg-config --variable=libdir SDL_image)
#SDLLOPT += $(SDLLIBDIR)/libSDL.a
SDLLOPT += $(addsuffix .a, $(shell ../tools/osx_find_dependencies.sh $(SDLLIBDIR)/libSDL_image.dylib $(SDLLIBDIR)/libSDL_ttf.dylib | grep -v SDL | cut -d'.' -f 1))
SDLLOPT += $(SDLLIBDIR)/libSDL_image.a
TTFLOPT =
SDLLOPT += $(shell pkg-config --variable=libdir SDL_ttf)/libSDL_ttf.a
else
SDLLOPT = $(shell sdl-config --libs) $(shell pkg-config --libs SDL_image)
endif
else
# these are for use with Mac OS X native frameworks
#-framework SDL_ttf