1 # =============================================================================
2 # Rocks'n'Diamonds - McDuffin Strikes Back!
3 # -----------------------------------------------------------------------------
4 # (c) 1995-2015 by Artsoft Entertainment
7 # http://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/i386-mingw32msvc
45 # -----------------------------------------------------------------------------
46 # there should be no need to change anything below
47 # -----------------------------------------------------------------------------
49 .EXPORT_ALL_VARIABLES:
52 ANDROID_DIR ?= android
54 MAKE_CMD = $(MAKE) -C $(SRC_DIR)
55 MAKE_CMD_ANDROID = $(MAKE) -C $(ANDROID_DIR)
58 # -----------------------------------------------------------------------------
60 # -----------------------------------------------------------------------------
66 @$(MAKE_CMD) TARGET=sdl
69 @$(MAKE_CMD) TARGET=sdl2
72 @$(MAKE_CMD) PLATFORM=macosx
75 @PATH=$(CROSS_PATH_WIN32)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win32
78 @$(MAKE_CMD_ANDROID) compile
81 @$(MAKE_CMD_ANDROID) package
84 @$(MAKE_CMD_ANDROID) install
87 @$(MAKE_CMD_ANDROID) assets-toc
90 @$(MAKE_CMD_ANDROID) clean
92 android: android-package
98 @$(MAKE_CMD) clean-git
100 clean-android: android-clean
103 # -----------------------------------------------------------------------------
104 # development targets
105 # -----------------------------------------------------------------------------
107 MAKE_ENGINETEST = ./Scripts/make_enginetest.sh
108 MAKE_LEVELSKETCH = ./Scripts/make_levelsketch_images.sh
111 @$(MAKE_CMD) auto-conf
120 @$(MAKE_CMD) valgrind
131 enginetestcustom: all
132 $(MAKE_ENGINETEST) custom
135 $(MAKE_ENGINETEST) fast
138 $(MAKE_ENGINETEST) new
141 $(MAKE_ENGINETEST) leveltest
143 levelsketch_images: all
147 # -----------------------------------------------------------------------------
148 # distribution targets
149 # -----------------------------------------------------------------------------
151 MAKE_DIST = ./Scripts/make_dist.sh
154 @$(MAKE_CMD) dist-clean
157 @$(MAKE_CMD_ANDROID) dist-clean
160 @BUILD_DIST=TRUE $(MAKE)
163 @BUILD_DIST=TRUE $(MAKE) cross-win32
166 @BUILD_DIST=TRUE $(MAKE)
169 @BUILD_DIST=TRUE $(MAKE) android
172 $(MAKE_DIST) package unix
175 $(MAKE_DIST) package win
178 $(MAKE_DIST) package mac
180 dist-package-android:
181 $(MAKE_DIST) package android
183 dist-copy-package-unix:
184 $(MAKE_DIST) copy-package unix
186 dist-copy-package-win32:
187 $(MAKE_DIST) copy-package win
189 dist-copy-package-macosx:
190 $(MAKE_DIST) copy-package mac
192 dist-copy-package-android:
193 $(MAKE_DIST) copy-package android
196 $(MAKE_DIST) upload unix
199 $(MAKE_DIST) upload win
202 $(MAKE_DIST) upload mac
205 $(MAKE_DIST) upload android
208 $(MAKE) dist-package-unix
209 $(MAKE) dist-package-win32
210 $(MAKE) dist-package-macosx
211 $(MAKE) dist-package-android
213 dist-copy-package-all:
214 $(MAKE) dist-copy-package-unix
215 $(MAKE) dist-copy-package-win32
216 $(MAKE) dist-copy-package-macosx
217 $(MAKE) dist-copy-package-android
220 $(MAKE) dist-upload-unix
221 $(MAKE) dist-upload-win32
222 $(MAKE) dist-upload-macosx
223 $(MAKE) dist-upload-android
225 dist-release-all: dist-package-all dist-copy-package-all dist-upload-all
227 package-all: dist-package-all
229 copy-package-all: dist-copy-package_all
231 upload-all: dist-upload-all
233 release-all: dist-release-all