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:
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) clean
89 android: android-package
95 @$(MAKE_CMD) clean-git
97 clean-android: android-clean
100 # -----------------------------------------------------------------------------
101 # development targets
102 # -----------------------------------------------------------------------------
104 MAKE_ENGINETEST = ./Scripts/make_enginetest.sh
105 MAKE_LEVELSKETCH = ./Scripts/make_levelsketch_images.sh
108 @$(MAKE_CMD) auto-conf
117 @$(MAKE_CMD) valgrind
128 enginetestcustom: all
129 $(MAKE_ENGINETEST) custom
132 $(MAKE_ENGINETEST) fast
135 $(MAKE_ENGINETEST) new
138 $(MAKE_ENGINETEST) leveltest
140 levelsketch_images: all
144 # -----------------------------------------------------------------------------
145 # distribution targets
146 # -----------------------------------------------------------------------------
148 MAKE_DIST = ./Scripts/make_dist.sh
151 @$(MAKE_CMD) dist-clean
154 @$(MAKE_CMD_ANDROID) dist-clean
157 @BUILD_DIST=TRUE $(MAKE)
160 @BUILD_DIST=TRUE $(MAKE) cross-win32
163 @BUILD_DIST=TRUE $(MAKE)
166 @BUILD_DIST=TRUE $(MAKE) android
169 $(MAKE_DIST) package unix
172 $(MAKE_DIST) package win
175 $(MAKE_DIST) package mac
177 dist-package-android:
178 $(MAKE_DIST) package android
180 dist-copy-package-unix:
181 $(MAKE_DIST) copy-package unix
183 dist-copy-package-win32:
184 $(MAKE_DIST) copy-package win
186 dist-copy-package-macosx:
187 $(MAKE_DIST) copy-package mac
189 dist-copy-package-android:
190 $(MAKE_DIST) copy-package android
193 $(MAKE_DIST) upload unix
196 $(MAKE_DIST) upload win
199 $(MAKE_DIST) upload mac
202 $(MAKE_DIST) upload android
205 $(MAKE) dist-package-unix
206 $(MAKE) dist-package-win32
207 $(MAKE) dist-package-macosx
208 $(MAKE) dist-package-android
210 dist-copy-package-all:
211 $(MAKE) dist-copy-package-unix
212 $(MAKE) dist-copy-package-win32
213 $(MAKE) dist-copy-package-macosx
214 $(MAKE) dist-copy-package-android
217 $(MAKE) dist-upload-unix
218 $(MAKE) dist-upload-win32
219 $(MAKE) dist-upload-macosx
220 $(MAKE) dist-upload-android
222 dist-release-all: dist-package-all dist-copy-package-all dist-upload-all
224 package-all: dist-package-all
226 copy-package-all: dist-copy-package_all
228 upload-all: dist-upload-all
230 release-all: dist-release-all