1
0
Fork 0
forked from fte/fteqw

Fixed an issue with dependancies getting re-downloaded.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5139 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2017-08-12 19:32:09 +00:00
parent 1ffacb95b2
commit 0a6cbdf39a
4 changed files with 43 additions and 29 deletions

View file

@ -33,7 +33,11 @@ ANDROID_ZIPALIGN=$ANDROIDROOT/build-tools/$ANDROIDBUILDTOOLS/zipalign #relative
THREADS="-j 4"
#windows is always cross compiled, so we don't have issues with non-native ffmpeg
TARGETS_LINUX=qcc-rel rel dbg vk-rel plugins-rel plugins-dbg
TARGETS_WINDOWS=sv-rel gl-rel vk-rel mingl-rel m-rel d3d-rel qcc-rel qccgui-scintilla qccgui-dbg gl-dbg sv-dbg plugins-dbg plugins-rel
PLUGINS_LINUXx86="ode qi ezhud xmpp irc"
PLUGINS_LINUXx64="ode qi ezhud xmpp irc"
PLUGINS_LINUXx32="qi ezhud xmpp irc"
@ -44,6 +48,7 @@ fi
if [ "$(uname -m)" == "x86_64" ]; then
PLUGINS_LINUX64="ffmpeg ode qi ezhud xmpp irc"
fi
#windows is always cross compiled, so we don't have issues with non-native ffmpeg
#windows doesn't cross compile, so no system dependancy issues
#skip some dependancies if we're running on cygwin, ode is buggy.
if [ "$(uname -s)" == "Linux" ]; then
@ -142,8 +147,8 @@ if [ "$UID" != "0" ]; then
echo "BUILDLOGFOLDER=\"$BUILDLOGFOLDER\"" >>$FTECONFIG
echo "SVNROOT=\"$SVNROOT\"" >>$FTECONFIG
echo "ANDROIDROOT=\"$ANDROIDROOT\"" >>$FTECONFIG
echo "export ANDROID_HOSTSYSTEM=\"ANDROID_HOSTSYSTEM\"" >>$FTECONFIG
echo "export ANDROID_ZIPALIGN=\"ANDROID_ZIPALIGN\"" >>$FTECONFIG
echo "export ANDROID_HOSTSYSTEM=\"$ANDROID_HOSTSYSTEM\"" >>$FTECONFIG
echo "export ANDROID_ZIPALIGN=\"$ANDROID_ZIPALIGN\"" >>$FTECONFIG
echo "EMSCRIPTENROOT=\"$EMSCRIPTENROOT\"" >>$FTECONFIG
echo "OSXCROSSROOT=\"$OSXCROSSROOT\"" >>$FTECONFIG
echo "NACLROOT=\"$NACLROOT\"" >>$FTECONFIG
@ -164,6 +169,8 @@ if [ "$UID" != "0" ]; then
echo "BUILD_MAC=\"$BUILD_MAC\"" >>$FTECONFIG
echo "BUILD_NACL=\"$BUILD_NACL\"" >>$FTECONFIG
echo "TARGETS_WINDOWS=\"$TARGETS_WINDOWS\"" >>$FTECONFIG
echo "TARGETS_LINUX=\"$TARGETS_LINUX\"" >>$FTECONFIG
echo "PLUGINS_WINDOWS=\"$PLUGINS_WINDOWS\"" >>$FTECONFIG
echo "PLUGINS_LINUXx86=\"$PLUGINS_LINUXx86\"" >>$FTECONFIG
echo "PLUGINS_LINUXx64=\"$PLUGINS_LINUXx64\"" >>$FTECONFIG

View file

