Makefile: improve setting of TTFLIBS TTFLOPT etc.
This commit is contained in:
parent
b93e541018
commit
f0b38bd563
35
src/Makefile
35
src/Makefile
@ -200,8 +200,9 @@ ifneq ($(SDLCONFIG), )
|
|||||||
#SDLLOPT += $(SDLLIBDIR)/libSDL.a
|
#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 += $(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
|
SDLLOPT += $(SDLLIBDIR)/libSDL_image.a
|
||||||
TTFLOPT =
|
TTFLOPT = $(shell if [ -f ../3rdparty/usr/lib/libfreetype.dylib ] && \
|
||||||
SDLLOPT += $(shell $(PKG_CONFIG) --variable=libdir SDL_ttf)/libSDL_ttf.a
|
otool -L ../3rdparty/usr/lib/libfreetype.dylib | cut -f 2 | grep -q ^/usr/lib/libbz2 ; then echo "-lbz2" ; fi )
|
||||||
|
TTFLOPT += $(shell $(PKG_CONFIG) --variable=libdir SDL_ttf)/libSDL_ttf.a
|
||||||
else
|
else
|
||||||
SDLLOPT = $(shell $(SDLCONFIG) --libs) $(shell $(PKG_CONFIG) --libs SDL_image)
|
SDLLOPT = $(shell $(SDLCONFIG) --libs) $(shell $(PKG_CONFIG) --libs SDL_image)
|
||||||
endif
|
endif
|
||||||
@ -223,8 +224,9 @@ ifeq ($(API),sdl2)
|
|||||||
# trick to get all dependencies
|
# trick to get all dependencies
|
||||||
SDLLOPT += $(addsuffix .a, $(shell ../tools/osx_find_dependencies.sh $(SDLLIBDIR)/libSDL2_image.dylib $(SDLLIBDIR)/libSDL2_ttf.dylib | grep -v SDL2 | cut -d'.' -f 1))
|
SDLLOPT += $(addsuffix .a, $(shell ../tools/osx_find_dependencies.sh $(SDLLIBDIR)/libSDL2_image.dylib $(SDLLIBDIR)/libSDL2_ttf.dylib | grep -v SDL2 | cut -d'.' -f 1))
|
||||||
SDLLOPT += $(SDLLIBDIR)/libSDL2_image.a
|
SDLLOPT += $(SDLLIBDIR)/libSDL2_image.a
|
||||||
TTFLOPT =
|
TTFLOPT = $(shell if [ -f ../3rdparty/usr/lib/libfreetype.dylib ] && \
|
||||||
SDLLOPT += $(shell $(PKG_CONFIG) --variable=libdir SDL2_ttf)/libSDL2_ttf.a
|
otool -L ../3rdparty/usr/lib/libfreetype.dylib | cut -f 2 | grep -q ^/usr/lib/libbz2 ; then echo "-lbz2" ; fi )
|
||||||
|
TTFLOPT += $(shell $(PKG_CONFIG) --variable=libdir SDL2_ttf)/libSDL2_ttf.a
|
||||||
else
|
else
|
||||||
SDLLOPT = $(shell $(SDL2CONFIG) --libs) $(shell $(PKG_CONFIG) --libs SDL2_image)
|
SDLLOPT = $(shell $(SDL2CONFIG) --libs) $(shell $(PKG_CONFIG) --libs SDL2_image)
|
||||||
SDLLOPT += -Wl,-framework,Cocoa
|
SDLLOPT += -Wl,-framework,Cocoa
|
||||||
@ -265,10 +267,7 @@ endif
|
|||||||
ifdef MACOSX_LION
|
ifdef MACOSX_LION
|
||||||
LOPT = $(SDLLOPT) $(LUALOPT) -framework libpng14 -lz
|
LOPT = $(SDLLOPT) $(LUALOPT) -framework libpng14 -lz
|
||||||
else
|
else
|
||||||
LOPT = $(SDLLOPT) $(LUALOPT)
|
LOPT = $(SDLLOPT) $(LUALOPT) $(TTFLOPT)
|
||||||
ifneq ($(OSX_STATIC), 1)
|
|
||||||
LOPT += $(TTFLOPT)
|
|
||||||
endif
|
|
||||||
LIBPNGCONFIG := $(shell which ../3rdparty/usr/bin/libpng-config || which libpng-config)
|
LIBPNGCONFIG := $(shell which ../3rdparty/usr/bin/libpng-config || which libpng-config)
|
||||||
ifneq ($(LIBPNGCONFIG), )
|
ifneq ($(LIBPNGCONFIG), )
|
||||||
COPT += $(shell $(LIBPNGCONFIG) --cflags)
|
COPT += $(shell $(LIBPNGCONFIG) --cflags)
|
||||||
@ -642,27 +641,21 @@ ifeq ($(NOTTF),1)
|
|||||||
TTFLABEL = -nottf
|
TTFLABEL = -nottf
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
ifneq ($(ATARICROSS),1)
|
ifneq ($(PLATFORM),Darwin)
|
||||||
TTFCOPT =
|
TTFCOPT =
|
||||||
TTFLOPT =
|
TTFLOPT =
|
||||||
ifneq ($(WIN32CROSS),1)
|
ifneq ($(WIN32CROSS),1)
|
||||||
TTFLOPT += -L$(PREFIX)/lib
|
TTFLOPT += -L$(PREFIX)/lib
|
||||||
endif
|
endif
|
||||||
ifeq ($(API),sdl)
|
ifeq ($(API),sdl)
|
||||||
TTFLOPT += -lSDL_ttf $(FCLOPT)
|
TTFLOPT += -lSDL_ttf
|
||||||
|
TTFLIBS = bin/SDL_ttf.dll
|
||||||
else
|
else
|
||||||
TTFLOPT += -lSDL2_ttf $(FCLOPT)
|
TTFLOPT += -lSDL2_ttf
|
||||||
|
TTFLIBS = bin/SDL2_ttf.dll
|
||||||
endif
|
endif
|
||||||
TTFLIBS = bin/libfreetype-6.dll bin/SDL_ttf.dll
|
TTFLOPT += $(FCLOPT)
|
||||||
TTFLABEL =
|
TTFLIBS += bin/libfreetype-6.dll
|
||||||
else
|
|
||||||
TTFCOPT =
|
|
||||||
ifeq ($(API),sdl)
|
|
||||||
TTFLOPT = -L$(PREFIX)/lib -lSDL_ttf $(FCLOPT)
|
|
||||||
else
|
|
||||||
TTFLOPT = -L$(PREFIX)/lib -lSDL2_ttf $(FCLOPT)
|
|
||||||
endif
|
|
||||||
TTFLIBS =
|
|
||||||
TTFLABEL =
|
TTFLABEL =
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user