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
122 levelsketch_images: all
126 # -----------------------------------------------------------------------------
127 # distribution targets
128 # -----------------------------------------------------------------------------
130 MAKE_DIST = ./Scripts/make_dist.sh
133 @$(MAKE_CMD) dist-clean
136 @$(MAKE_CMD_ANDROID) dist-clean
139 @BUILD_DIST=TRUE $(MAKE)
142 @BUILD_DIST=TRUE $(MAKE) cross-win32
145 @BUILD_DIST=TRUE $(MAKE) cross-win64
148 @BUILD_DIST=TRUE $(MAKE)
151 @BUILD_DIST=TRUE $(MAKE) android
153 dist-build-emscripten:
154 @BUILD_DIST=TRUE $(MAKE) emscripten
157 $(MAKE_DIST) package linux
160 $(MAKE_DIST) package win32
163 $(MAKE_DIST) package win64
166 $(MAKE_DIST) package mac
168 dist-package-android:
169 $(MAKE_DIST) package android
171 dist-package-emscripten:
172 $(MAKE_DIST) package emscripten
174 dist-copy-package-linux:
175 $(MAKE_DIST) copy-package linux
177 dist-copy-package-win32:
178 $(MAKE_DIST) copy-package win32
180 dist-copy-package-win64:
181 $(MAKE_DIST) copy-package win64
183 dist-copy-package-mac:
184 $(MAKE_DIST) copy-package mac
186 dist-copy-package-android:
187 $(MAKE_DIST) copy-package android
189 dist-copy-package-emscripten:
190 $(MAKE_DIST) copy-package emscripten
193 $(MAKE_DIST) upload linux
196 $(MAKE_DIST) upload win32
199 $(MAKE_DIST) upload win64
202 $(MAKE_DIST) upload mac
205 $(MAKE_DIST) upload android
207 dist-upload-emscripten:
208 $(MAKE_DIST) upload emscripten
210 dist-deploy-emscripten:
211 $(MAKE_DIST) deploy emscripten
214 $(MAKE) dist-package-linux
215 $(MAKE) dist-package-win32
216 $(MAKE) dist-package-win64
217 $(MAKE) dist-package-mac
218 $(MAKE) dist-package-android
219 $(MAKE) dist-package-emscripten
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 $(MAKE) dist-copy-package-emscripten
230 $(MAKE) dist-upload-linux
231 $(MAKE) dist-upload-win32
232 $(MAKE) dist-upload-win64
233 $(MAKE) dist-upload-mac
234 $(MAKE) dist-upload-android
235 $(MAKE) dist-upload-emscripten
238 $(MAKE) dist-deploy-emscripten
240 dist-release-all: dist-package-all dist-copy-package-all dist-upload-all
242 package-all: dist-package-all
244 copy-package-all: dist-copy-package-all
246 upload-all: dist-upload-all
248 deploy-all: dist-deploy-all
250 release-all: dist-release-all