@ -25,6 +25,9 @@ PLUGINS_LINUXx32="qi ezhud xmpp irc"
PLUGINS_WINDOWS="avplug ode qi ezhud xmpp irc"
THREADS="-j 4"
TARGETS_LINUX="qcc-rel rel dbg vk-rel plugins-rel plugins-dbg"
TARGETS_WINDOWS="sv-rel gl-rel vk-rel mingl-rel m-rel d3d-rel qcc-rel qccgui-scintilla qccgui-dbg gl-dbg sv-dbg plugins-dbg plugins-rel"
########### NaCL stuff
NACL_SDK_ROOT=/opt/nacl_sdk/pepper_31/
@ -128,25 +131,25 @@ function build_fteqcc {
echo "--- Engine builds ---"
#the -fno-finite-math-only is to avoid a glibc dependancy
if [ "$BUILD_LINUXx86" != "n" ]; then
NATIVE_PLUGINS="$PLUGINS_LINUXx86" build "Linux 32-bit" linux_x86 FTE_TARGET=linux32 CPUOPTIMIZATIONS=-fno-finite-math-only qcc-rel rel dbg vk-rel plugins-rel plugins-dbg
NATIVE_PLUGINS="$PLUGINS_LINUXx86" build "Linux 32-bit" linux_x86 FTE_TARGET=linux32 CPUOPTIMIZATIONS=-fno-finite-math-only $TARGETS_LINUX
fi
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 qcc-rel rel dbg vk-rel plugins-rel plugins-dbg
NATIVE_PLUGINS="$PLUGINS_LINUXx64" build "Linux 64-bit" linux_amd64 FTE_TARGET=linux64 LDFLAGS="-Llibs/64" CPUOPTIMIZATIONS=-fno-finite-math-only $TARGETS_LINUX
fi
if [ "$BUILD_LINUXx32" != "n" ]; then
# CFLAGS="-DNO_JPEG"
NATIVE_PLUGINS="$PLUGINS_LINUXx32" build "Linux x32" linux_x32 FTE_TARGET=linuxx32 CPUOPTIMIZATIONS=-fno-finite-math-only qcc-rel rel dbg plugins-rel plugins-dbg
NATIVE_PLUGINS="$PLUGINS_LINUXx32" build "Linux x32" linux_x32 FTE_TARGET=linuxx32 CPUOPTIMIZATIONS=-fno-finite-math-only $TARGETS_LINUX
fi
if [ "$BUILD_LINUXarmhf" != "n" ]; then
#debian/ubuntu's armhf targets armv7. we instead target armv6, because that means we work on rpi too (but still with hard-float). It should be compatible although we likely need more ops.
NATIVE_PLUGINS="$PLUGINS_LINUXarmhf" build "Linux ARMhf" linux_armhf FTE_TARGET=linuxarmhf CPUOPTIMIZATIONS=-fno-finite-math-only rel dbg qcc-rel plugins-rel plugins-dbg
NATIVE_PLUGINS="$PLUGINS_LINUXarmhf" build "Linux ARMhf" linux_armhf FTE_TARGET=linuxarmhf CPUOPTIMIZATIONS=-fno-finite-math-only $TARGETS_LINUX
fi
if [ "$BUILD_CYGWIN" != "n" ]; then
NATIVE_PLUGINS="qi ezhud" build "Cygwin" cygwin qcc-rel rel dbg plugins-rel plugins-dbg
fi
if [ "$BUILD_WINDOWS" != "n" ]; then
NATIVE_PLUGINS="$PLUGINS_WINDOWS" build "Windows 32-bit" win32 FTE_TARGET=win32 CFLAGS="$WARNINGLEVEL" sv-rel gl-rel vk-rel mingl-rel m-rel d3d-rel qcc-rel qccgui-scintilla qccgui-dbg gl-dbg sv-dbg plugins-dbg plugins-rel NATIVE_PLUGINS="$PLUGINS_WINDOWS"
NATIVE_PLUGINS="$PLUGINS_WINDOWS" build "Windows 64-bit" win64 FTE_TARGET=win64 CFLAGS="$WARNINGLEVEL" sv-rel gl-rel vk-rel mingl-rel m-rel d3d-rel qcc-rel qccgui-scintilla qccgui-dbg gl-dbg sv-dbg plugins-dbg plugins-rel
NATIVE_PLUGINS="$PLUGINS_WINDOWS" build "Windows 32-bit" win32 FTE_TARGET=win32 CFLAGS="$WARNINGLEVEL" $TARGETS_WINDOWS
NATIVE_PLUGINS="$PLUGINS_WINDOWS" build "Windows 64-bit" win64 FTE_TARGET=win64 CFLAGS="$WARNINGLEVEL" $TARGETS_WINDOWS
fi
if [ "$BUILD_MSVC" != "n" ]; then
NATIVE_PLUGINS="$PLUGINS_WINDOWS" build "Windows MSVC 32-bit" msvc FTE_TARGET=vc BITS=32 CFLAGS="$WARNINGLEVEL" sv-rel gl-rel vk-rel mingl-rel m-rel d3d-rel qcc-rel qccgui-scintilla qccgui-dbg gl-dbg sv-dbg plugins-dbg plugins-rel
@ -156,9 +159,9 @@ export NATIVE_PLUGINS="qi ezhud xmpp irc"
if [ "$BUILD_ANDROID" != "n" ]; then
build "Android" android droid-rel
fi
if [ "$BUILD_WINDOWS" != "n" ]; then
build "NPFTE" npfte npfte-rel
fi
#if [ "$BUILD_WINDOWS" != "n" ]; then
# build "NPFTE" npfte npfte-rel
#fi
if [ "$BUILD_DOS" == "y" ]; then
#no networking makes dedicated servers useless. and only a crappy sw renderer is implemented right now.
#the qcc might be useful to someone though!

View file

@ -155,7 +155,8 @@ DROID_PACKSU?= $(BASE_DIR)/droid/fte.cfg $(BASE_DIR)/droid/default.fmf $(BASE_DI
ANDROID_HOME?=~/android-sdk-linux
#ANDROID_NDK_ROOT?=~/android-ndk-r8e
ANDROID_NDK_ROOT?=$(ANDROID_HOME)/ndk-bundle
ZIPALIGN?=$(ANDROID_HOME)/tools/zipalign
ANDROID_ZIPALIGN?=$(ZIPALIGN)
ANDROID_ZIPALIGN?=$(ANDROID_HOME)/tools/zipalign
ANT?=ant
JAVA_HOME?=/usr
JAVATOOL=$(JAVA_HOME)/bin/
@ -177,6 +178,7 @@ ifeq ($(FTE_TARGET),droid)
else
ANDROID_HOSTSYSTEM?=linux-$(shell uname -m)
endif
DROID_ABI_VER?=4.6
#omfg why the FUCK do we need all this bullshit? Why isn't there some sane way to do this that actually works regardless of ndk updates?!?
#name is some random subdir that someone at google arbitrarily picked
@ -187,7 +189,7 @@ ifeq ($(FTE_TARGET),droid)
DROID_ABI_NAME___armeabi=arm-linux-androideabi
DROID_ABI_PREFIX_armeabi=arm-linux-androideabi
DROID_ABI_ARCH___armeabi=arm
DROID_ABI_VER____armeabi=4.6
DROID_ABI_VER____armeabi?=$(DROID_ABI_VER)
DROID_ABI_CFLAGS_armeabi=-march=armv5te -mtune=xscale -msoft-float
DROID_ABI_NAME___armeabi-v7a=$(DROID_ABI_NAME___armeabi)
DROID_ABI_PREFIX_armeabi-v7a=$(DROID_ABI_PREFIX_armeabi)
@ -202,7 +204,7 @@ ifeq ($(FTE_TARGET),droid)
DROID_ABI_NAME___x86=x86
DROID_ABI_PREFIX_x86=i686-linux-android
DROID_ABI_ARCH___x86=x86
DROID_ABI_VER____x86=4.6
DROID_ABI_VER____x86?=$(DROID_ABI_VER)
DROID_ABI_CFLAGS_x86=-march=i686 -mssse3 -mfpmath=sse -m32 -Os
DROID_ABI_NAME___x86_64=$(DROID_ABI_NAME___x86)
DROID_ABI_PREFIX_x86_64=$(DROID_ABI_PREFIX_x86)
@ -212,7 +214,7 @@ ifeq ($(FTE_TARGET),droid)
#DROID_ABI_NAME___mips=mipsel-linux-android
#DROID_ABI_PREFIX_mips=mipsel-linux-android
#DROID_ABI_ARCH___mips=mips
#DROID_ABI_VER____mips=4.6
#DROID_ABI_VER____mips?=$(DROID_ABI_VER)
#DROID_ABI_CFLAGS_mips=
#DROID_ABI_NAME___mips64=$(DROID_ABI_NAME___mips)
#DROID_ABI_PREFIX_mips64=$(DROID_ABI_PREFIX_mips)
@ -1840,14 +1842,14 @@ debugdir:
@-mkdir -p $(OUT_DIR)
endif
plugins-dbg:
plugins-dbg: debugdir
@if test -e ../plugins/Makefile; \
then $(MAKE) native -C ../plugins OUT_DIR="$(DEBUG_DIR)" CC="$(CC) $(W32_CFLAGS) $(DEBUG_CFLAGS)" BASE_CFLAGS="$(BASE_CFLAGS)" FTE_TARGET="$(FTE_TARGET)"; \
else echo no plugins directory installed; \
fi
plugins:
plugins-rel:
plugins-rel: reldir
@if test -e ../plugins/Makefile; \
then $(MAKE) native -C ../plugins OUT_DIR="$(RELEASE_DIR)" CC="$(CC) $(W32_CFLAGS) $(RELEASE_CFLAGS)" BASE_CFLAGS="$(BASE_CFLAGS)" FTE_TARGET="$(FTE_TARGET)"; \
else echo no plugins directory installed; \
@ -2030,7 +2032,7 @@ endif
@echo
@$(JAVATOOL)jarsigner $(JARSIGNARGS) -digestalg SHA1 -sigalg MD5withRSA -keystore droid/ftekeystore droid/bin/FTEDroid-release-unsigned.apk autogen
-rm -f $(RELEASE_DIR)/FTEDroid.apk
$(ZIPALIGN) 4 droid/bin/FTEDroid-release-unsigned.apk $(NATIVE_RELEASE_DIR)/FTEDroid.apk
$(ANDROID_ZIPALIGN) 4 droid/bin/FTEDroid-release-unsigned.apk $(NATIVE_RELEASE_DIR)/FTEDroid.apk
droid-opt:
$(MAKE) FTE_TARGET=droid droid/build.xml droid/ftekeystore

View file

@ -121,16 +121,16 @@ ifeq (0,1)
AV_EXTRACT=7z e -y
else
AV_ARCHIVEEXT=.zip
AV_EXTRACT=unzip -j
AV_EXTRACT=unzip -ju
endif
AV_W32=$(AV_VER)-win32-dev$(AV_ARCHIVEEXT)
AV_URL32=http://ffmpeg.zeranoe.com/builds/win32/dev/$(AV_W32)
AV_PRE32=$(AV_VER)-win32-dev/
AV_W64=$(AV_VER)-win64-dev$(AV_ARCHIVEEXT)
AV_URL32=http://ffmpeg.zeranoe.com/builds/win32/dev/$(AV_W32)
AV_URL64=http://ffmpeg.zeranoe.com/builds/win64/dev/$(AV_W64)
AV_PRE32=$(AV_VER)-win32-dev/
AV_PRE64=$(AV_VER)-win64-dev/
ifeq ($(findstring win,$(FTE_TARGET)),win)
AV_BASE=$(OUT_DIR)/../fte_libav_$(AV_VER)/
AV_BASE=$(abspath $(OUT_DIR)/../fte_libav_$(AV_VER))/
endif
ifneq ($(AV_BASE),)
@ -142,6 +142,7 @@ else
endif
AVPLUG_OBJS= avplug/avaudio.c avplug/avencode.c avplug/avdecode.c plugin.c qvm_api.c
ifeq ($(FTE_TARGET),win32)
#NATIVE_PLUGINS+=ffmpeg
endif
@ -157,16 +158,17 @@ $(AV_BASE)libavformat/avformat.h:
mkdir -p $(AV_BASE)libavutil && cd $(AV_BASE)libavutil && $(AV_EXTRACT) ../$(AV_W32) $(AV_PRE32)include/libavutil/* && cd -
mkdir -p $(AV_BASE)libswscale && cd $(AV_BASE)libswscale && $(AV_EXTRACT) ../$(AV_W32) $(AV_PRE32)include/libswscale/* && cd -
mkdir -p $(AV_BASE)lib32 && cd $(AV_BASE)lib32 && $(AV_EXTRACT) ../$(AV_W32) $(AV_PRE32)lib/avformat.lib $(AV_PRE32)lib/avcodec.lib $(AV_PRE32)lib/avutil.lib $(AV_PRE32)lib/swscale.lib && cd -
rm $(AV_BASE)$(AV_W32)
#rm $(AV_BASE)$(AV_W32)
cd $(AV_BASE) && wget -N $(AV_URL64)
mkdir -p $(AV_BASE)lib64 && cd $(AV_BASE)lib64 && $(AV_EXTRACT) ../$(AV_W64) $(AV_PRE64)lib/avformat.lib $(AV_PRE64)lib/avcodec.lib $(AV_PRE64)lib/avutil.lib $(AV_PRE64)lib/swscale.lib && cd -
rm $(AV_BASE)$(AV_W64)
#rm $(AV_BASE)$(AV_W64)
distclean:
rm $(AV_BASE)libavformat/avformat.h
$(OUT_DIR)/fteplug_ffmpeg$(PLUG_NATIVE_EXT): $(AV_DEP)
AVPLUG_OBJS= avplug/avaudio.c avplug/avencode.c avplug/avdecode.c plugin.c qvm_api.c
$(OUT_DIR)/fteplug_ffmpeg$(PLUG_NATIVE_EXT): avplug/avencode.c avplug/avdecode.c avplug/avaudio.c plugin.c qvm_api.c
$(OUT_DIR)/fteplug_ffmpeg$(PLUG_NATIVE_EXT): $(AVPLUG_OBJS)
$(CC) $(BASE_CFLAGS) $(CFLAGS) -DFTEPLUGIN -s -o $@ -shared $(PLUG_CFLAGS) $(AV_CFLAGS) $(AVPLUG_OBJS) $(PLUG_DEFFILE) $(PLUG_LDFLAGS) $(AV_LDFLAGS)
#small script for ode
@ -182,7 +184,7 @@ ODE_BASE=$(OUT_DIR)/../ode-$(ODE_VER)_$(ODE_ARCH)/
ODE_LIB=$(ODE_BASE)ode-$(ODE_VER)/ode/src/.libs/libode.a
$(OUT_DIR)/../ode-$(ODE_VER).tar.gz:
mkdir -p $(ODE_BASE)
wget $(ODE_URL) -O $@
cd $(OUT_DIR)/.. && wget -N $(ODE_URL)
$(ODE_LIB): $(OUT_DIR)/../ode-$(ODE_VER).tar.gz
mkdir -p $(ODE_BASE) && cd $(ODE_BASE) && tar xvfz $<
cd $(ODE_BASE)ode-$(ODE_VER)/ && ./bootstrap && ./configure --enable-double-precision --disable-demos --without-x --with-pic CC="$(CC) $(PLUG_CXXFLAGS)" CXX="$(CC) $(PLUG_CXXFLAGS)" --host=`$(CC) -dumpmachine` && make
@ -199,7 +201,7 @@ BULLET_BASE=$(OUT_DIR)/../bullet3-$(ODE_VER)_$(FTE_TARGET)/
BULLET_LIB=$(ODE_BASE)bullet3-$(ODE_VER)/ode/src/.libs/libode.a
$(OUT_DIR)/../bullet3-$(BULLET_VER).tar.gz:
mkdir -p $(BULLET_BASE)
wget $(BULLET_URL) -O $@
wget -N $(BULLET_URL) -O $@
$(BULLET_LIB): $(OUT_DIR)/../bullet3-$(BULLET_VER).tar.gz
mkdir -p $(BULLET_BASE) && cd $(BULLET_BASE) && tar xvfz $<
cd $(BULLET_BASE)bullet3-$(BULLET_VER)/ && ./bootstrap && ./configure --enable-double-precision --disable-demos --without-x CXX="$(CC)" CFLAGS="$(PLUG_CFLAGS)" CXXFLAGS="$(PLUG_CXXFLAGS)" --host=`$(CC) -dumpmachine` && make