-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
130 lines (87 loc) · 2.17 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#
# Makefile
#
#
# It is assumed that the directory that contains this makefile
# has been set as the working directory.
# Subdirectories that have their own Makefile
SUBDIRS = test dialyze ebin hdeps lib tsrc var
HEADER_FILES = $(wildcard include/*.hrl)
SOURCE = $(wildcard src/*.erl)
.PHONY: \
help \
test \
test-quick \
test-long \
test-perf \
dialyze \
game-cli \
game-xboard \
ics \
game-ics \
ebin \
hdeps \
lib \
eclipse-setup \
tsrc \
clean \
distclean \
files
help:
@echo "Targets in this makefile are:"
@echo ""
@echo "help This help"
@echo "test-quick Quick tests"
@echo "test-long Time-consuming tests"
@echo "test-perf Performance tests"
@echo "dialyze Check against type errors"
@echo "game-cli Play a game in the console"
@echo "game-xboard Play a game using xboard"
@echo "ics Launch multiplayer server"
@echo "game-ics Play game using the server"
@echo ""
@echo "eclipse-setup Adapt Eclipse C project setup to current Erlang environment"
@echo ""
@echo "tsrc Rebuild the tests tarball"
@echo "clean Remove most built objects"
@echo "distclean Remove all built objects"
@echo "files Report all files"
@echo ""
test-quick: ebin lib test
bin/batchtest_SUITE.sh quickTests
test-long: ebin lib test
bin/batchtest_SUITE.sh longTests
test-perf: ebin lib test
bin/batchtest_SUITE.sh performanceTests
test:
$(MAKE) -C $@
dialyze:
$(MAKE) -C $@
game-cli: ebin lib
bin/play.sh
game-xboard: ebin lib
bin/xboard-wrapper.sh
ics: ebin lib
bin/ics-wrapper.sh
game-ics: ebin lib
bin/xboard-wrapper.sh -m multi
ebin: hdeps ebin/module.mk
$(MAKE) -C $@ all
ebin/module.mk: $(SOURCE)
bin/deps.sh $@ >$@
hdeps: hdeps/header.mk
$(MAKE) -C $@ all
hdeps/header.mk: $(HEADER_FILES)
bin/deps.sh $@ >$@
lib:
$(MAKE) -C $@
tsrc:
$(MAKE) -C $@
eclipse-setup:
@echo -n "Close down Eclipse, then push Enter: " && read _
@bin/eclipse-setup.sh
clean distclean:
for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@; done
rm -f erl_crash.dump
files:
(find . -maxdepth 1 -type f |sed -e 's/^..//'; find [a-z]* -mindepth 1 -type f >&1) | sort