]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/Makefile
Merge branch 'terencehill/menu_remove_tab_title' of git://de.git.xonotic.org/xonotic...
[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
12 QCCFLAGS ?= \
13         -std=gmqcc \
14         -O3 -flno \
15         -Werror -fno-bail-on-werror -Wall \
16         -fftepp -fftepp-predefs -Wcpp -futf8 \
17         $(QCCFLAGS_WTFS) \
18         $(QCCFLAGS_FEATURES) \
19         $(QCCFLAGS_EXTRA) $(QCCFLAGS_WATERMARK)
20
21 QCCFLAGS_FEATURES ?= \
22         -DVEHICLES_ENABLED=1 \
23         -DVEHICLES_USE_ODE=0
24
25 # xonotic build system overrides this by command line argument to turn off the update-cvarcount step
26 XON_BUILDSYSTEM =
27
28 all: qc
29 .PHONY: all
30
31 .PHONY: qc
32 qc: ../menu.dat ../progs.dat ../csprogs.dat
33
34 .PHONY: clean
35 clean:
36         rm -f ../progs.dat ../menu.dat ../csprogs.dat server/precache-for-csqc.inc
37
38 $(QCCVERSIONFILE):
39         $(RM) qccversion.*
40         echo This file intentionally left blank. > $@
41
42 FILES_CSPROGS = $(shell find client common warpzonelib csqcmodellib -type f -not -name fteqcc.log -not -name qc.asm)
43 ../csprogs.dat: $(FILES_CSPROGS) $(QCCVERSIONFILE)
44         @echo make[1]: Entering directory \`$(PWD)/client\'
45         cd client && $(QCC) $(QCCFLAGS) -DCSQC
46
47 server/precache-for-csqc.inc: $(FILES_CSPROGS)
48         sh collect-precache.sh
49
50 FILES_PROGS = $(shell find server common warpzonelib csqcmodellib -type f -not -name fteqcc.log -not -name qc.asm)
51 ../progs.dat: $(FILES_PROGS) $(QCCVERSIONFILE) server/precache-for-csqc.inc
52         @echo make[1]: Entering directory \`$(PWD)/server\'
53         cd server && $(QCC) $(QCCFLAGS) -DSVQC
54
55 FILES_MENU = $(shell find menu common warpzonelib -type f -not -name fteqcc.log -not -name qc.asm)
56 ../menu.dat: $(FILES_MENU) $(QCCVERSIONFILE)
57         @echo make[1]: Entering directory \`$(PWD)/menu\'
58         cd menu && $(QCC) $(QCCFLAGS) -DMENUQC
59
60 .PHONY: testcase
61 testcase:
62         cd testcase && $(QCC) $(QCCFLAGS) -DTESTCASE="$$TESTCASE"