1 # =============================================================================
2 # Rocks'n'Diamonds - McDuffin Strikes Back!
3 # -----------------------------------------------------------------------------
4 # (c) 1995-2015 by Artsoft Entertainment
7 # https://www.artsoft.org/
8 # -----------------------------------------------------------------------------
10 # =============================================================================
12 # -----------------------------------------------------------------------------
14 # -----------------------------------------------------------------------------
16 # command name of your favorite ANSI C compiler
17 # (this must be set to "cc" for some systems)
20 # command name of GNU make on your system
21 # (this must be set to "gmake" for some systems)
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
28 # use the following setting for Debian / Ubuntu installations:
29 # BASE_PATH = /usr/share/games/rocksndiamonds
31 # uncomment if system has no joystick include file
32 # JOYSTICK = -DNO_JOYSTICK
34 # path for cross-compiling (only needed for non-native Windows build)
35 CROSS_PATH_WIN32 = /usr/local/cross-tools/i686-w64-mingw32
36 CROSS_PATH_WIN64 = /usr/local/cross-tools/x86_64-w64-mingw32
39 # -----------------------------------------------------------------------------
40 # there should be no need to change anything below
41 # -----------------------------------------------------------------------------
43 .EXPORT_ALL_VARIABLES:
46 ANDROID_DIR ?= build-projects/android
48 MAKE_CMD = $(MAKE) -C $(SRC_DIR)
49 MAKE_CMD_ANDROID = $(MAKE) -C $(ANDROID_DIR)
52 # -----------------------------------------------------------------------------
54 # -----------------------------------------------------------------------------
60 @PATH=$(CROSS_PATH_WIN32)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win32
63 @PATH=$(CROSS_PATH_WIN64)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win64
66 @$(MAKE_CMD_ANDROID) prepare
69 @$(MAKE_CMD_ANDROID) package
72 @$(MAKE_CMD_ANDROID) clean
74 android: android-package
77 @emmake $(MAKE_CMD) PLATFORM=emscripten
83 @$(MAKE_CMD) clean-git
85 clean-android: android-clean
88 # -----------------------------------------------------------------------------
90 # -----------------------------------------------------------------------------
92 MAKE_ENGINETEST = ./tests/enginetest/enginetest.sh
93 MAKE_LEVELSKETCH = ./Scripts/make_levelsketch_images.sh
96 @$(MAKE_CMD) auto-conf
99 @$(MAKE_CMD) conf-time
102 @$(MAKE_CMD) conf-hash
111 @$(MAKE_CMD) valgrind
119 depend-clean dep-clean:
120 $(MAKE_CMD) depend-clean
125 levelsketch_images: all
129 # -----------------------------------------------------------------------------
130 # distribution targets
131 # -----------------------------------------------------------------------------
133 MAKE_DIST = ./Scripts/make_dist.sh
136 @$(MAKE_CMD) dist-clean
139 @$(MAKE_CMD_ANDROID) dist-clean
142 @BUILD_DIST=TRUE $(MAKE)
145 @BUILD_DIST=TRUE $(MAKE) cross-win32
148 @BUILD_DIST=TRUE $(MAKE) cross-win64
151 @BUILD_DIST=TRUE $(MAKE)
154 @BUILD_DIST=TRUE $(MAKE) android
156 dist-build-emscripten:
157 @BUILD_DIST=TRUE $(MAKE) emscripten
160 $(MAKE_DIST) package linux
163 $(MAKE_DIST) package win32
166 $(MAKE_DIST) package win64
169 $(MAKE_DIST) package mac
171 dist-package-android:
172 $(MAKE_DIST) package android
174 dist-package-emscripten:
175 $(MAKE_DIST) package emscripten
177 dist-copy-package-linux:
178 $(MAKE_DIST) copy-package linux
180 dist-copy-package-win32:
181 $(MAKE_DIST) copy-package win32
183 dist-copy-package-win64:
184 $(MAKE_DIST) copy-package win64
186 dist-copy-package-mac:
187 $(MAKE_DIST) copy-package mac
189 dist-copy-package-android:
190 $(MAKE_DIST) copy-package android
192 dist-copy-package-emscripten:
193 $(MAKE_DIST) copy-package emscripten
196 $(MAKE_DIST) upload linux
199 $(MAKE_DIST) upload win32
202 $(MAKE_DIST) upload win64
205 $(MAKE_DIST) upload mac
208 $(MAKE_DIST) upload android
210 dist-upload-emscripten:
211 $(MAKE_DIST) upload emscripten
213 dist-deploy-emscripten:
214 $(MAKE_DIST) deploy emscripten
217 $(MAKE) dist-package-linux
218 $(MAKE) dist-package-win32
219 $(MAKE) dist-package-win64
220 $(MAKE) dist-package-mac
221 $(MAKE) dist-package-android
222 $(MAKE) dist-package-emscripten
224 dist-copy-package-all:
225 $(MAKE) dist-copy-package-linux
226 $(MAKE) dist-copy-package-win32
227 $(MAKE) dist-copy-package-win64
228 $(MAKE) dist-copy-package-mac
229 $(MAKE) dist-copy-package-android
230 $(MAKE) dist-copy-package-emscripten
233 $(MAKE) dist-upload-linux
234 $(MAKE) dist-upload-win32
235 $(MAKE) dist-upload-win64
236 $(MAKE) dist-upload-mac
237 $(MAKE) dist-upload-android
238 $(MAKE) dist-upload-emscripten
241 $(MAKE) dist-deploy-emscripten
243 dist-release-all: dist-package-all dist-copy-package-all dist-upload-all dist-deploy-all
245 package-all: dist-package-all
247 copy-package-all: dist-copy-package-all
249 upload-all: dist-upload-all
251 deploy-all: dist-deploy-all
253 release-all: dist-release-all