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
42 rm -f progs.d menu.d csprogs.d
46 echo This file intentionally left blank. > $@
48 ../csprogs.dat: client/progs.inc $(QCCVERSIONFILE)
49 @$(CC) -MM -MP -MF csprogs.d -MT $@ -x c -DCSQC -o $@ $<
50 @echo make[1]: Entering directory \`$(PWD)/client\'
51 cd client && $(QCC) $(QCCFLAGS) -DCSQC -o ../$@ ../$<
54 ../progs.dat: server/progs.inc $(QCCVERSIONFILE)
55 @$(CC) -MM -MP -MF progs.d -MT $@ -x c -DSVQC -o $@ $<
56 @echo make[1]: Entering directory \`$(PWD)/server\'
57 cd server && $(QCC) $(QCCFLAGS) -DSVQC -o ../$@ ../$<
60 ../menu.dat: menu/progs.inc $(QCCVERSIONFILE)
61 @$(CC) -MM -MP -MF menu.d -MT $@ -x c -DMENUQC -o $@ $<
62 @echo make[1]: Entering directory \`$(PWD)/menu\'
63 cd menu && $(QCC) $(QCCFLAGS) -DMENUQC -o ../$@ ../$<
68 cd testcase && $(QCC) $(QCCFLAGS) -DTESTCASE="$$TESTCASE"