forked from devdsp/tanks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (47 loc) · 1.24 KB
/
Makefile
File metadata and controls
55 lines (47 loc) · 1.24 KB
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
48
49
50
51
52
53
54
55
BINARIES = forftanks designer.cgi
HTML = forf.html procs.html intro.html designer.html chord.html
WWW = style.css grunge.png designer.js figures.js tanks.js nav.html.inc
SCRIPTS = killmatrix.pl rank.awk summary.awk winner.awk
CFLAGS = -Wall -std=gnu90 -g
all: $(BINARIES) $(HTML)
forftanks: forftanks.o ctanks.o forf.o tankdir.o tankjson.o
forftanks: LDLIBS = -lm -ljansson
forftanks.o: forf.h ctanks.h tankdef.h tankdir.h tankjson.h
forf.o: forf.c forf.h
ctanks.o: ctanks.h
tankdir.o: tankdef.h tankdir.h
tankjson.o: tankdef.h tankjson.h
%.html: %.html.m4
m4 $< > $@
.PHONY: install clean check-env
install: check-env
install -d $(DESTDIR)/bin
install run-tanks $(DESTDIR)/bin
install forftanks $(DESTDIR)/bin
install $(SCRIPTS) $(DESTDIR)/bin
install -d $(DOCROOT)
install designer.cgi $(CGIBIN)
install $(HTML) $(DOCROOT)
install $(WWW) $(DOCROOT)
cp -r examples $(DOCROOT)/examples
clean:
rm -f *.o next-round round-*.html round-*.json results-*.txt current.html
rm -f $(BINARIES) $(HTML)
check-env:
ifndef DESTDIR
$(error DESTDIR is undefined)
endif
ifndef DOCROOT
ifndef DESTDIR
$(error DOCROOT is undefined)
else
DOCROOT = $(DESTDIR)
endif
endif
ifndef CGIBIN
ifndef DESTDIR
$(error CGIBIN is undefined)
else
CGIBIN = $(DESTDIR)
endif
endif