1
0
Fork 0
forked from fte/fteqw

Split up SDL stuff in the build_wip stuff, so I can build linux64-sdl separately from the others.

Fix up LTO stuff, some misc makefile tweaks.


git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5575 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2019-10-27 06:59:19 +00:00
parent c0e297c93d
commit e296ee5cc3
4 changed files with 73 additions and 54 deletions

View file

@ -115,8 +115,20 @@ if [ "$REUSE_CONFIG" != "y" ]; then
fi fi
read -n 1 -p "Build for Windows x86? [Y/n] " BUILD_WIN32 && echo read -n 1 -p "Build for Windows x86? [Y/n] " BUILD_WIN32 && echo
read -n 1 -p "Build for Windows x86_64? [Y/n] " BUILD_WIN64 && echo read -n 1 -p "Build for Windows x86_64? [Y/n] " BUILD_WIN64 && echo
read -n 1 -p "Build for Dos? [y/N] " BUILD_DOS && echo BUILD_DOS=n
read -n 1 -p "Build for SDL? [y/N] " BUILD_SDL && echo if [ "$(uname -o)" == "Cygwin" ]; then
read -n 1 -p "Build for Dos? [y/N] " BUILD_DOS && echo
fi
BUILD_SDL_LINUXx86=n
BUILD_SDL_LINUXx64=n
BUILD_SDL_WIN32=n
BUILD_SDL_WIN64=n
if [ "$(uname -sm)" == "Linux i686" ]; then
read -n 1 -p "Build for Linux x86 SDL? [y/N] " BUILD_SDL_LINUXx32 && echo
fi
if [ "$(uname -sm)" == "Linux x86_64" ]; then
read -n 1 -p "Build for Linux x86_64 SDL? [y/N] " BUILD_SDL_LINUXx64 && echo
fi
read -n 1 -p "Build for Android? [y/N] " BUILD_ANDROID && echo read -n 1 -p "Build for Android? [y/N] " BUILD_ANDROID && echo
read -n 1 -p "Build for Emscripten? [y/N] " BUILD_WEB && echo read -n 1 -p "Build for Emscripten? [y/N] " BUILD_WEB && echo
if [ 0 -ne 0 ]; then if [ 0 -ne 0 ]; then

View file

