]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/Makefile
fix lots of more uninitialized stuff
[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 ?= fteqcc
5
6 VERSION_MESSAGE = $(shell $(QCC) --version --help)
7 ifneq (,$(findstring GMQCC,$(VERSION_MESSAGE)))
8 # this is gmqcc
9 QCCFLAGS ?= -Werror -Wall -Wno-field-redeclared -Wno-double-declaration -Wno-assign-function-types -Wno-unused-variable -std=fteqcc -O1 -fshort-logic -ftranslatable-strings -flno $(QCCFLAGS_EXTRA) $(QCCFLAGS_WATERMARK)
10 else
11 # this. is. fteqccccccccccccccccccc!
12 QCCFLAGS ?= -Werror -Wno-Q302 -O3 -Ono-return_only -fno-fastarrays $(QCCFLAGS_EXTRA) $(QCCFLAGS_WATERMARK)
13 endif
14
15 # xonotic build system overrides this by command line argument to turn off the update-cvarcount step
16 XON_BUILDSYSTEM =
17
18 all: qc
19
20 .PHONY: qc
21 qc:
22         $(MAKE) qc-recursive
23
24 .PHONY: qc-recursive
25 qc-recursive: ../menu.dat ../progs.dat ../csprogs.dat
26
27 .PHONY: clean
28 clean:
29         rm -f ../progs.dat ../menu.dat ../csprogs.dat
30
31 FILES_CSPROGS = $(shell find client common warpzonelib csqcmodellib -type f -not -name fteqcc.log -not -name qc.asm) $(wildcard server/w_*.qc)
32 ../csprogs.dat: $(FILES_CSPROGS)
33         @echo make[1]: Entering directory \`$(PWD)/client\'
34         cd client && $(QCC) $(QCCFLAGS)
35
36 FILES_PROGS = $(shell find server common warpzonelib csqcmodellib -type f -not -name fteqcc.log -not -name qc.asm) $(wildcard server/w_*.qc)
37 ../progs.dat: $(FILES_PROGS)
38         @echo make[1]: Entering directory \`$(PWD)/server\'
39         cd server && $(QCC) $(QCCFLAGS)
40
41 FILES_MENU = $(shell find menu common warpzonelib -type f -not -name fteqcc.log -not -name qc.asm) $(wildcard server/w_*.qc)
42 ../menu.dat: $(FILES_MENU)
43         @echo make[1]: Entering directory \`$(PWD)/menu\'
44         cd menu && $(QCC) $(QCCFLAGS)
45
46 .PHONY: testcase
47 testcase:
48         cd testcase && $(QCC) $(QCCFLAGS) -DTESTCASE="$$TESTCASE"