annotate Makefile @ 198:b88440f4431a

Allow no-text (null text) buttons.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 24 Apr 2019 14:53:27 +0300
parents f3302a2d7815
children f6f8fd893c49
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
193
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
1 ###
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
2 ### Settings, directories
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
3 ###
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
4 # Utils
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
5 JAVA = java
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
6 JAVA_FLAGS +=
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
7 JAVAC = javac
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
8 JAVAC_FLAGS += -g -Xlint:unchecked
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
9 JAVAC_FLAGS += -Xlint:deprecation
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
10
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
11
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
12 MAINCLASS=Ristipolku.class
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
13 JARFILE=Ristipolku.jar
13
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
14
193
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
15 SRC=game/
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
16
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
17 RESOURCES=\
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
18 graphics/*.png \
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
19 graphics/*.jpg \
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
20 graphics/font.ttf \
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
21 sounds/*.wav
13
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
22
193
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
23
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
24 ifneq ($(V),1)
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
25 COMPILE_OBJ = @echo " JAVAC $<" && $(JAVAC) $(JAVAC_FLAGS) $<
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
26 else
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
27 COMPILE_OBJ = $(JAVAC) $(JAVAC_FLAGS) $<
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
28 endif
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
29
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
30
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
31 ###
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
32 ### Targets and generic rules
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
33 ###
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
34 TARGETS=$(MAINCLASS)
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
35
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
36 all: $(TARGETS)
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
37
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
38
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
39 $(SRC)%.class: $(SRC)%.java
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
40 $(COMPILE_OBJ)
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
41
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
42
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
43 ###
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
44 ### Class depencies
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
45 ###
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
46 $(SRC)IDMWidget.class: $(SRC)IDMPoint.class
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
47
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
48 $(SRC)IDMButton.class: $(SRC)IDMWidget.class
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
49
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
50 $(SRC)IDMContainer.class: $(SRC)IDMWidget.class
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
51
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
52 $(SRC)IDMWindow.class: $(SRC)IDMWidget.class
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
53
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
54 $(SRC)Engine.class: $(addprefix $(SRC),\
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
55 Piece.class PieceType.class \
193
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
56 Interpolate.class \
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
57 ResourceLoader.class \
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
58 Sound.class SoundManager.class \
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
59 IDMPoint.class IDMWidget.class \
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
60 IDMButton.class IDMContainer.class \
182
88b364dfd501 Rememeber to add the new class to build system ..
Matti Hamalainen <ccr@tnsp.org>
parents: 165
diff changeset
61 IDMWindow.class \
193
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
62 AnimatedPointElement.class)
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
63
193
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
64 Ristipolku.class: Ristipolku.java $(addprefix $(SRC),\
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
65 Engine.class)
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
66 $(COMPILE_OBJ)
9
a7751971c2a3 More work.
Matti Hamalainen <ccr@tnsp.org>
parents: 2
diff changeset
67
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
68
197
f3302a2d7815 Convert to a Java application, instead of browser applet,
Matti Hamalainen <ccr@tnsp.org>
parents: 193
diff changeset
69 run: $(MAINCLASS)
f3302a2d7815 Convert to a Java application, instead of browser applet,
Matti Hamalainen <ccr@tnsp.org>
parents: 193
diff changeset
70 @$(JAVA) $(JAVA_FLAGS) $(patsubst %.class,%,$<)
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
71
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
72
12
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
73 ###
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
74 ### Package
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
75 ###
193
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
76 $(JARFILE): $(MAINCLASS) $(RESOURCES)
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
77 jar cvfm $@ manifest.txt $(MAINCLASS) $(RESOURCES) $(SRC)*.class
13
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
78
12
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
79
165
0303db4df28f Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 162
diff changeset
80 upload: $(JARFILE)
150
b0c05b8b59ca Change upload path.
Matti Hamalainen <ccr@tnsp.org>
parents: 133
diff changeset
81 @scp $+ ccr@tnsp.org:tnsp/ristipolku/
18
4507a431b410 More work.
Matti Hamalainen <ccr@tnsp.org>
parents: 15
diff changeset
82 $(RM) $<
12
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
83
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
84
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
85 ###
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
86 ### Cleanup
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
87 ###
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
88 clean:
193
60871afc2702 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 189
diff changeset
89 $(RM) $(TARGETS) *.class $(SRC)*.class
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
90
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
91
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
92 srcclean: clean
162
e8eeac403e5f Backed out changeset fb33d3796942
Matti Hamalainen <ccr@tnsp.org>
parents: 161
diff changeset
93 $(RM) *~ game/*~ graphics/*~
12
c4cd811813ef Work on Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
94
1
44f1e7b47fcf Preliminary work ... puuh.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
95 # dummy