1 QCCFLAGS_WATERMARK ?= $(shell git describe --tags --dirty=*)
5 PROGS_OUT ?= $(CURDIR)/..
9 ifneq ($(shell which zip),)
12 ifneq ($(shell which 7za),)
13 Zip := 7za a -tzip -mx=9
16 $(error "No zip in ($(PATH))")
20 QCCVERSIONFILE := qccversion.$(shell (cd server && $(QCC) --version) > qccversion.txt && git hash-object qccversion.txt)
22 # We eventually need to get rid of these
27 -DWATERMARK="$(QCCFLAGS_WATERMARK)" \
29 -DBUILD_MOD=$(BUILD_MOD) \
32 # -Ooverlap-locals is required
39 -flno -futf8 -fno-bail-on-werror \
40 -frelaxed-switch -freturn-assignments \
43 # xonotic build system overrides this by command line argument to turn off the update-cvarcount step
50 qc: $(PROGS_OUT)/menu.dat $(PROGS_OUT)/progs.dat $(PROGS_OUT)/csprogs.dat
55 $(eval VER=${QCCFLAGS_WATERMARK})
56 $(eval PK3=${PROG}-${VER}.pk3)
57 $(eval TXT=${PROG}-${VER}.txt)
58 $(eval DAT=${PROG}-${VER}.dat)
59 $(eval LNO=${PROG}-${VER}.lno)
60 @ echo "http://xonotic.org" > ${TXT}
61 @ ln -f $(PROGS_OUT)/${PROG}.dat ${DAT}
62 @ ln -f $(PROGS_OUT)/${PROG}.lno ${LNO}
64 $(Zip) ${PK3} ${TXT} ${DAT} ${LNO}
65 @ rm ${TXT} ${DAT} ${LNO}
72 rm -f $(PROGS_OUT)/csprogs.dat
73 rm -f $(PROGS_OUT)/progs.dat
74 rm -f $(PROGS_OUT)/menu.dat
81 echo This file intentionally left blank. > $@
88 $(PROGS_OUT)/csprogs.dat: client/progs.inc $(QCCVERSIONFILE) | dirtree
89 @echo make[1]: Entering directory \`$(PWD)/client\'
90 sh ./qcc.sh client $@ $<
91 -include ../.tmp/client.d
93 $(PROGS_OUT)/progs.dat: server/progs.inc $(QCCVERSIONFILE) | dirtree
94 @echo make[1]: Entering directory \`$(PWD)/server\'
95 sh ./qcc.sh server $@ $<
96 -include ../.tmp/server.d
98 $(PROGS_OUT)/menu.dat: menu/progs.inc $(QCCVERSIONFILE) | dirtree
99 @echo make[1]: Entering directory \`$(PWD)/menu\'
100 sh ./qcc.sh menu $@ $<
101 -include ../.tmp/menu.d
105 cd testcase && $(QCC) $(QCCDEFS) $(QCCFLAGS) -DTESTCASE="$$TESTCASE"