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 # RO_GAME_DIR = /usr/share/games/rocksndiamonds
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
35 # use the following setting for Debian / Ubuntu installations:
36 # RW_GAME_DIR = /var/games/rocksndiamonds
38 # uncomment if system has no joystick include file
39 # JOYSTICK = -DNO_JOYSTICK
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
46 # -----------------------------------------------------------------------------
47 # there should be no need to change anything below
48 # -----------------------------------------------------------------------------
50 .EXPORT_ALL_VARIABLES:
53 ANDROID_DIR ?= build-projects/android
55 MAKE_CMD = $(MAKE) -C $(SRC_DIR)
56 MAKE_CMD_ANDROID = $(MAKE) -C $(ANDROID_DIR)
59 # -----------------------------------------------------------------------------
61 # -----------------------------------------------------------------------------
67 @PATH=$(CROSS_PATH_WIN32)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win32
70 @PATH=$(CROSS_PATH_WIN64)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win64
73 @$(MAKE_CMD_ANDROID) prepare
76 @$(MAKE_CMD_ANDROID) package
79 @$(MAKE_CMD_ANDROID) clean
81 android: android-package
84 @emmake $(MAKE_CMD) PLATFORM=emscripten
90 @$(MAKE_CMD) clean-git
92 clean-android: android-clean
95 # -----------------------------------------------------------------------------
97 # -----------------------------------------------------------------------------
99 MAKE_ENGINETEST = ./Scripts/make_enginetest.sh
100 MAKE_LEVELSKETCH = ./Scripts/make_levelsketch_images.sh
103 @$(MAKE_CMD) auto-conf
106 @$(MAKE_CMD) conf-time
109 @$(MAKE_CMD) conf-hash
118 @$(MAKE_CMD) valgrind
129 enginetestcustom: all
130 $(MAKE_ENGINETEST) custom
133 $(MAKE_ENGINETEST) fast
136 $(MAKE_ENGINETEST) new
139 $(MAKE_ENGINETEST) leveltest
141 levelsketch_images: all
145 # -----------------------------------------------------------------------------
146 # distribution targets
147 # -----------------------------------------------------------------------------
149 MAKE_DIST = ./Scripts/make_dist.sh
152 @$(MAKE_CMD) dist-clean
155 @$(MAKE_CMD_ANDROID) dist-clean
158 @BUILD_DIST=TRUE $(MAKE)
161 @BUILD_DIST=TRUE $(MAKE) cross-win32
164 @BUILD_DIST=TRUE $(MAKE) cross-win64
167 @BUILD_DIST=TRUE $(MAKE)
170 @BUILD_DIST=TRUE $(MAKE) android
172 dist-build-emscripten:
173 @BUILD_DIST=TRUE $(MAKE) emscripten
176 $(MAKE_DIST) package linux
179 $(MAKE_DIST) package win32
182 $(MAKE_DIST) package win64
185 $(MAKE_DIST) package mac
187 dist-package-android:
188 $(MAKE_DIST) package android
190 dist-copy-package-linux:
191 $(MAKE_DIST) copy-package linux
193 dist-copy-package-win32:
194 $(MAKE_DIST) copy-package win32
196 dist-copy-package-win64:
197 $(MAKE_DIST) copy-package win64
199 dist-copy-package-mac:
200 $(MAKE_DIST) copy-package mac
202 dist-copy-package-android:
203 $(MAKE_DIST) copy-package android
206 $(MAKE_DIST) upload linux
209 $(MAKE_DIST) upload win32
212 $(MAKE_DIST) upload win64
215 $(MAKE_DIST) upload mac
218 $(MAKE_DIST) upload android
221 $(MAKE) dist-package-linux
222 $(MAKE) dist-package-win32
223 $(MAKE) dist-package-win64
224 $(MAKE) dist-package-mac
225 $(MAKE) dist-package-android
227 dist-copy-package-all:
228 $(MAKE) dist-copy-package-linux
229 $(MAKE) dist-copy-package-win32
230 $(MAKE) dist-copy-package-win64
231 $(MAKE) dist-copy-package-mac
232 $(MAKE) dist-copy-package-android
235 $(MAKE) dist-upload-linux
236 $(MAKE) dist-upload-win32
237 $(MAKE) dist-upload-win64
238 $(MAKE) dist-upload-mac
239 $(MAKE) dist-upload-android
241 dist-release-all: dist-package-all dist-copy-package-all dist-upload-all
243 package-all: dist-package-all
245 copy-package-all: dist-copy-package-all
247 upload-all: dist-upload-all
249 release-all: dist-release-all