1 SCM := $(shell if [ -d .svn ]; then echo svn; elif [ -d ../.git ]; then echo git; fi)
3 QCCFLAGS_WATERMARK ?= $(shell git describe)
9 QCCVERSIONFILE := qccversion.$(shell (cd server && $(QCC) --version) > qccversion.txt && git hash-object qccversion.txt)
11 # We eventually need to get rid of these
16 -DWATERMARK="$(QCCFLAGS_WATERMARK)" \
18 -DBUILD_MOD=$(BUILD_MOD) \
21 # -Ooverlap-locals is required
28 -flno -futf8 -fno-bail-on-werror \
29 -frelaxed-switch -freturn-assignments \
32 # xonotic build system overrides this by command line argument to turn off the update-cvarcount step
39 qc: ../menu.dat ../progs.dat ../csprogs.dat
43 rm -f ../progs.dat ../menu.dat ../csprogs.dat
44 rm -f tmp/*.qc tmp/*.d tmp/*.txt
48 echo This file intentionally left blank. > $@
55 ../csprogs.dat: client/progs.inc $(QCCVERSIONFILE)
56 @echo make[1]: Entering directory \`$(PWD)/client\'
57 sh ./qcc.sh client $@ $<
60 ../progs.dat: server/progs.inc $(QCCVERSIONFILE)
61 @echo make[1]: Entering directory \`$(PWD)/server\'
62 sh ./qcc.sh server $@ $<
65 ../menu.dat: menu/progs.inc $(QCCVERSIONFILE)
66 @echo make[1]: Entering directory \`$(PWD)/menu\'
67 sh ./qcc.sh menu $@ $<
72 cd testcase && $(QCC) $(QCCDEFS) $(QCCFLAGS) -DTESTCASE="$$TESTCASE"