oops, forgot this $(RM) command
[divverent/nexuiz.git] / data / Makefile
1 FTEQCC ?= fteqcc
2 PERL ?= perl
3 PK3NAME ?= `date +../data%Y%m%d.pk3`
4 ZIP ?= 7za a -tzip -mx=9
5
6 all: qc
7
8 .PHONY: qc
9 qc: menu.dat progs.dat
10
11 .PHONY: skin
12 skin: gfx/menu/default/skinvalues.txt
13
14 .PHONY: pk3
15 pk3: $(PK3NAME)
16
17 .PHONY: clean
18 clean:
19         rm -f progs.dat menu.dat csprogs.dat
20
21 csprogs.dat: qcsrc/client/*.* qcsrc/common/*.*
22         ( cd qcsrc/client; $(FTEQCC) )
23
24 progs.dat: qcsrc/server/*.* qcsrc/common/*.*
25         ( cd qcsrc/server; $(FTEQCC) )
26
27 menu.dat: qcsrc/menu/*.* qcsrc/menu/*/*.* qcsrc/common/*.*
28         ( cd qcsrc/menu; $(FTEQCC) )
29
30 gfx/menu/default/skinvalues.txt: qcsrc/menu/skin-customizables.inc
31         $(PERL) qcsrc/menu/skin-customizables.inc > gfx/menu/default/skinvalues.txt
32
33 $(PK3NAME): qc
34         $(RM) $(PK3NAME)
35         set -ex; \
36                 ABSPK3NAME=$(PK3NAME); \
37                 case $$ABSPK3NAME in \
38                         /*) \
39                                 ;; \
40                         *) \
41                                 ABSPK3NAME=$$PWD/$$ABSPK3NAME; \
42                                 ;; \
43                 esac; \
44                 TDIR=`mktemp -d -t nexuizpk3.XXXXXX`; \
45                 svn export --force . $$TDIR; \
46                 cd $$TDIR; \
47                 $(RM) -r qcsrc common-spog.pk3 \
48                 $(ZIP) $$ABSPK3NAME .