Mercurial > hg > ristipolku
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 |
rev | line source |
---|---|
193 | 1 ### |
2 ### Settings, directories | |
3 ### | |
4 # Utils | |
5 JAVA = java | |
6 JAVA_FLAGS += | |
7 JAVAC = javac | |
8 JAVAC_FLAGS += -g -Xlint:unchecked | |
9 JAVAC_FLAGS += -Xlint:deprecation | |
10 | |
11 | |
12 MAINCLASS=Ristipolku.class | |
165 | 13 JARFILE=Ristipolku.jar |
13 | 14 |
193 | 15 SRC=game/ |
16 | |
165 | 17 RESOURCES=\ |
18 graphics/*.png \ | |
19 graphics/*.jpg \ | |
20 graphics/font.ttf \ | |
21 sounds/*.wav | |
13 | 22 |
193 | 23 |
24 ifneq ($(V),1) | |
25 COMPILE_OBJ = @echo " JAVAC $<" && $(JAVAC) $(JAVAC_FLAGS) $< | |
26 else | |
27 COMPILE_OBJ = $(JAVAC) $(JAVAC_FLAGS) $< | |
28 endif | |
29 | |
30 | |
31 ### | |
32 ### Targets and generic rules | |
33 ### | |
34 TARGETS=$(MAINCLASS) | |
35 | |
36 all: $(TARGETS) | |
37 | |
38 | |
39 $(SRC)%.class: $(SRC)%.java | |
40 $(COMPILE_OBJ) | |
41 | |
42 | |
43 ### | |
44 ### Class depencies | |
45 ### | |
46 $(SRC)IDMWidget.class: $(SRC)IDMPoint.class | |
47 | |
48 $(SRC)IDMButton.class: $(SRC)IDMWidget.class | |
49 | |
50 $(SRC)IDMContainer.class: $(SRC)IDMWidget.class | |
51 | |
52 $(SRC)IDMWindow.class: $(SRC)IDMWidget.class | |
53 | |
54 $(SRC)Engine.class: $(addprefix $(SRC),\ | |
165 | 55 Piece.class PieceType.class \ |
193 | 56 Interpolate.class \ |
165 | 57 ResourceLoader.class \ |
58 Sound.class SoundManager.class \ | |
59 IDMPoint.class IDMWidget.class \ | |
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 | 62 AnimatedPointElement.class) |
165 | 63 |
193 | 64 Ristipolku.class: Ristipolku.java $(addprefix $(SRC),\ |
65 Engine.class) | |
66 $(COMPILE_OBJ) | |
9 | 67 |
1 | 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 | 71 |
72 | |
12 | 73 ### |
74 ### Package | |
75 ### | |
193 | 76 $(JARFILE): $(MAINCLASS) $(RESOURCES) |
77 jar cvfm $@ manifest.txt $(MAINCLASS) $(RESOURCES) $(SRC)*.class | |
13 | 78 |
12 | 79 |
165 | 80 upload: $(JARFILE) |
150 | 81 @scp $+ ccr@tnsp.org:tnsp/ristipolku/ |
18 | 82 $(RM) $< |
12 | 83 |
84 | |
85 ### | |
86 ### Cleanup | |
87 ### | |
1 | 88 clean: |
193 | 89 $(RM) $(TARGETS) *.class $(SRC)*.class |
1 | 90 |
91 | |
92 srcclean: clean | |
162
e8eeac403e5f
Backed out changeset fb33d3796942
Matti Hamalainen <ccr@tnsp.org>
parents:
161
diff
changeset
|
93 $(RM) *~ game/*~ graphics/*~ |
12 | 94 |
1 | 95 # dummy |