-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (55 loc) · 1.35 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
SRC = src
OUTDIR = bin
DOC = doc
RES = res
README = README.md
MAKEFILE = Makefile
DANAUS = $(wildcard $(SRC)/danaus/*.java)
STUDENT = $(wildcard $(SRC)/student/*.java)
BUTT =
ARGS =
A3 = $(DOC) \
$(README) \
$(MAKEFILE) \
$(RES) \
$(DANAUS) \
src/student/Butterfly.java \
src/student/package-info.java \
src/student/RandomButterfly.java
A6 = $(DOC) \
$(README) \
$(MAKEFILE) \
$(RES) \
$(DANAUS) \
src/student/Butterfly.java \
src/student/package-info.java \
src/student/RandomButterfly.java
.PHONY: build clean doc run headless testmaps a3 a6
all: build
build: $(OUTDIR)
run: build
cd $(OUTDIR) && java danaus.Simulator $(BUTT) $(ARGS)
headless: build
cd $(OUTDIR) && java danaus.Simulator -h $(BUTT) $(ARGS)
testmaps:
cd $(OUTDIR); \
for map in `ls ../res/maps/*.xml`; do \
echo $$map; \
java danaus.Simulator -h $(BUTT) -f $$map; \
echo ""; \
done
a3: a3.jar
a3.jar:
jar cf a3.jar $(A3)
a6: a6.jar
a6.jar:
jar cf a6.jar $(A6)
$(OUTDIR): $(DANAUS) $(STUDENT)
test -d $(OUTDIR) || mkdir $(OUTDIR)
javac -d $(OUTDIR) $(DANAUS) $(STUDENT)
doc:
cd doc && make
clean:
! test -d $(OUTDIR) || rm -r $(OUTDIR)
-rm -f *.jar
cd doc && make clean