This prevents players who download the source code to build and play
from using an unoptimized debug build by forgetting to pass the `-r`
switch.
Compiling a debug build is now done by passing `-d`.
The `-r` flag is still supported for compatibility with existing
scripts.
-DESTDIR ?=
+DESTDIR ?=
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
LIBDIR ?= $(PREFIX)/lib/xonotic
.PHONY: all-git
all-git:
- ./all compile -r
+ ./all compile
.PHONY: all-zip-binary
all-zip-binary:
cd xonotic
./all clean -m -fU -D
# like reclone but do not delete untracked, so q3map2.x86 compile stays
-./all compile -r
+./all compile
export DRIVER=soft
#export DRIVERFLAGS="+gl_texturecompression 1 -nofbo"
#export DRIVERFLAGS="+gl_texturecompression 1"
cleanqcc=false
cleanqc=false
compiled0=
- debug=debug
+ debug=release
if [ -z "$CC" ]; then
export CC="gcc"
fi
cleanqc=true
shift
;;
- -r|-p)
+ -d|-p|-r)
case "$1" in
+ -d)
+ debug=debug
+ ;;
-p)
debug=profile
;;
fi
;;
help)
- $ECHO " $SELF compile [-c] [-qc] [-r|-p] [-0] [-1] [sdl|glx|dedicated]"
+ $ECHO " $SELF compile [-c] [-qc] [-d|-p|-r] [-0] [-1] [sdl|glx|dedicated]"
$ECHO " $SELF update-maps"
$ECHO " $SELF run [sdl|glx|dedicated] options..."
$ECHO " $SELF compile-map mapname1 mapname2... (e.g. \"./all compile-map dance drain fuse\")"
"-1[don't compile d0_blind_id]" \
'-c[clean all before building]' \
'-qc[clean QuakeC binaries]' \
- - '(release)' \
- '-r[build in release mode]' \
+ - '(debug)' \
+ '-d[build in debug mode]' \
- '(profile)' \
- '-p[build in profile mode]' && ret=0
+ '-p[build in profile mode]' \
+ - '(release)' \
+ '-r[build in release mode (default)]' && ret=0
;;
compile-map)
if [ -f ./all ]; then
./all clean -fU -m -r
- ./all compile -r
+ ./all compile
export USE_GDB=no
set -- ./all run "$@"
elif [ -z "$*" ]; then