annotate Makefile @ 182:88b364dfd501

Rememeber to add the new class to build system ..
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 16 Mar 2017 12:23:17 +0200
parents 0303db4df28f
children 189cd8fe2304
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 \
182
88b364dfd501 Rememeber to add the new class to build system ..
Matti Hamalainen <ccr@tnsp.org>
parents: 165
diff changeset
19 IDMWindow.class \
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
20 AnimatedPointElement.class
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 # Utils
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
23 JAVAC=javac
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
24 JAVAC_FLAGS=-g -Xlint:unchecked
133
881deac2daf8 Some more work on scaling widgets, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 128
diff changeset
25 APPLETVIEWER=aoss appletviewer
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
27
1
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 ### Targets
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 ###
18
4507a431b410 More work.
Matti Hamalainen <ccr@tnsp.org>
parents: 15
diff changeset
31 TARGETS=$(RUN)
13
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
32
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 all: $(TARGETS)
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
35 $(SRC)/%.class: $(SRC)/%.java
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
36 $(JAVAC) $(JAVAC_FLAGS) $<
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
38 Ristipolku.class: Ristipolku.java $(addprefix $(SRC)/,$(CLASSES))
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
39 $(JAVAC) $(JAVAC_FLAGS) $<
9
a7751971c2a3 More work.
Matti Hamalainen <ccr@tnsp.org>
parents: 2
diff changeset
40
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42 run: $(RUN)
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43 $(APPLETVIEWER) $(patsubst %.class,%.html,$<)
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45
12
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
46 ###
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
47 ### Package
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
48 ###
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
49 $(JARFILE): $(RUN) $(RESOURCES)
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
50 jar cvfm $@ manifest.txt $+ $(SRC)/*.class
13
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
51
12
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
52
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
53 upload: $(JARFILE)
150
b0c05b8b59ca Change upload path.
Matti Hamalainen <ccr@tnsp.org>
parents: 133
diff changeset
54 @scp $+ ccr@tnsp.org:tnsp/ristipolku/
18
4507a431b410 More work.
Matti Hamalainen <ccr@tnsp.org>
parents: 15
diff changeset
55 $(RM) $<
12
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 ###
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
59 ### Cleanup
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
60 ###
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
61 clean:
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
62 $(RM) $(TARGETS) *.class $(SRC)/*.class
1
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
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
65 srcclean: clean
162
e8eeac403e5f Backed out changeset fb33d3796942
Matti Hamalainen <ccr@tnsp.org>
parents: 161
diff changeset
66 $(RM) *~ game/*~ graphics/*~
12
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
67
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
68 # dummy