Add build.cfg source, for configurable builds using the build_*.sh scripts.
This commit is contained in:
parent
fc63f9af55
commit
75f97827dc
5 changed files with 63 additions and 17 deletions
26
build.cfg
Executable file
26
build.cfg
Executable file
|
@ -0,0 +1,26 @@
|
|||
# Nuclide build config environment
|
||||
# Don't ship this with your application!
|
||||
|
||||
# Build the engine using the SDL2 instead of the native backend
|
||||
BUILD_SDL2=1
|
||||
|
||||
# Build the engine with debug information
|
||||
BUILD_DEBUG=0
|
||||
|
||||
# Clean compile, removing old object files
|
||||
BUILD_CLEAN=0
|
||||
|
||||
# Build any deps the engine requires and statically link them into the binary
|
||||
BUILD_ENGINE_DEPENDENCIES=1
|
||||
|
||||
# Build the bullet physics plugin, required for prop_physics and other entities
|
||||
BUILD_BULLET=1
|
||||
|
||||
# Build ffmpeg, required for video, flac and menu header playback
|
||||
BUILD_FFMPEG=1
|
||||
|
||||
# Build the IQM/VVM model exporter our skeletal animation based model format of choice
|
||||
BUILD_IQMTOOL=1
|
||||
|
||||
# Build the imgtool which analysis images and compresses them for GPUs
|
||||
BUILD_IMGTOOL=1
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/sh
|
||||
source ./build.cfg
|
||||
./build_engine.sh
|
||||
./get_gamepacks.sh
|
||||
./build_game.sh
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/sh
|
||||
source ./build.cfg
|
||||
|
||||
mv_wsfile()
|
||||
{
|
||||
|
@ -24,15 +25,19 @@ else
|
|||
BUILD_PROC=$(nproc)
|
||||
fi
|
||||
|
||||
if [ "$BUILD_DEBUG" -eq 1 ]; then
|
||||
WS_CFLAGS="-g "
|
||||
fi
|
||||
|
||||
# handle search directories and platform specific libraries
|
||||
if [[ "$COMPILE_SYS" == "OpenBSD" ]]; then
|
||||
WS_CFLAGS="-I/usr/local/include -I/usr/local/include/gtkglext-1.0 -I/usr/local/lib/gtkglext-1.0/include -I/usr/local/include/libxml2/"
|
||||
WS_LDFLAGS="-L/usr/local/lib"
|
||||
WS_CFLAGS+="-I/usr/local/include -I/usr/local/include/gtkglext-1.0 -I/usr/local/lib/gtkglext-1.0/include -I/usr/local/include/libxml2/"
|
||||
WS_LDFLAGS+="-L/usr/local/lib"
|
||||
WS_CC=cc
|
||||
WS_CXX=c++
|
||||
else
|
||||
WS_CFLAGS=""
|
||||
WS_LDFLAGS="-ldl"
|
||||
WS_CFLAGS+=""
|
||||
WS_LDFLAGS+="-ldl"
|
||||
WS_CC=gcc
|
||||
WS_CXX=g++
|
||||
fi
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
#!/bin/sh
|
||||
source ./build.cfg
|
||||
set -e
|
||||
|
||||
FTE_MAKEFILE=./src/engine/engine/Makefile
|
||||
BUILD_SDL2=0
|
||||
BUILD_DEBUG=1
|
||||
COMPILE_SYS=$(uname)
|
||||
|
||||
# Check how many cores/processors we should use for building
|
||||
|
@ -28,7 +27,7 @@ fi
|
|||
|
||||
if [ "$BUILD_SDL2" -eq 1 ]; then
|
||||
PLATFORM=SDL2
|
||||
OUTPUT=$OUTPUT/fteqw64-sdl2
|
||||
OUTPUT=$OUTPUT/fteqw-glsdl2
|
||||
else
|
||||
if [[ "$COMPILE_SYS" == "CYGWIN_NT-10.0" ]] || [[ "$COMPILE_SYS" == "CYGWIN_NT-6.1-WOW64" ]]; then
|
||||
PLATFORM=win64
|
||||
|
@ -71,11 +70,14 @@ else
|
|||
cd ./engine/engine
|
||||
fi
|
||||
|
||||
if [ "$BUILD_CLEAN" ]; then
|
||||
if [ "$BUILD_CLEAN" -eq 1 ]; then
|
||||
gmake clean
|
||||
fi
|
||||
|
||||
gmake -j $BUILD_PROC makelibs FTE_TARGET=$PLATFORM
|
||||
if [ "$BUILD_ENGINE_DEPENDENCIES" -eq 1 ]; then
|
||||
gmake -j $BUILD_PROC makelibs FTE_TARGET=$PLATFORM
|
||||
fi
|
||||
|
||||
gmake -j $BUILD_PROC $MAKETARGET FTE_TARGET=$PLATFORM
|
||||
cp -v "$OUTPUT" ../../../bin/fteqw
|
||||
|
||||
|
@ -83,13 +85,24 @@ gmake -j $BUILD_PROC sv-dbg
|
|||
cp -v ./debug/fteqw-sv ../../../bin/fteqw-sv
|
||||
gmake -j $BUILD_PROC qcc-rel
|
||||
cp -v ./release/fteqcc ../../../bin/fteqcc
|
||||
gmake -j $BUILD_PROC iqm-rel
|
||||
cp -v ./release/iqm ../../../bin/iqm
|
||||
gmake -j $BUILD_PROC imgtool-rel
|
||||
cp -v ./release/imgtool ../../../bin/imgtool
|
||||
#gmake -j $BUILD_PROC plugins-rel NATIVE_PLUGINS="bullet"
|
||||
#find ./release/ -name 'fteplug_bullet_*.so' -exec cp -prv '{}' '../../../bin/' ';'
|
||||
gmake -j $BUILD_PROC plugins-rel NATIVE_PLUGINS="ffmpeg"
|
||||
find ./release/ -name 'fteplug_ffmpeg_*.so' -exec cp -prv '{}' '../../../bin/' ';'
|
||||
|
||||
|
||||
if [ "$BUILD_IQMTOOL" -eq 1 ]; then
|
||||
gmake -j $BUILD_PROC iqm-rel
|
||||
cp -v ./release/iqm ../../../bin/iqm
|
||||
fi
|
||||
|
||||
if [ "$BUILD_IMGTOOL" -eq 1 ]; then
|
||||
gmake -j $BUILD_PROC imgtool-rel
|
||||
cp -v ./release/imgtool ../../../bin/imgtool
|
||||
fi
|
||||
|
||||
if [ "$BUILD_BULLET" -eq 1 ]; then
|
||||
gmake -j $BUILD_PROC plugins-rel NATIVE_PLUGINS="bullet"
|
||||
find ./release/ -name 'fteplug_bullet_*.so' -exec cp -prv '{}' '../../../bin/' ';'
|
||||
fi
|
||||
|
||||
if [ "$BUILD_FFMPEG" -eq 1 ]; then
|
||||
gmake -j $BUILD_PROC plugins-rel NATIVE_PLUGINS="ffmpeg"
|
||||
find ./release/ -name 'fteplug_ffmpeg_*.so' -exec cp -prv '{}' '../../../bin/' ';'
|
||||
fi
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/sh
|
||||
source ./build.cfg
|
||||
set -e
|
||||
SCRPATH="$( cd "$( dirname $(readlink -nf $0) )" && pwd )"
|
||||
PATH="$SCRPATH"/bin:"$PATH"
|
||||
|
|
Loading…
Reference in a new issue