Mercurial > hg > ristipolku
comparison Makefile @ 18:4507a431b410
More work.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 31 Jan 2011 16:05:36 +0200 |
parents | 59ff451750fb |
children | df494a65bf8c |
comparison
equal
deleted
inserted
replaced
17:0dfa894b873d | 18:4507a431b410 |
---|---|
1 # Settings, directories | 1 # Settings, directories |
2 RUN=Ristipolku.class | 2 RUN=Ristipolku.class |
3 | 3 |
4 RESOURCES=graphics/board.png | 4 RESOURCES=graphics/board.png |
5 | 5 |
6 CLASSES=game/Piece.class game/PieceType.class game/Engine.class game/Interpolate.class | 6 CLASSES=game/Piece.java game/PieceType.java game/Engine.java game/Interpolate.java game/ResourceLoader.java |
7 | 7 |
8 # Utils | 8 # Utils |
9 JAVAC=javac -g | 9 JAVAC=javac -g |
10 APPLETVIEWER=appletviewer | 10 APPLETVIEWER=appletviewer |
11 | 11 |
12 ### | 12 ### |
13 ### Targets | 13 ### Targets |
14 ### | 14 ### |
15 TARGETS=$(RUN) $(CLASSES) | 15 TARGETS=$(RUN) |
16 | 16 |
17 all: $(TARGETS) | 17 all: $(TARGETS) |
18 | 18 |
19 | 19 |
20 %.class: %.java | 20 Ristipolku.class: Ristipolku.java $(CLASSES) |
21 $(JAVAC) $< | 21 $(JAVAC) $< |
22 | |
23 game/%.class: game/%.java | |
24 $(JAVAC) $< | |
25 | |
26 | |
27 Ristipolku.class: game/Piece.class game/PieceType.class game/Engine.class game/Interpolate.class | |
28 | 22 |
29 | 23 |
30 run: $(RUN) | 24 run: $(RUN) |
31 $(APPLETVIEWER) $(patsubst %.class,%.html,$<) | 25 $(APPLETVIEWER) $(patsubst %.class,%.html,$<) |
32 | 26 |
33 | 27 |
34 ### | 28 ### |
35 ### Package | 29 ### Package |
36 ### | 30 ### |
37 Ristipolku.jar: $(RUN) $(CLASSES) $(RESOURCES) | 31 Ristipolku.jar: $(RUN) $(CLASSES) $(RESOURCES) |
38 jar cvf $@ $+ | 32 jar cvfm $@ manifest.txt $(RUN) game/*.class $(RESOURCES) |
39 | 33 |
40 | 34 |
41 upload: Ristipolku.jar | 35 upload: Ristipolku.jar |
42 @scp $+ ccr@tnsp.org:public_html/ristipolku/ | 36 @scp $+ ccr@tnsp.org:public_html/ristipolku/ |
43 # $(RM) $< | 37 $(RM) $< |
44 | 38 |
45 | 39 |
46 ### | 40 ### |
47 ### Cleanup | 41 ### Cleanup |
48 ### | 42 ### |