added always clearing player action when waiting for events to continue
[rocksndiamonds.git] / Makefile
1 # =============================================================================
2 # Rocks'n'Diamonds - McDuffin Strikes Back!
3 # -----------------------------------------------------------------------------
4 # (c) 1995-2015 by Artsoft Entertainment
5 #                  Holger Schemel
6 #                  info@artsoft.org
7 #                  https://www.artsoft.org/
8 # -----------------------------------------------------------------------------
9 # Makefile
10 # =============================================================================
11
12 # -----------------------------------------------------------------------------
13 # configuration
14 # -----------------------------------------------------------------------------
15
16 # command name of your favorite ANSI C compiler
17 # (this must be set to "cc" for some systems)
18 CC = gcc
19
20 # command name of GNU make on your system
21 # (this must be set to "gmake" for some systems)
22 MAKE = make
23
24 # directory for read-only game data (like graphics, sounds, levels)
25 # (this directory is usually the game's installation directory)
26 # default is '.' to be able to run program without installation
27 # RO_GAME_DIR = .
28 # use the following setting for Debian / Ubuntu installations:
29 # RO_GAME_DIR = /usr/share/games/rocksndiamonds
30
31 # directory for writable game data (like highscore files)
32 # (if no "scores" directory exists, scores are saved in user data directory)
33 # default is '.' to be able to run program without installation
34 # RW_GAME_DIR = .
35 # use the following setting for Debian / Ubuntu installations:
36 # RW_GAME_DIR = /var/games/rocksndiamonds
37
38 # uncomment if system has no joystick include file
39 # JOYSTICK = -DNO_JOYSTICK
40
41 # path for cross-compiling (only needed for non-native Windows build)
42 CROSS_PATH_WIN32 = /usr/local/cross-tools/i686-w64-mingw32
43 CROSS_PATH_WIN64 = /usr/local/cross-tools/x86_64-w64-mingw32
44
45
46 # -----------------------------------------------------------------------------
47 # there should be no need to change anything below
48 # -----------------------------------------------------------------------------
49
50 .EXPORT_ALL_VARIABLES:
51
52 SRC_DIR = src
53 ANDROID_DIR ?= build-projects/android
54
55 MAKE_CMD = $(MAKE) -C $(SRC_DIR)
56 MAKE_CMD_ANDROID = $(MAKE) -C $(ANDROID_DIR)
57
58
59 # -----------------------------------------------------------------------------
60 # build targets
61 # -----------------------------------------------------------------------------
62
63 all:
64         @$(MAKE_CMD)
65
66 cross-win32:
67         @PATH=$(CROSS_PATH_WIN32)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win32
68
69 cross-win64:
70         @PATH=$(CROSS_PATH_WIN64)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win64
71
72 android-prepare:
73         @$(MAKE_CMD_ANDROID) prepare
74
75 android-package:
76         @$(MAKE_CMD_ANDROID) package
77
78 android-clean:
79         @$(MAKE_CMD_ANDROID) clean
80
81 android: android-package
82
83 clean:
84         @$(MAKE_CMD) clean
85
86 clean-git:
87         @$(MAKE_CMD) clean-git
88
89 clean-android: android-clean
90
91
92 # -----------------------------------------------------------------------------
93 # development targets
94 # -----------------------------------------------------------------------------
95
96 MAKE_ENGINETEST = ./Scripts/make_enginetest.sh
97 MAKE_LEVELSKETCH = ./Scripts/make_levelsketch_images.sh
98
99 auto-conf:
100         @$(MAKE_CMD) auto-conf
101
102 conf-time:
103         @$(MAKE_CMD) conf-time
104
105 conf-hash:
106         @$(MAKE_CMD) conf-hash
107
108 run: all
109         @$(MAKE_CMD) run
110
111 gdb: all
112         @$(MAKE_CMD) gdb
113
114 valgrind: all
115         @$(MAKE_CMD) valgrind
116
117 tags:
118         $(MAKE_CMD) tags
119
120 depend dep:
121         $(MAKE_CMD) depend
122
123 enginetest: all
124         $(MAKE_ENGINETEST)
125
126 enginetestcustom: all
127         $(MAKE_ENGINETEST) custom
128
129 enginetestfast: all
130         $(MAKE_ENGINETEST) fast
131
132 enginetestnew: all
133         $(MAKE_ENGINETEST) new
134
135 leveltest: all
136         $(MAKE_ENGINETEST) leveltest
137
138 levelsketch_images: all
139         $(MAKE_LEVELSKETCH)
140
141
142 # -----------------------------------------------------------------------------
143 # distribution targets
144 # -----------------------------------------------------------------------------
145
146 MAKE_DIST = ./Scripts/make_dist.sh
147
148 dist-clean:
149         @$(MAKE_CMD) dist-clean
150
151 dist-clean-android:
152         @$(MAKE_CMD_ANDROID) dist-clean
153
154 dist-build-linux:
155         @BUILD_DIST=TRUE $(MAKE)
156
157 dist-build-win32:
158         @BUILD_DIST=TRUE $(MAKE) cross-win32
159
160 dist-build-win64:
161         @BUILD_DIST=TRUE $(MAKE) cross-win64
162
163 dist-build-mac:
164         @BUILD_DIST=TRUE $(MAKE)
165
166 dist-build-android:
167         @BUILD_DIST=TRUE $(MAKE) android
168
169 dist-package-linux:
170         $(MAKE_DIST) package linux
171
172 dist-package-win32:
173         $(MAKE_DIST) package win32
174
175 dist-package-win64:
176         $(MAKE_DIST) package win64
177
178 dist-package-mac:
179         $(MAKE_DIST) package mac
180
181 dist-package-android:
182         $(MAKE_DIST) package android
183
184 dist-copy-package-linux:
185         $(MAKE_DIST) copy-package linux
186
187 dist-copy-package-win32:
188         $(MAKE_DIST) copy-package win32
189
190 dist-copy-package-win64:
191         $(MAKE_DIST) copy-package win64
192
193 dist-copy-package-mac:
194         $(MAKE_DIST) copy-package mac
195
196 dist-copy-package-android:
197         $(MAKE_DIST) copy-package android
198
199 dist-upload-linux:
200         $(MAKE_DIST) upload linux
201
202 dist-upload-win32:
203         $(MAKE_DIST) upload win32
204
205 dist-upload-win64:
206         $(MAKE_DIST) upload win64
207
208 dist-upload-mac:
209         $(MAKE_DIST) upload mac
210
211 dist-upload-android:
212         $(MAKE_DIST) upload android
213
214 dist-package-all:
215         $(MAKE) dist-package-linux
216         $(MAKE) dist-package-win32
217         $(MAKE) dist-package-win64
218         $(MAKE) dist-package-mac
219         $(MAKE) dist-package-android
220
221 dist-copy-package-all:
222         $(MAKE) dist-copy-package-linux
223         $(MAKE) dist-copy-package-win32
224         $(MAKE) dist-copy-package-win64
225         $(MAKE) dist-copy-package-mac
226         $(MAKE) dist-copy-package-android
227
228 dist-upload-all:
229         $(MAKE) dist-upload-linux
230         $(MAKE) dist-upload-win32
231         $(MAKE) dist-upload-win64
232         $(MAKE) dist-upload-mac
233         $(MAKE) dist-upload-android
234
235 dist-release-all: dist-package-all dist-copy-package-all dist-upload-all
236
237 package-all: dist-package-all
238
239 copy-package-all: dist-copy-package-all
240
241 upload-all: dist-upload-all
242
243 release-all: dist-release-all