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