@ -140,7 +140,7 @@ if [ "$BUILD_LINUXx86" != "n" ]; then
NATIVE_PLUGINS="$PLUGINS_LINUXx86" build "Linux 32-bit" linux_x86 FTE_TARGET=linux32 CPUOPTIMIZATIONS=-fno-finite-math-only $TARGETS_LINUX NATIVE_PLUGINS="$PLUGINS_LINUXx86" build "Linux 32-bit" linux_x86 FTE_TARGET=linux32 CPUOPTIMIZATIONS=-fno-finite-math-only $TARGETS_LINUX
fi fi
if [ "$BUILD_LINUXx64" != "n" ]; then if [ "$BUILD_LINUXx64" != "n" ]; then
NATIVE_PLUGINS="$PLUGINS_LINUXx64" build "Linux 64-bit" linux_amd64 FTE_TARGET=linux64 LDFLAGS="-Llibs/64" CPUOPTIMIZATIONS=-fno-finite-math-only $TARGETS_LINUX NATIVE_PLUGINS="$PLUGINS_LINUXx64" build "Linux 64-bit" linux_amd64 FTE_TARGET=linux64 CPUOPTIMIZATIONS=-fno-finite-math-only $TARGETS_LINUX
fi fi
if [ "$BUILD_LINUXx32" != "n" ]; then if [ "$BUILD_LINUXx32" != "n" ]; then
# CFLAGS="-DNO_JPEG" # CFLAGS="-DNO_JPEG"
@ -177,20 +177,20 @@ if [ "$BUILD_DOS" == "y" ]; then
fi fi
if [ "$BUILD_WEB" != "n" ]; then if [ "$BUILD_WEB" != "n" ]; then
source $EMSDK/emsdk_env.sh >> /dev/null source $EMSDK/emsdk_env.sh >> /dev/null
build "Emscripten" web FTE_TARGET=web $TARGETS_WEB CC=emcc LTO= build "Emscripten" web FTE_TARGET=web $TARGETS_WEB CC=emcc
fi fi
if [ "$BUILD_LINUX" != "n" ] && [ "$BUILD_SDL" != "n" ] && [ "$(uname -m)" != "x86_64" ]; then if [ "$BUILD_SDL_LINUXx86" == "y" ]; then
build "Linux 32-bit (SDL)" linux_x86_sdl FTE_TARGET=SDL BITS=32 LTO=1 build "Linux 32-bit (SDL)" linux_x86_sdl FTE_TARGET=SDL2 BITS=32 $TARGETS_SDL
fi fi
if [ "$BUILD_LINUX" != "n" ] && [ "$BUILD_SDL" != "n" ] && [ "$(uname -m)" == "x86_64" ]; then if [ "$BUILD_SDL_LINUXx64" == "y" ]; then
build "Linux 64-bit (SDL)" linux_amd64_sdl FTE_TARGET=SDL BITS=64 LDFLAGS="-Llibs/64" LTO=1 build "Linux 64-bit (SDL)" linux_amd64_sdl FTE_TARGET=SDL2 BITS=64 $TARGETS_SDL
fi fi
if [ "$BUILD_WIN32" != "n" ] && [ "$BUILD_SDL" != "n" ]; then if [ "$BUILD_SDL_WIN32" == "y" ]; then
build "Windows 32-bit (SDL)" win32_sdl FTE_TARGET=win32_SDL gl-rel mingl-rel build "Windows 32-bit (SDL)" win32_sdl FTE_TARGET=win32_SDL $TARGETS_SDL
CFLAGS="$WARNINGLEVEL -DNOLEGACY -DOMIT_QCC" build "Windows 32-bit nocompat" nocompat FTE_TARGET=win32 LTO=1 NOCOMPAT=1 BOTLIB_CFLAGS="" BOTLIB_OBJS="" gl-rel m-rel -k # CFLAGS="$WARNINGLEVEL -DNOLEGACY -DOMIT_QCC" build "Windows 32-bit nocompat" nocompat FTE_TARGET=win32 LTO=1 NOCOMPAT=1 BOTLIB_CFLAGS="" BOTLIB_OBJS="" $TARGETS_SDL
fi fi
if [ "$BUILD_WIN64" != "n" ] && [ "$BUILD_SDL" != "n" ]; then if [ "$BUILD_SDL_WIN64" == "y" ]; then
build "Windows 64-bit (SDL)" win64_sdl FTE_TARGET=win64_SDL LDFLAGS="-L./libs/mingw64-libs/" gl-rel mingl-rel build "Windows 64-bit (SDL)" win64_sdl FTE_TARGET=win64_SDL $TARGETS_SDL
fi fi
if [ "$BUILD_NACL" != "n" ]; then if [ "$BUILD_NACL" != "n" ]; then
#non-pnacl is supported ONLY in chrome's store crap, but pnacl works anywhere. #non-pnacl is supported ONLY in chrome's store crap, but pnacl works anywhere.
@ -217,9 +217,9 @@ if [ "$BUILD_WIN32" != "n" ]; then
else else
rm -f $BUILDFOLDER/win32/3rdparty.zip rm -f $BUILDFOLDER/win32/3rdparty.zip
fi fi
if [ "$BUILD_SDL" != "n" ]; then # if [ "$BUILD_SDL_WIN32" != "n" ]; then
cp $SVNROOT/engine/libs/SDL2-2.0.1/i686-w64-mingw32/bin/SDL2.dll $BUILDFOLDER/win32_sdl # cp $SVNROOT/engine/libs/SDL2-2.0.1/i686-w64-mingw32/bin/SDL2.dll $BUILDFOLDER/win32_sdl
fi # fi
fi fi
if [ "$BUILD_WIN64" != "n" ]; then if [ "$BUILD_WIN64" != "n" ]; then
if [ -e "$BASE/3rdparty/win64/3rdparty.zip" ]; then if [ -e "$BASE/3rdparty/win64/3rdparty.zip" ]; then
@ -227,9 +227,9 @@ if [ "$BUILD_WIN64" != "n" ]; then
else else
rm -f $BUILDFOLDER/win64/3rdparty.zip rm -f $BUILDFOLDER/win64/3rdparty.zip
fi fi
if [ "$BUILD_SDL" != "n" ]; then # if [ "$BUILD_SDL_WIN64" != "n" ]; then
cp $SVNROOT/engine/libs/SDL2-2.0.1/x86_64-w64-mingw32/bin/SDL2.dll $BUILDFOLDER/win64_sdl # cp $SVNROOT/engine/libs/SDL2-2.0.1/x86_64-w64-mingw32/bin/SDL2.dll $BUILDFOLDER/win64_sdl
fi # fi
fi fi
if [ -e "$HOME/nocompat_readme.html" ]; then if [ -e "$HOME/nocompat_readme.html" ]; then
cp $HOME/nocompat_readme.html $BUILDFOLDER/nocompat/README.html cp $HOME/nocompat_readme.html $BUILDFOLDER/nocompat/README.html
@ -327,18 +327,21 @@ fi
if [ "$BUILD_WIN32" != "n" ] && [ "$BUILD_WIN64" != "n" ]; then if [ "$BUILD_WIN32" != "n" ] && [ "$BUILD_WIN64" != "n" ]; then
echo Archiving output echo Archiving output
SVNVER=$(svnversion $SVNROOT) SVNVER=$(svnversion $SVNROOT)
cd $BUILDFOLDER/ if [ -e $ARCHIVEFOLDER ]; then
zip -q -9 $ARCHIVEFOLDER/win_fteqw_$SVNVER.zip win32/fteglqw.exe win32/fteqwsv.exe win32/fteqccgui.exe win32/debug/fteglqw.exe win64/fteqw.exe win64/debug/fteglqw.exe cd $BUILDFOLDER/
zip -q -9 $ARCHIVEFOLDER/win_fteqw_$SVNVER.zip win32/fteglqw.exe win32/fteqwsv.exe win32/fteqccgui.exe win32/debug/fteglqw.exe win64/fteqw.exe win64/debug/fteglqw.exe
fi
if [ -e $BUILDFOLDER/fteqw_for_windows.zip ]; then
cd $BUILDFOLDER/win32/ cd $BUILDFOLDER/win32/
zip -q -j -9 $BUILDFOLDER/fteqw_for_windows.zip fteglqw.exe fteqwsv.exe fteqccgui.exe fteplug_qi_x86.dll fteplug_xmpp_x86.dll fteplug_irc_x86.dll fteplug_ezhud_x86.dll zip -q -j -9 $BUILDFOLDER/fteqw_for_windows.zip fteglqw.exe fteqwsv.exe fteqccgui.exe fteplug_qi_x86.dll fteplug_xmpp_x86.dll fteplug_irc_x86.dll fteplug_ezhud_x86.dll
cd $HOME/3rdparty_win32/ cd $HOME/3rdparty_win32/
zip -q -9 $BUILDFOLDER/fteqw_for_windows.zip ogg.dll vorbis.dll vorbisfile.dll freetype6.dll zlib1.dll zip -q -9 $BUILDFOLDER/fteqw_for_windows.zip ogg.dll vorbis.dll vorbisfile.dll freetype6.dll zlib1.dll
mkdir -p $BASE/tmp/fte mkdir -p $BASE/tmp/fte
cd $BASE/tmp/ cd $BASE/tmp/
cp $BUILDFOLDER/csaddon/menu.dat fte cp $BUILDFOLDER/csaddon/menu.dat fte
zip -q -9 $BUILDFOLDER/fteqw_for_windows.zip fte/menu.dat zip -q -9 $BUILDFOLDER/fteqw_for_windows.zip fte/menu.dat
fi
#~/afterquake/updatemini.sh #~/afterquake/updatemini.sh
fi fi

