From a03e9da0af4f186809c76212fd49cc1b4e86f07e Mon Sep 17 00:00:00 2001 From: Thomas BERNARD Date: Thu, 29 Nov 2018 13:06:34 +0100 Subject: [PATCH] OSX: statically build with SDL 1.2.x too --- src/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Makefile b/src/Makefile index 41a56872..d5f61c52 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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