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 -DBUILD_MOD=$(BUILD_MOD)
16 # -Ooverlap-locals is required
23 -fftepp -flno -futf8 -fno-bail-on-werror -fftepp-predefs \
24 -frelaxed-switch -freturn-assignments \
25 $(QCCFLAGS_WATERMARK) \
27 $(QCCFLAGS_FEATURES) \
30 # xonotic build system overrides this by command line argument to turn off the update-cvarcount step
37 qc: ../menu.dat ../progs.dat ../csprogs.dat
41 rm -f ../progs.dat ../menu.dat ../csprogs.dat
45 echo This file intentionally left blank. > $@
47 FILES_CSPROGS = $(shell find lib common client -type f)
48 ../csprogs.dat: $(FILES_CSPROGS) $(QCCVERSIONFILE)
49 @echo make[1]: Entering directory \`$(PWD)/client\'
50 cd client && $(QCC) $(QCCFLAGS) -DCSQC -o ../../csprogs.dat progs.inc
52 FILES_PROGS = $(shell find lib common server -type f)
53 ../progs.dat: $(FILES_PROGS) $(QCCVERSIONFILE)
54 @echo make[1]: Entering directory \`$(PWD)/server\'
55 cd server && $(QCC) $(QCCFLAGS) -DSVQC -o ../../progs.dat progs.inc
57 FILES_MENU = $(shell find lib common menu -type f)
58 ../menu.dat: $(FILES_MENU) $(QCCVERSIONFILE)
59 @echo make[1]: Entering directory \`$(PWD)/menu\'
60 cd menu && $(QCC) $(QCCFLAGS) -DMENUQC -o ../../menu.dat progs.inc
64 cd testcase && $(QCC) $(QCCFLAGS) -DTESTCASE="$$TESTCASE"