try to statically link sdl+vorbisfile+etc+png+jpeg for mac, in case I pester tuna in the future.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4741 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
bb62a39278
commit
c6b8617d87
1 changed files with 17 additions and 9 deletions
|
@ -37,7 +37,8 @@ WHOAMI:=$(shell whoami)
|
|||
RELEASE_DIR=$(BASE_DIR)/release
|
||||
DEBUG_DIR=$(BASE_DIR)/debug
|
||||
PROFILE_DIR=$(BASE_DIR)/profile
|
||||
ifneq ($(shell uname -o 2>&1 | grep Cygwin),)
|
||||
COMPILE_SYS:=$(shell uname -o 2>&1)
|
||||
ifeq ($(COMPILE_SYS),Cygwin)
|
||||
OUT_DIR?=.
|
||||
NATIVE_OUT_DIR:=$(shell cygpath -m $(OUT_DIR))
|
||||
NATIVE_BASE_DIR:=$(shell cygpath -m $(BASE_DIR))
|
||||
|
@ -329,6 +330,13 @@ ifeq (win,$(findstring cyg,$(FTE_TARGET))$(findstring win,$(FTE_TARGET)))
|
|||
OGGVORBISLDFLAGS=$(MINGW_LIBS_DIR)/libvorbisfile.a $(MINGW_LIBS_DIR)/libvorbis.a $(MINGW_LIBS_DIR)/libogg.a
|
||||
endif
|
||||
|
||||
#try to statically link
|
||||
ifeq ($(COMPILE_SYS),Darwin)
|
||||
ifneq (,$(findstring SDL,$(FTE_TARGET)))
|
||||
IMAGELDFLAGS = $(shell pkg-config libpng --variable=libdir)/libpng.a $(shell pkg-config libjpeg --variable=libdir)/libjpeg.a
|
||||
OGGVORBISLDFLAGS = $(shell pkg-config vorbisfile --variable=libdir)/libvorbisfile.a $(shell pkg-config vorbis --variable=libdir)/libvorbis.a $(shell pkg-config ogg --variable=libdir)/libogg.a
|
||||
endif
|
||||
endif
|
||||
IMAGELDFLAGS ?= -lpng -ljpeg
|
||||
OGGVORBISLDFLAGS ?= -lvorbisfile -lvorbis -logg
|
||||
VISIBILITY_FLAGS?=
|
||||
|
@ -675,9 +683,9 @@ GLCL_EXE_NAME=../fteqwcl_gl$(FTE_FULLTARGET)
|
|||
|
||||
#SDLCONFIG:=libs/sdl2_mingw/$(CC_MACHINE)/bin/sdl2-config --prefix=libs/sdl2_mingw/$(CC_MACHINE)
|
||||
ifdef windir
|
||||
GL_LDFLAGS=$(GLLDFLAGS) -lmingw32 -lws2_32 `$(SDLCONFIG) --libs`
|
||||
GL_LDFLAGS=$(GLLDFLAGS) -lmingw32 -lws2_32 `$(SDLCONFIG) --static-libs`
|
||||
else
|
||||
GL_LDFLAGS=$(GLLDFLAGS) $(IMAGELDFLAGS) $(OGGVORBISLDFLAGS) `$(SDLCONFIG) --libs`
|
||||
GL_LDFLAGS=$(GLLDFLAGS) $(IMAGELDFLAGS) $(OGGVORBISLDFLAGS) `$(SDLCONFIG) --static-libs`
|
||||
endif
|
||||
GL_CFLAGS=-DFTE_SDL $(GLCFLAGS) `$(SDLCONFIG) --cflags`
|
||||
GLB_DIR=gl_$(FTE_FULLTARGET)
|
||||
|
@ -698,10 +706,10 @@ M_CFLAGS=$(GLCFLAGS) `$(SDLCONFIG) --cflags`
|
|||
M_LDFLAGS=$(GLLDFLAGS) $(IMAGELDFLAGS) $(OGGVORBISLDFLAGS)
|
||||
|
||||
ifdef windir
|
||||
M_LDFLAGS=$(MLDFLAGS) -lmingw32 -lws2_32 `$(SDLCONFIG) --libs`
|
||||
M_LDFLAGS=$(MLDFLAGS) -lmingw32 -lws2_32 `$(SDLCONFIG) --static-libs`
|
||||
else
|
||||
#pthread is needed because of SDL.
|
||||
M_LDFLAGS=$(MLDFLAGS) `$(SDLCONFIG) --libs` $(IMAGELDFLAGS) $(OGGVORBISLDFLAGS)
|
||||
M_LDFLAGS=$(MLDFLAGS) `$(SDLCONFIG) --static-libs` $(IMAGELDFLAGS) $(OGGVORBISLDFLAGS)
|
||||
endif
|
||||
|
||||
ifeq (,$(findstring NO_ZLIB,$(CFLAGS)))
|
||||
|
@ -798,9 +806,9 @@ ifeq (win_SDL,$(findstring win,$(FTE_TARGET))$(findstring _SDL,$(FTE_TARGET)))
|
|||
GL_EXE_NAME=../fteqw_sdl_gl$(BITS)$(EXEPOSTFIX)
|
||||
GLCL_EXE_NAME=../fteqwcl_sdl$(BITS)$(EXEPOSTFIX)
|
||||
ifdef windir
|
||||
GL_LDFLAGS=$(GLLDFLAGS) -lmingw32 -lws2_32 `$(SDLCONFIG) --libs`
|
||||
GL_LDFLAGS=$(GLLDFLAGS) -lmingw32 -lws2_32 `$(SDLCONFIG) --static-libs`
|
||||
else
|
||||
GL_LDFLAGS=$(IMAGELDFLAGS) $(OGGVORBISLDFLAGS) -lws2_32 -lmingw32 $(SDL_LDFLAGS) -mwindows -ldxguid -lwinmm -lole32 $(GLLDFLAGS) `$(SDLCONFIG) --libs`
|
||||
GL_LDFLAGS=$(IMAGELDFLAGS) $(OGGVORBISLDFLAGS) -lws2_32 -lmingw32 $(SDL_LDFLAGS) -mwindows -ldxguid -lwinmm -lole32 $(GLLDFLAGS) `$(SDLCONFIG) --static-libs`
|
||||
endif
|
||||
|
||||
GL_CFLAGS=-DFTE_SDL -I$(MINGW_LIBS_DIR)/ -I$(MINGW_LIBS_DIR) -I$(LIBS_DIR) $(GLCFLAGS) -DLIBVORBISFILE_STATIC $(DX7SDK) $(SPEEXCFLAGS)
|
||||
|
@ -814,7 +822,7 @@ ifeq (win_SDL,$(findstring win,$(FTE_TARGET))$(findstring _SDL,$(FTE_TARGET)))
|
|||
SV_OBJS=$(COMMON_OBJS) $(SERVER_OBJS) $(PROGS_OBJS) $(WINDOWSSERVERONLY_OBJS) $(BOTLIB_OBJS) $(LTO_END) resources.o $(LTO_START)
|
||||
SV_EXE_NAME=../fteqw_sdl_sv$(BITS)$(EXEPOSTFIX)
|
||||
SV_CFLAGS=$(SERVER_ONLY_CFLAGS) -DFTE_SDL
|
||||
SV_LDFLAGS=$(MINGW_LIBS_DIR)/libz.a -lm -lmingw32 -lws2_32 -lwinmm `$(SDLCONFIG) --libs`
|
||||
SV_LDFLAGS=$(MINGW_LIBS_DIR)/libz.a -lm -lmingw32 -lws2_32 -lwinmm `$(SDLCONFIG) --static-libs`
|
||||
|
||||
MINGL_DIR=mingl_sdlwin$(BITS)
|
||||
MINGL_EXE_NAME=../fteqw_sdl_mingl$(BITS)$(EXEPOSTFIX)
|
||||
|
@ -831,7 +839,7 @@ ifeq (win_SDL,$(findstring win,$(FTE_TARGET))$(findstring _SDL,$(FTE_TARGET)))
|
|||
M_LDFLAGS=$(GLLDFLAGS) $(IMAGELDFLAGS) $(OGGVORBISLDFLAGS)
|
||||
|
||||
ifdef windir
|
||||
M_LDFLAGS=$(MLDFLAGS) -lmingw32 -lws2_32 `$(SDLCONFIG) --libs`
|
||||
M_LDFLAGS=$(MLDFLAGS) -lmingw32 -lws2_32 `$(SDLCONFIG) --static-libs`
|
||||
else
|
||||
#pthread is needed because of SDL.
|
||||
M_LDFLAGS=$(IMAGELDFLAGS) $(OGGVORBISLDFLAGS) -lws2_32 -lmingw32 -mwindows -ldxguid -lwinmm -lole32 $(MLDFLAGS) `$(SDL_CONFIG) --libs` $(IMAGELDFLAGS)
|
||||
|
|
Loading…
Reference in a new issue