View file

@ -325,7 +325,7 @@ ifeq ($(FTE_TARGET),droid)
CC:=$(TOOLCHAIN)gcc --sysroot="$(DROIDSYSROOT)" -DANDROID $(DROID_ABI) -fno-strict-aliasing CC:=$(TOOLCHAIN)gcc --sysroot="$(DROIDSYSROOT)" -DANDROID $(DROID_ABI) -fno-strict-aliasing
CXX:=$(TOOLCHAIN)g++ --sysroot="$(DROIDSYSROOT)" -DANDROID $(DROID_ABI) -fno-strict-aliasing CXX:=$(TOOLCHAIN)g++ --sysroot="$(DROIDSYSROOT)" -DANDROID $(DROID_ABI) -fno-strict-aliasing
DO_LD=$(DO_ECHO) $(CC) -Wl,-soname,libftedroid.so -shared -Wl,--no-undefined -Wl,-z,noexecstack -o $@ $(LTO_LD) $(WCFLAGS) $(BRANDFLAGS) $(CFLAGS) -llog -lc -lm -lz DO_LD=+$(DO_ECHO) $(CC) -Wl,-soname,libftedroid.so -shared -Wl,--no-undefined -Wl,-z,noexecstack -o $@ $(LTO_LD) $(WCFLAGS) $(BRANDFLAGS) $(CFLAGS) -llog -lc -lm -lz
LD:=$(TOOLCHAIN)ld LD:=$(TOOLCHAIN)ld
AR:=$(TOOLCHAIN)ar AR:=$(TOOLCHAIN)ar
STRIP=$(TOOLCHAIN)strip STRIP=$(TOOLCHAIN)strip
@ -515,14 +515,14 @@ ALL_CXXFLAGS=$(subst -Wno-pointer-sign,,$(ALL_CFLAGS))
#cheap compile-everything-in-one-unit (compile becomes preprocess only) #cheap compile-everything-in-one-unit (compile becomes preprocess only)
ifneq ($(WPO),) ifneq ($(WPO),)
LTO_CC= -E LTO_CC= -E
LTO_LD= -flto -fwhole-program -x c LTO_LD= -flto=jobserver -fwhole-program -x c
LTO_END=ltoxnone LTO_END=ltoxnone
LTO_START=ltoxc LTO_START=ltoxc
endif endif
#proper/consistant link-time optimisations (requires gcc 4.5+ or so) #proper/consistant link-time optimisations (requires gcc 4.5+ or so)
ifneq ($(LTO),) ifneq ($(LTO),)
LTO_CC=-flto -fvisibility=hidden LTO_CC=-flto=jobserver -fvisibility=hidden
LTO_LD=-flto LTO_LD=-flto=jobserver
endif endif
#DO_ECHO=@echo $< && #DO_ECHO=@echo $< &&
@ -594,7 +594,7 @@ endif
SDL_INCLUDES= SDL_INCLUDES=
#-I$(LIBS_DIR)/sdl/include -I/usr/include/SDL -I$(LIBS_DIR)/sdl/include/SDL #-I$(LIBS_DIR)/sdl/include -I/usr/include/SDL -I$(LIBS_DIR)/sdl/include/SDL
BASE_INCLUDES=-I$(CLIENT_DIR) -I$(SERVER_DIR) -I$(COMMON_DIR) -I$(GL_DIR) -I$(D3D_DIR) -I$(PROGS_DIR) -I. -I$(LIBS_DIR) BASE_INCLUDES=-I$(CLIENT_DIR) -I$(SERVER_DIR) -I$(COMMON_DIR) -I$(GL_DIR) -I$(D3D_DIR) -I$(PROGS_DIR) -I.
BASE_CFLAGS=$(WARNINGFLAGS) $(GNUC_FUNCS) $(BASE_INCLUDES) -I$(LIBS_DIR)/dxsdk9/include -I$(LIBS_DIR)/dxsdk7/include $(SDL_INCLUDES) $(BOTLIB_CFLAGS) $(SVNREVISION) BASE_CFLAGS=$(WARNINGFLAGS) $(GNUC_FUNCS) $(BASE_INCLUDES) -I$(LIBS_DIR)/dxsdk9/include -I$(LIBS_DIR)/dxsdk7/include $(SDL_INCLUDES) $(BOTLIB_CFLAGS) $(SVNREVISION)
CLIENT_ONLY_CFLAGS=-DCLIENTONLY CLIENT_ONLY_CFLAGS=-DCLIENTONLY
SERVER_ONLY_CFLAGS=-DSERVERONLY SERVER_ONLY_CFLAGS=-DSERVERONLY
@ -1109,17 +1109,17 @@ ifeq (win_SDL,$(findstring win,$(FTE_TARGET))$(findstring _SDL,$(FTE_TARGET)))
GL_LDFLAGS=$(GLLDFLAGS) -lmingw32 -lws2_32 `$(SDLCONFIG) --static-libs` GL_LDFLAGS=$(GLLDFLAGS) -lmingw32 -lws2_32 `$(SDLCONFIG) --static-libs`
VK_LDFLAGS=$(GLLDFLAGS) -lmingw32 -lws2_32 `$(SDLCONFIG) --static-libs` VK_LDFLAGS=$(GLLDFLAGS) -lmingw32 -lws2_32 `$(SDLCONFIG) --static-libs`
M_LDFLAGS=$(MLDFLAGS) -lmingw32 -lws2_32 `$(SDLCONFIG) --static-libs` M_LDFLAGS=$(MLDFLAGS) -lmingw32 -lws2_32 `$(SDLCONFIG) --static-libs`
SV_LDFLAGS=$(MINGW_LIBS_DIR)/libz.a -lm -lmingw32 -lws2_32 -lwinmm `$(SDLCONFIG) --static-libs` SV_LDFLAGS=-lm -lmingw32 -lws2_32 -lwinmm `$(SDLCONFIG) --static-libs`
QCC_LDFLAGS=$(MINGW_LIBS_DIR)/libz.a QCC_LDFLAGS=
else else
GL_LDFLAGS=$(IMAGELDFLAGS) -lws2_32 -lmingw32 $(SDL_LDFLAGS) -mwindows -ldxguid -lwinmm -lole32 $(GLLDFLAGS) `$(SDLCONFIG) --libs` GL_LDFLAGS=$(IMAGELDFLAGS) -lws2_32 -lmingw32 $(SDL_LDFLAGS) -mwindows -ldxguid -lwinmm -lole32 $(GLLDFLAGS) `$(SDLCONFIG) --libs`
VK_LDFLAGS=$(IMAGELDFLAGS) -lws2_32 -lmingw32 $(SDL_LDFLAGS) -mwindows -ldxguid -lwinmm -lole32 $(GLLDFLAGS) `$(SDLCONFIG) --libs` VK_LDFLAGS=$(IMAGELDFLAGS) -lws2_32 -lmingw32 $(SDL_LDFLAGS) -mwindows -ldxguid -lwinmm -lole32 $(GLLDFLAGS) `$(SDLCONFIG) --libs`
M_LDFLAGS=$(IMAGELDFLAGS) -lws2_32 -lmingw32 $(SDL_LDFLAGS) -mwindows -ldxguid -lwinmm -lole32 $(MLDFLAGS) `$(SDLCONFIG) --libs` M_LDFLAGS=$(IMAGELDFLAGS) -lws2_32 -lmingw32 $(SDL_LDFLAGS) -mwindows -ldxguid -lwinmm -lole32 $(MLDFLAGS) `$(SDLCONFIG) --libs`
SV_LDFLAGS=$(MINGW_LIBS_DIR)/libz.a -lm -lmingw32 -lws2_32 -lwinmm `$(SDLCONFIG) --libs` SV_LDFLAGS=-lm -lmingw32 -lws2_32 -lwinmm `$(SDLCONFIG) --libs`
QCC_LDFLAGS=$(MINGW_LIBS_DIR)/libz.a QCC_LDFLAGS=
endif endif
GL_CFLAGS=-DFTE_SDL -I$(MINGW_LIBS_DIR)/ -I$(MINGW_LIBS_DIR) -I$(LIBS_DIR) $(GLCFLAGS) $(CLIENTLIBFLAGS) $(DX7SDK) GL_CFLAGS=-DFTE_SDL $(GLCFLAGS) $(CLIENTLIBFLAGS) $(DX7SDK)
GLB_DIR=gl_mgw_sdl$(BITS) GLB_DIR=gl_mgw_sdl$(BITS)
GLCL_DIR=glcl_mgw_sdl$(BITS) GLCL_DIR=glcl_mgw_sdl$(BITS)
@ -1135,16 +1135,16 @@ ifeq (win_SDL,$(findstring win,$(FTE_TARGET))$(findstring _SDL,$(FTE_TARGET)))
M_EXE_NAME=../$(EXE_NAME)-sdl$(BITS)$(EXEPOSTFIX) M_EXE_NAME=../$(EXE_NAME)-sdl$(BITS)$(EXEPOSTFIX)
#with d3d... #with d3d...
#MCL_OBJS=$(D3DGL_OBJS) $(GLQUAKE_OBJS) $(SOFTWARE_OBJS) $(D3DQUAKE_OBJS) $(BOTLIB_OBJS) gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o $(LTO_END) resources.o $(LTO_START) #MCL_OBJS=$(D3DGL_OBJS) $(GLQUAKE_OBJS) $(SOFTWARE_OBJS) $(D3DQUAKE_OBJS) $(BOTLIB_OBJS) gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o $(LTO_END) resources.o $(LTO_START)
#M_CFLAGS=$(D3DCFLAGS) $(VKCFLAGS) $(GLCFLAGS) -DFTE_SDL -I$(LIBS_DIR) -I$(LIBS_DIR) -I$(MINGW_LIBS_DIR)/ -I$(MINGW_LIBS_DIR) $(CLIENTLIBFLAGS) $(DX7SDK) #M_CFLAGS=$(D3DCFLAGS) $(VKCFLAGS) $(GLCFLAGS) -DFTE_SDL $(CLIENTLIBFLAGS) $(DX7SDK)
#without d3d... #without d3d...
MCL_OBJS=$(D3DGL_OBJS) $(GLQUAKE_OBJS) $(SOFTWARE_OBJS) $(BOTLIB_OBJS) gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o $(LTO_END) resources.o $(LTO_START) MCL_OBJS=$(D3DGL_OBJS) $(GLQUAKE_OBJS) $(SOFTWARE_OBJS) $(BOTLIB_OBJS) gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o $(LTO_END) resources.o $(LTO_START)
M_CFLAGS=$(VKCFLAGS) $(GLCFLAGS) -DFTE_SDL -I$(LIBS_DIR) -I$(LIBS_DIR) -I$(MINGW_LIBS_DIR)/ -I$(MINGW_LIBS_DIR) $(CLIENTLIBFLAGS) $(DX7SDK) M_CFLAGS=$(VKCFLAGS) $(GLCFLAGS) -DFTE_SDL $(CLIENTLIBFLAGS) $(DX7SDK)
D3DCL_OBJS=$(D3DQUAKE_OBJS) $(BOTLIB_OBJS) snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o $(D3DGL_OBJS) $(LTO_END) resources.o $(LTO_START) D3DCL_OBJS=$(D3DQUAKE_OBJS) $(BOTLIB_OBJS) snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o $(D3DGL_OBJS) $(LTO_END) resources.o $(LTO_START)
D3D_EXE_NAME=../$(EXE_NAME)-sdl-d3d$(BITS)$(EXEPOSTFIX) D3D_EXE_NAME=../$(EXE_NAME)-sdl-d3d$(BITS)$(EXEPOSTFIX)
D3DCL_EXE_NAME=../$(EXE_NAME)-sdl-d3dcl$(BITS)$(EXEPOSTFIX) D3DCL_EXE_NAME=../$(EXE_NAME)-sdl-d3dcl$(BITS)$(EXEPOSTFIX)
D3D_LDFLAGS=$(IMAGELDFLAGS) -lws2_32 -lmingw32 $(SDL_LDFLAGS) -mwindows -ldxguid -lwinmm -lole32 D3D_LDFLAGS=$(IMAGELDFLAGS) -lws2_32 -lmingw32 $(SDL_LDFLAGS) -mwindows -ldxguid -lwinmm -lole32
D3D_CFLAGS=$(D3DCFLAGS) -DFTE_SDL -DNO_XFLIP -I$(LIBS_DIR) -I$(MINGW_LIBS_DIR)/ -I$(MINGW_LIBS_DIR) $(CLIENTLIBFLAGS) $(DX7SDK) D3D_CFLAGS=$(D3DCFLAGS) -DFTE_SDL -DNO_XFLIP $(CLIENTLIBFLAGS) $(DX7SDK)
D3DB_DIR=sdl_d3d_mgw$(BITS) D3DB_DIR=sdl_d3d_mgw$(BITS)
D3DCL_DIR=sdl_d3dcl_mgw$(BITS) D3DCL_DIR=sdl_d3dcl_mgw$(BITS)
@ -1152,7 +1152,7 @@ ifeq (win_SDL,$(findstring win,$(FTE_TARGET))$(findstring _SDL,$(FTE_TARGET)))
VKCL_OBJS=$(VKQUAKE_OBJS) $(BOTLIB_OBJS) gl_bloom.o gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o $(D3DGL_OBJS) $(LTO_END) resources.o $(LTO_START) VKCL_OBJS=$(VKQUAKE_OBJS) $(BOTLIB_OBJS) gl_bloom.o gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o $(D3DGL_OBJS) $(LTO_END) resources.o $(LTO_START)
VK_EXE_NAME=../$(EXE_NAME)-sdl-vk$(BITS)$(EXEPOSTFIX) VK_EXE_NAME=../$(EXE_NAME)-sdl-vk$(BITS)$(EXEPOSTFIX)
VKCL_EXE_NAME=../$(EXE_NAME)-sdl-vkcl$(BITS)$(EXEPOSTFIX) VKCL_EXE_NAME=../$(EXE_NAME)-sdl-vkcl$(BITS)$(EXEPOSTFIX)
VK_CFLAGS=$(VKCFLAGS) -DFTE_SDL -DNO_XFLIP -I$(LIBS_DIR) -I$(MINGW_LIBS_DIR)/ -I$(MINGW_LIBS_DIR) $(CLIENTLIBFLAGS) $(DX7SDK) VK_CFLAGS=$(VKCFLAGS) -DFTE_SDL -DNO_XFLIP $(CLIENTLIBFLAGS) $(DX7SDK)
VKB_DIR=sdl_vk_mgw$(BITS) VKB_DIR=sdl_vk_mgw$(BITS)
VKCL_DIR=sdl_vkcl_mgw$(BITS) VKCL_DIR=sdl_vkcl_mgw$(BITS)
@ -1802,7 +1802,10 @@ $(OUT_DIR)/%.mo $(OUT_DIR)/%.d : %.m
$(OUT_DIR)/quakedef.h.gch : quakedef.h $(OUT_DIR)/quakedef.h.gch : quakedef.h
$(CC) -x c $(ALL_CFLAGS) -o $@ -c $< $(CC) -x c $(ALL_CFLAGS) -o $@ -c $<
PRECOMPHEADERS ?= $(OUT_DIR)/quakedef.h.gch PRECOMPHEADERS ?= $(OUT_DIR)/quakedef.h.gch
ifneq ($(OUT_DIR),)
ALL_CFLAGS+=-I$(OUT_DIR) ALL_CFLAGS+=-I$(OUT_DIR)
endif
#addprefix is to add the ./release/server/ part of the object name #addprefix is to add the ./release/server/ part of the object name
#foreach is needed as the OBJS is a list of variable names containing object lists. #foreach is needed as the OBJS is a list of variable names containing object lists.
@ -1811,7 +1814,7 @@ ALL_CFLAGS+=-I$(OUT_DIR)
#or at least I hope he does. It makes no sence to mortals. #or at least I hope he does. It makes no sence to mortals.
LDCC ?=$(CC) LDCC ?=$(CC)
DO_LD ?= $(DO_ECHO) $(LDCC) -o $@ $(LTO_LD) $(WCFLAGS) $(BRANDFLAGS) $(CFLAGS) DO_LD ?= +$(DO_ECHO) $(LDCC) -o $@ $(LTO_LD) $(WCFLAGS) $(BRANDFLAGS) $(CFLAGS)
$(OUT_DIR)/$(EXE_NAME): $(PRECOMPHEADERS) $(foreach fn, $(CUSTOMOBJS) $(foreach ol, $(OBJS), $($(ol))),$(if $(findstring ltox,$(fn)),,$(OUT_DIR)/$(fn))) $(OUT_DIR)/$(EXE_NAME): $(PRECOMPHEADERS) $(foreach fn, $(CUSTOMOBJS) $(foreach ol, $(OBJS), $($(ol))),$(if $(findstring ltox,$(fn)),,$(OUT_DIR)/$(fn)))
$(DO_LD) $(foreach fn, $(CUSTOMOBJS) $(foreach ol, $(OBJS) $(LTO_END), $($(ol))),$(if $(findstring ltox,$(fn)),$(subst ltox,-x ,$(fn)),$(NATIVE_OUT_DIR)/$(fn)) ) $(LDFLAGS) $(DO_LD) $(foreach fn, $(CUSTOMOBJS) $(foreach ol, $(OBJS) $(LTO_END), $($(ol))),$(if $(findstring ltox,$(fn)),$(subst ltox,-x ,$(fn)),$(NATIVE_OUT_DIR)/$(fn)) ) $(LDFLAGS)
@ -1950,7 +1953,7 @@ m-dbg:
m-profile: m-profile:
@$(MAKE) m-tmp TYPE=_clsv-profile OUT_DIR="$(PROFILE_DIR)/$(NCDIRPREFIX)$(MB_DIR)" @$(MAKE) m-tmp TYPE=_clsv-profile OUT_DIR="$(PROFILE_DIR)/$(NCDIRPREFIX)$(MB_DIR)"
.PHONY: m-tmp mcl-tmp mingl-tmp glcl-tmp gl-tmp sv-tmp _clsv-dbg _clsv-rel _cl-dbg _cl-rel _out-rel _out-dbg reldir debugdir makelibs wel-rel web-dbg httpserver .PHONY: m-tmp mcl-tmp mingl-tmp glcl-tmp gl-tmp sv-tmp _clsv-dbg _clsv-rel _cl-dbg _cl-rel _out-rel _out-dbg reldir debugdir makelibs wel-rel web-dbg httpserver iqm imgtool
_qcc-tmp: $(REQDIR) _qcc-tmp: $(REQDIR)
@ -1958,11 +1961,11 @@ _qcc-tmp: $(REQDIR)
qcc-rel: qcc-rel:
@$(MAKE) _qcc-tmp TYPE=_out-rel REQDIR=reldir EXE_NAME="../fteqcc$(BITS)" OUT_DIR="$(RELEASE_DIR)/$(NCDIRPREFIX)$(QCC_DIR)" SOBJS="qcctui.o $(if $(findstring win,$(FTE_TARGET)),fteqcc.o)" @$(MAKE) _qcc-tmp TYPE=_out-rel REQDIR=reldir EXE_NAME="../fteqcc$(BITS)" OUT_DIR="$(RELEASE_DIR)/$(NCDIRPREFIX)$(QCC_DIR)" SOBJS="qcctui.o $(if $(findstring win,$(FTE_TARGET)),fteqcc.o)"
qccgui-rel: qccgui-rel:
@$(MAKE) _qcc-tmp TYPE=_out-rel REQDIR=reldir EXE_NAME="../fteqccgui$(BITS)" OUT_DIR="$(RELEASE_DIR)/$(NCDIRPREFIX)$(QCC_DIR)gui" SOBJS="qccgui.o qccguistuff.o packager.o decomp.o fteqcc.o" LDFLAGS="$(LDFLAGS) -lole32 -lcomdlg32 -lcomctl32 -lshlwapi -mwindows" @$(MAKE) _qcc-tmp TYPE=_out-rel REQDIR=reldir EXE_NAME="../fteqccgui$(BITS)" LTO= OUT_DIR="$(RELEASE_DIR)/$(NCDIRPREFIX)$(QCC_DIR)gui" SOBJS="qccgui.o qccguistuff.o packager.o decomp.o fteqcc.o" LDFLAGS="$(LDFLAGS) -lole32 -lcomdlg32 -lcomctl32 -lshlwapi -mwindows"
qcc-dbg: qcc-dbg:
@$(MAKE) _qcc-tmp TYPE=_out-dbg REQDIR=debugdir EXE_NAME="../fteqcc$(BITS)" OUT_DIR="$(DEBUG_DIR)/$(NCDIRPREFIX)$(QCC_DIR)" SOBJS="qcctui.o $(if $(findstring win,$(FTE_TARGET)),fteqcc.o)" @$(MAKE) _qcc-tmp TYPE=_out-dbg REQDIR=debugdir EXE_NAME="../fteqcc$(BITS)" OUT_DIR="$(DEBUG_DIR)/$(NCDIRPREFIX)$(QCC_DIR)" SOBJS="qcctui.o $(if $(findstring win,$(FTE_TARGET)),fteqcc.o)"
qccgui-dbg: qccgui-dbg:
@$(MAKE) _qcc-tmp TYPE=_out-dbg REQDIR=debugdir EXE_NAME="../fteqccgui$(BITS)" OUT_DIR="$(DEBUG_DIR)/$(NCDIRPREFIX)$(QCC_DIR)gui" SOBJS="qccgui.o qccguistuff.o packager.o decomp.o fteqcc.o" LDFLAGS="$(LDFLAGS) -lole32 -lcomdlg32 -lcomctl32 -lshlwapi -mwindows" @$(MAKE) _qcc-tmp TYPE=_out-dbg REQDIR=debugdir EXE_NAME="../fteqccgui$(BITS)" LTO= OUT_DIR="$(DEBUG_DIR)/$(NCDIRPREFIX)$(QCC_DIR)gui" SOBJS="qccgui.o qccguistuff.o packager.o decomp.o fteqcc.o" LDFLAGS="$(LDFLAGS) -lole32 -lcomdlg32 -lcomctl32 -lshlwapi -mwindows"
#scintilla is messy as fuck when building statically. but at least we can strip out the lexers we don't use this way. #scintilla is messy as fuck when building statically. but at least we can strip out the lexers we don't use this way.
@ -1980,7 +1983,8 @@ scintilla$(BITS)_static:
@$(MAKE) reldir OUT_DIR=$(RELEASE_DIR)/$(QCC_DIR)scin @$(MAKE) reldir OUT_DIR=$(RELEASE_DIR)/$(QCC_DIR)scin
@$(MAKE) $(RELEASE_DIR)/scintilla$(BITS).a VPATH="$(SCINTILLA_DIRS)" CFLAGS="$(SCINTILLA_INC) -DDISABLE_D2D -DSTATIC_BUILD -DSCI_LEXER -std=c++11" OUT_DIR=$(RELEASE_DIR)/$(QCC_DIR)scin WCFLAGS="$(WCFLAGS) -Os" WARNINGFLAGS= @$(MAKE) $(RELEASE_DIR)/scintilla$(BITS).a VPATH="$(SCINTILLA_DIRS)" CFLAGS="$(SCINTILLA_INC) -DDISABLE_D2D -DSTATIC_BUILD -DSCI_LEXER -std=c++11" OUT_DIR=$(RELEASE_DIR)/$(QCC_DIR)scin WCFLAGS="$(WCFLAGS) -Os" WARNINGFLAGS=
qccgui-scintilla: scintilla$(BITS)_static qccgui-scintilla: scintilla$(BITS)_static
@$(MAKE) _qcc-tmp TYPE=_out-rel REQDIR=reldir EXE_NAME="../fteqccgui$(BITS)" OUT_DIR="$(RELEASE_DIR)/$(QCC_DIR)scin" SOBJS="qccgui.o qccguistuff.o packager.o decomp.o fteqcc.o" WCFLAGS="$(WCFLAGS) -DSCISTATIC" LDFLAGS="$(LDFLAGS) $(RELEASE_DIR)/scintilla$(BITS).a -static -luuid -lole32 -limm32 -lstdc++ -loleaut32 -lcomdlg32 -lcomctl32 -lshlwapi -mwindows" #LTO bugs out on WinMain for some reason, so try to disable it for this target.
@LTO= $(MAKE) _qcc-tmp TYPE=_out-rel REQDIR=reldir EXE_NAME="../fteqccgui$(BITS)" OUT_DIR="$(RELEASE_DIR)/$(QCC_DIR)scin" SOBJS="qccgui.o qccguistuff.o packager.o decomp.o fteqcc.o" WCFLAGS="$(WCFLAGS) -DSCISTATIC" LDFLAGS="$(LDFLAGS) $(RELEASE_DIR)/scintilla$(BITS).a -static -luuid -lole32 -limm32 -lstdc++ -loleaut32 -lcomdlg32 -lcomctl32 -lshlwapi -mwindows"
ifdef windir ifdef windir
debugdir: debugdir:
@ -2300,7 +2304,7 @@ iqm: iqm-rel
IMGTOOL_OBJECTS=../imgtool.c client/image.c IMGTOOL_OBJECTS=../imgtool.c client/image.c
$(RELEASE_DIR)/imgtool$(BITS)$(EXEPOSTFIX): $(IQM_OBJECTS) $(RELEASE_DIR)/imgtool$(BITS)$(EXEPOSTFIX): $(IQM_OBJECTS)
$(CC) -o $@ $(IMGTOOL_OBJECTS) -lstdc++ -lm -Os $(BASE_INCLUDES) -DIMGTOOL -ldl $(CC) -o $@ $(IMGTOOL_OBJECTS) -lstdc++ -lm -Os $(ALL_CFLAGS) -DIMGTOOL $(BASELDFLAGS)
imgtool-rel: $(RELEASE_DIR)/imgtool$(BITS)$(EXEPOSTFIX) imgtool-rel: $(RELEASE_DIR)/imgtool$(BITS)$(EXEPOSTFIX)
imgtool: imgtool-rel imgtool: imgtool-rel
@ -2330,10 +2334,10 @@ QTV_OBJECTS= \
$(RELEASE_DIR)/qtv$(BITS)$(EXEPOSTFIX): $(QTV_OBJECTS) $(RELEASE_DIR)/qtv$(BITS)$(EXEPOSTFIX): $(QTV_OBJECTS)
$(CC) -o $@ $? -lstdc++ -lm $(BASE_INCLUDES) $(QTV_LDFLAGS) $(CC) -o $@ $? -lstdc++ -lm $(BASE_INCLUDES) $(QTV_LDFLAGS)
qtv-rel: qtv-rel:
$(MAKE) $(RELEASE_DIR)/qtv$(BITS)$(EXEPOSTFIX) VPATH="$(BASE_DIR)/../fteqtv:$(VPATH)" @$(MAKE) $(RELEASE_DIR)/qtv$(BITS)$(EXEPOSTFIX) VPATH="$(BASE_DIR)/../fteqtv:$(VPATH)"
qtv: qtv-rel qtv: qtv-rel
utils: httpserver iqm master qtv-rel utils: httpserver iqm imgtool master qtv-rel
prefix ?= /usr/local prefix ?= /usr/local
exec_prefix ?= $(prefix) exec_prefix ?= $(prefix)

View file

@ -1117,10 +1117,10 @@ static void ImgTool_TreeConvert(struct opts_s *args, const char *srcpath, const
} }
if (stat(dest, &statdst) < 0) if (stat(dest, &statdst) < 0)
{ {
statdst.st_mtim.tv_sec = INT_MIN; //make it look old statdst.st_mtime = INT_MIN; //make it look old
newfiles++; newfiles++;
} }
if (statdst.st_mtim.tv_sec <= statsrc.st_mtim.tv_sec) if (statdst.st_mtime <= statsrc.st_mtime)
{ {
processedfiles++; processedfiles++;
// Con_Printf("Image file %s -> %s\n", file, dest); // Con_Printf("Image file %s -> %s\n", file, dest);