]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/Makefile
Remove NOTIFICATIONS_DEBUG flag from compile
[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)"' -DCVAR_POPCON=1
4 QCC ?= gmqcc
5
6 QCCVERSIONFILE := qccversion.$(shell $(QCC) --version > qccversion.txt && git hash-object qccversion.txt)
7
8 QCCFLAGS ?= \
9         -std=fteqcc \
10         -Werror -Wall \
11         -Wcpp \
12         -Wno-field-redeclared \
13         -Wno-double-declaration \
14         -Wno-uninitialized-global \
15         -O3 \
16         -fadjust-vector-fields \
17         -fftepp \
18         -fftepp-predefs \
19         -frelaxed-switch \
20         -fshort-logic \
21         -fno-perl-logic \
22         -ftranslatable-strings \
23         -fno-initialized-nonconstants \
24         -fno-assign-function-types \
25         -flno \
26         -fcorrect-ternary \
27         -fno-single-vector-defs \
28         -fcorrect-logic \
29         -ftrue-empty-strings \
30         -fno-false-empty-strings \
31         -futf8 \
32         -fno-bail-on-werror \
33         -floop-labels \
34         -funtyped-nil \
35         -fno-permissive \
36         -fvariadic-args \
37         $(QCCFLAGS_EXTRA) $(QCCFLAGS_WATERMARK)
38
39 # xonotic build system overrides this by command line argument to turn off the update-cvarcount step
40 XON_BUILDSYSTEM =
41
42 all: qc
43
44 .PHONY: qc
45 qc:
46         $(MAKE) qc-recursive
47
48 .PHONY: qc-recursive
49 qc-recursive: ../menu.dat ../progs.dat ../csprogs.dat
50
51 .PHONY: clean
52 clean:
53         rm -f ../progs.dat ../menu.dat ../csprogs.dat server/precache-for-csqc.inc
54
55 $(QCCVERSIONFILE):
56         $(RM) qccversion.*
57         echo This file intentionally left blank. > $@
58
59 FILES_CSPROGS = $(shell find client common warpzonelib csqcmodellib -type f -not -name fteqcc.log -not -name qc.asm) $(wildcard server/w_*.qc)
60 ../csprogs.dat: $(FILES_CSPROGS) $(QCCVERSIONFILE)
61         @echo make[1]: Entering directory \`$(PWD)/client\'
62         cd client && $(QCC) $(QCCFLAGS)
63
64 server/precache-for-csqc.inc: $(FILES_CSPROGS)
65         sh collect-precache.sh
66
67 FILES_PROGS = $(shell find server common warpzonelib csqcmodellib -type f -not -name fteqcc.log -not -name qc.asm) $(wildcard server/w_*.qc)
68 ../progs.dat: $(FILES_PROGS) $(QCCVERSIONFILE) server/precache-for-csqc.inc
69         @echo make[1]: Entering directory \`$(PWD)/server\'
70         cd server && $(QCC) $(QCCFLAGS)
71
72 FILES_MENU = $(shell find menu common warpzonelib -type f -not -name fteqcc.log -not -name qc.asm) $(wildcard server/w_*.qc)
73 ../menu.dat: $(FILES_MENU) $(QCCVERSIONFILE)
74         @echo make[1]: Entering directory \`$(PWD)/menu\'
75         cd menu && $(QCC) $(QCCFLAGS)
76
77 .PHONY: testcase
78 testcase:
79         cd testcase && $(QCC) $(QCCFLAGS) -DTESTCASE="$$TESTCASE"