]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/Makefile
Merge branch 'master' into sev/luma
[xonotic/xonotic-data.pk3dir.git] / qcsrc / Makefile
1 SCM := $(shell if [ -d .svn ]; then echo svn; elif [ -d ../.git ]; then echo git; fi)
2 PERL ?= perl
3 QCCFLAGS_WATERMARK ?= -DWATERMARK='"$(shell git describe)"'
4 QCC ?= gmqcc
5
6 QCCVERSIONFILE := qccversion.$(shell (cd server && $(QCC) --version) > qccversion.txt && git hash-object qccversion.txt)
7
8 # We eventually need to get rid of these.
9 QCCFLAGS_WTFS ?= \
10         -Wno-field-redeclared \
11         -Wno-double-declaration \
12
13 QCCFLAGS ?= \
14         -std=gmqcc \
15         -O3 -flno \
16         -Werror -fno-bail-on-werror -Wall \
17         -fftepp -fftepp-predefs -Wcpp -futf8 \
18         $(QCCFLAGS_WTFS) \
19         $(QCCFLAGS_EXTRA) $(QCCFLAGS_WATERMARK)
20
21 # xonotic build system overrides this by command line argument to turn off the update-cvarcount step
22 XON_BUILDSYSTEM =
23
24 all: qc
25 .PHONY: all
26
27 .PHONY: qc
28 qc: ../menu.dat ../progs.dat ../csprogs.dat
29
30 .PHONY: clean
31 clean:
32         rm -f ../progs.dat ../menu.dat ../csprogs.dat server/precache-for-csqc.inc
33
34 $(QCCVERSIONFILE):
35         $(RM) qccversion.*
36         echo This file intentionally left blank. > $@
37
38 FILES_CSPROGS = $(shell find client common warpzonelib csqcmodellib -type f -not -name fteqcc.log -not -name qc.asm)
39 ../csprogs.dat: $(FILES_CSPROGS) $(QCCVERSIONFILE)
40         @echo make[1]: Entering directory \`$(PWD)/client\'
41         cd client && $(QCC) $(QCCFLAGS)
42
43 server/precache-for-csqc.inc: $(FILES_CSPROGS)
44         sh collect-precache.sh
45
46 FILES_PROGS = $(shell find server common warpzonelib csqcmodellib -type f -not -name fteqcc.log -not -name qc.asm)
47 ../progs.dat: $(FILES_PROGS) $(QCCVERSIONFILE) server/precache-for-csqc.inc
48         @echo make[1]: Entering directory \`$(PWD)/server\'
49         cd server && $(QCC) $(QCCFLAGS)
50
51 FILES_MENU = $(shell find menu common warpzonelib -type f -not -name fteqcc.log -not -name qc.asm)
52 ../menu.dat: $(FILES_MENU) $(QCCVERSIONFILE)
53         @echo make[1]: Entering directory \`$(PWD)/menu\'
54         cd menu && $(QCC) $(QCCFLAGS)
55
56 .PHONY: testcase
57 testcase:
58         cd testcase && $(QCC) $(QCCFLAGS) -DTESTCASE="$$TESTCASE"