annotate Makefile @ 12:c4cd811813ef

Work on Makefile.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 30 Jan 2011 01:12:14 +0200
parents a7751971c2a3
children 562744de803c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 # Settings, directories
12
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
2 RUN=Ristipolku.class
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
3 CLASSES=game/Piece.class game/PieceType.class game/Engine.class game/Interpolate.class
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
4 TARGETS=$(RUN) $(CLASSES)
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 # Utils
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 JAVAC=javac -g
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 APPLETVIEWER=appletviewer
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 ###
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 ### Targets
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 ###
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 all: $(TARGETS)
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 %.class: %.java
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 $(JAVAC) $<
9
a7751971c2a3 More work.
Matti Hamalainen <ccr@tnsp.org>
parents: 2
diff changeset
18
a7751971c2a3 More work.
Matti Hamalainen <ccr@tnsp.org>
parents: 2
diff changeset
19 game/%.class: game/%.java
a7751971c2a3 More work.
Matti Hamalainen <ccr@tnsp.org>
parents: 2
diff changeset
20 $(JAVAC) $<
a7751971c2a3 More work.
Matti Hamalainen <ccr@tnsp.org>
parents: 2
diff changeset
21
12
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
22
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
23 Ristipolku.class: game/Piece.class game/PieceType.class game/Engine.class game/Interpolate.class
9
a7751971c2a3 More work.
Matti Hamalainen <ccr@tnsp.org>
parents: 2
diff changeset
24
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 run: $(RUN)
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 $(APPLETVIEWER) $(patsubst %.class,%.html,$<)
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29
12
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
30 ###
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
31 ### Package
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
32 ###
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
33 Ristipolku.jar: $(RUN) $(CLASSES)
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
34
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
35
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
36 upload: index.html Ristipolku.jar
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
37 @scp $+ ccr@tnsp.org:public_html/ristipolku/
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
38
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
39
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
40 ###
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
41 ### Cleanup
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
42 ###
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43 clean:
12
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
44 $(RM) $(TARGETS) *.class game/*.class
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
46
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
47 srcclean: clean
12
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
48 $(RM) *~ game/*~ graphics/*~
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
49
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
50
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
51
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52 # dummy