1 SCM := $(shell if [ -d .svn ]; then echo svn; elif [ -d ../.git ]; then echo git; fi)
3 QCCFLAGS_WATERMARK ?= $(shell git describe)
7 PROGS_OUT ?= $(CURDIR)/..
10 QCCVERSIONFILE := qccversion.$(shell (cd server && $(QCC) --version) > qccversion.txt && git hash-object qccversion.txt)
12 # We eventually need to get rid of these
17 -DWATERMARK="$(QCCFLAGS_WATERMARK)" \
19 -DBUILD_MOD=$(BUILD_MOD) \
22 # -Ooverlap-locals is required
29 -flno -futf8 -fno-bail-on-werror \
30 -frelaxed-switch -freturn-assignments \
33 # xonotic build system overrides this by command line argument to turn off the update-cvarcount step
40 qc: $(PROGS_OUT)/menu.dat $(PROGS_OUT)/progs.dat $(PROGS_OUT)/csprogs.dat
44 rm -f $(PROGS_OUT)/csprogs.dat
45 rm -f $(PROGS_OUT)/progs.dat
46 rm -f $(PROGS_OUT)/menu.dat
53 echo This file intentionally left blank. > $@
60 $(PROGS_OUT)/csprogs.dat: client/progs.inc $(QCCVERSIONFILE)
61 @echo make[1]: Entering directory \`$(PWD)/client\'
62 sh ./qcc.sh client $@ $<
63 -include ../.tmp/client.d
65 $(PROGS_OUT)/progs.dat: server/progs.inc $(QCCVERSIONFILE)
66 @echo make[1]: Entering directory \`$(PWD)/server\'
67 sh ./qcc.sh server $@ $<
68 -include ../.tmp/server.d
70 $(PROGS_OUT)/menu.dat: menu/progs.inc $(QCCVERSIONFILE)
71 @echo make[1]: Entering directory \`$(PWD)/menu\'
72 sh ./qcc.sh menu $@ $<
73 -include ../.tmp/menu.d
77 cd testcase && $(QCC) $(QCCDEFS) $(QCCFLAGS) -DTESTCASE="$$TESTCASE"