1 SCM := $(shell if [ -d .svn ]; then echo svn; elif [ -d ../.git ]; then echo git; fi)
3 QCCFLAGS_WATERMARK ?= -DWATERMARK='"$(shell git describe)"'
7 QCCVERSIONFILE := qccversion.$(shell (cd server && $(QCC) --version) > qccversion.txt && git hash-object qccversion.txt)
9 # We eventually need to get rid of these.
13 QCCFLAGS_FEATURES ?= \
14 -DVEHICLES_ENABLED=1 \
15 -DVEHICLES_USE_ODE=0 \
16 -DBUILD_MOD=$(BUILD_MOD)
18 # -Ooverlap-locals is required
26 -fftepp -flno -futf8 -fno-bail-on-werror -fftepp-predefs \
27 -frelaxed-switch -freturn-assignments \
28 $(QCCFLAGS_WATERMARK) \
30 $(QCCFLAGS_FEATURES) \
33 # xonotic build system overrides this by command line argument to turn off the update-cvarcount step
40 qc: ../menu.dat ../progs.dat ../csprogs.dat
44 rm -f ../progs.dat ../menu.dat ../csprogs.dat
48 echo This file intentionally left blank. > $@
50 FILES_CSPROGS = $(shell find lib common client -type f)
51 ../csprogs.dat: $(FILES_CSPROGS) $(QCCVERSIONFILE)
52 @echo make[1]: Entering directory \`$(PWD)/client\'
53 cd client && $(QCC) $(QCCFLAGS) -DCSQC -o ../../csprogs.dat progs.inc
55 FILES_PROGS = $(shell find lib common server -type f)
56 ../progs.dat: $(FILES_PROGS) $(QCCVERSIONFILE)
57 @echo make[1]: Entering directory \`$(PWD)/server\'
58 cd server && $(QCC) $(QCCFLAGS) -DSVQC -o ../../progs.dat progs.inc
60 FILES_MENU = $(shell find lib common menu -type f)
61 ../menu.dat: $(FILES_MENU) $(QCCVERSIONFILE)
62 @echo make[1]: Entering directory \`$(PWD)/menu\'
63 cd menu && $(QCC) $(QCCFLAGS) -DMENUQC -o ../../menu.dat progs.inc
67 cd testcase && $(QCC) $(QCCFLAGS) -DTESTCASE="$$TESTCASE"