annotate Makefile @ 167:7bf508d363bd

Cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 02 Mar 2017 12:23:57 +0200
parents 0303db4df28f
children 88b364dfd501
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
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
3 JARFILE=Ristipolku.jar
13
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
4
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
5 SRC=game
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
6 RESOURCES=\
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
7 graphics/*.png \
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
8 graphics/*.jpg \
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
9 graphics/font.ttf \
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
10 sounds/*.wav
13
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
11
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
12 CLASSES=G.class \
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
13 Piece.class PieceType.class \
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
14 Engine.class Interpolate.class \
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
15 ResourceLoader.class \
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
16 Sound.class SoundManager.class \
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
17 IDMPoint.class IDMWidget.class \
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
18 IDMButton.class IDMContainer.class \
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
19 AnimatedPointElement.class
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 # Utils
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
22 JAVAC=javac
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
23 JAVAC_FLAGS=-g -Xlint:unchecked
133
881deac2daf8 Some more work on scaling widgets, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 128
diff changeset
24 APPLETVIEWER=aoss appletviewer
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
26
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 ###
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 ### Targets
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 ###
18
4507a431b410 More work.
Matti Hamalainen <ccr@tnsp.org>
parents: 15
diff changeset
30 TARGETS=$(RUN)
13
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
31
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 all: $(TARGETS)
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
34 $(SRC)/%.class: $(SRC)/%.java
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
35 $(JAVAC) $(JAVAC_FLAGS) $<
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
37 Ristipolku.class: Ristipolku.java $(addprefix $(SRC)/,$(CLASSES))
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
38 $(JAVAC) $(JAVAC_FLAGS) $<
9
a7751971c2a3 More work.
Matti Hamalainen <ccr@tnsp.org>
parents: 2
diff changeset
39
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41 run: $(RUN)
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42 $(APPLETVIEWER) $(patsubst %.class,%.html,$<)
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44
12
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
45 ###
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
46 ### Package
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
47 ###
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
48 $(JARFILE): $(RUN) $(RESOURCES)
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
49 jar cvfm $@ manifest.txt $+ $(SRC)/*.class
13
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
50
12
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
51
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
52 upload: $(JARFILE)
150
b0c05b8b59ca Change upload path.
Matti Hamalainen <ccr@tnsp.org>
parents: 133
diff changeset
53 @scp $+ ccr@tnsp.org:tnsp/ristipolku/
18
4507a431b410 More work.
Matti Hamalainen <ccr@tnsp.org>
parents: 15
diff changeset
54 $(RM) $<
12
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
55
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
56
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
57 ###
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
58 ### Cleanup
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
59 ###
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
60 clean:
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
61 $(RM) $(TARGETS) *.class $(SRC)/*.class
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
62
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
63
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
64 srcclean: clean
162
e8eeac403e5f Backed out changeset fb33d3796942
Matti Hamalainen <ccr@tnsp.org>
parents: 161
diff changeset
65 $(RM) *~ game/*~ graphics/*~
12
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
66
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
67 # dummy