-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (36 loc) · 828 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
MODDIR=$(QUAKEDIR)/conduit
PROGS=progs.dat
OUTPUT=$(MODDIR)/$(PROGS)
FGD=conduit.fgd
FGD_OUT=$(MODDIR)/$(FGD)
DEBUG=0
.PHONY: all chkdir install package clean
all: $(PROGS)
chkdir:
if [ -z "$(QUAKEDIR)" ] ; then\
echo ;\
echo "QUAKEDIR must be set!" ;\
echo ;\
exit 1;\
fi
install: chkdir all $(OUTPUT) $(FGD_OUT)
package: all $(PROGS) $(FGD)
mkdir -p build/conduit
cp $(PROGS) build/conduit/
cp $(FGD) build/conduit/
cp README.md build/conduit/
cd build && rm -f conduit.zip && zip -r conduit.zip conduit/
clean:
rm -f progs.dat
rm -f progs.lno
rm -rf build/
$(PROGS): *.qc progs.src
fteqcc -DDEBUG_MODE=$(DEBUG)
$(OUTPUT): $(PROGS) $(MODDIR)
cp $(PROGS) "$(OUTPUT)"
$(FGD_OUT): $(FGD) $(MODDIR)
cp $(FGD) "$(FGD_OUT)"
$(MODDIR):
if [ \! -e "$(MODDIR)" ] ; then\
mkdir "$(MODDIR)" ;\
fi