1 # =============================================================================
2 # Rocks'n'Diamonds Makefile
3 # -----------------------------------------------------------------------------
4 # (c) 1995-2013 Holger Schemel <info@artsoft.org>
5 # =============================================================================
7 # -----------------------------------------------------------------------------
9 # -----------------------------------------------------------------------------
11 # command name of your favorite ANSI C compiler
12 # (this must be set to "cc" for some systems)
15 # command name of GNU make on your system
16 # (this must be set to "gmake" for some systems)
19 # path to X11 on your system
22 # directory for read-only game data (like graphics, sounds, levels)
23 # default is '.' to be able to run program without installation
24 # RO_GAME_DIR = /usr/games
25 # use the following setting for Debian / Ubuntu installations:
26 # RO_GAME_DIR = /usr/share/games/rocksndiamonds
28 # directory for writable game data (like highscore files)
29 # default is '.' to be able to run program without installation
30 # RW_GAME_DIR = /var/games
31 # use the following setting for Debian / Ubuntu installations:
32 # RW_GAME_DIR = /var/games/rocksndiamonds
34 # uncomment if system has no joystick include file
35 # JOYSTICK = -DNO_JOYSTICK
37 # choose if more than one global score file entry for one player is allowed
38 # (default: MANY_PER_NAME)
39 # uncomment to install game in multi-user environment
40 # SCORE_ENTRIES = ONE_PER_NAME
41 # uncomment to install game in single-user environment (default)
42 # SCORE_ENTRIES = MANY_PER_NAME
44 # path for cross-compiling (only needed for non-native Windows build)
45 CROSS_PATH_WIN32 = /usr/local/cross-tools/i386-mingw32msvc
47 # compile special edition of R'n'D instead of the normal (classic) version
48 # SPECIAL_EDITION = rnd_jue
51 # -----------------------------------------------------------------------------
52 # there should be no need to change anything below
53 # -----------------------------------------------------------------------------
55 .EXPORT_ALL_VARIABLES:
58 MAKE_CMD = $(MAKE) -C $(SRC_DIR)
60 # DEFAULT_TARGET = x11
64 # -----------------------------------------------------------------------------
66 # -----------------------------------------------------------------------------
69 @$(MAKE_CMD) TARGET=$(DEFAULT_TARGET)
72 @$(MAKE_CMD) TARGET=x11
75 @$(MAKE_CMD) TARGET=sdl
78 @$(MAKE_CMD) TARGET=sdl2
81 @$(MAKE_CMD) PLATFORM=solaris TARGET=x11
84 @$(MAKE_CMD) PLATFORM=solaris TARGET=sdl
87 @$(MAKE_CMD) PLATFORM=macosx
90 @$(MAKE_CMD) PLATFORM=macosx TARGET=sdl-static
93 @$(MAKE_CMD) PLATFORM=macosx TARGET=sdl2-static
96 @$(MAKE_CMD) PLATFORM=os2
99 @PATH=$(CROSS_PATH_WIN32)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win32
105 # -----------------------------------------------------------------------------
106 # development, test, distribution build and packaging targets
107 # -----------------------------------------------------------------------------
110 @$(MAKE_CMD) auto-conf
119 @$(MAKE_CMD) valgrind
122 ./Scripts/make_enginetest.sh
124 enginetestcustom: all
125 ./Scripts/make_enginetest.sh custom
128 ./Scripts/make_enginetest.sh fast
131 ./Scripts/make_enginetest.sh new
134 ./Scripts/make_enginetest.sh leveltest
136 levelsketch_images: all
137 ./Scripts/make_levelsketch_images.sh
140 ./Scripts/make_backup.sh src tar
143 ./Scripts/make_backup.sh src scp
145 backup-all: backup backup-net-copy
148 ./Scripts/make_backup.sh lev
151 ./Scripts/make_backup.sh gfx
154 # ./Scripts/make_prerelease.sh
157 @$(MAKE) SPECIAL_EDITION=rnd_jue all
160 @$(MAKE) SPECIAL_EDITION=rnd_jue cross-win32
163 @$(MAKE_CMD) dist-clean
166 @BUILD_DIST=TRUE $(MAKE)
169 @BUILD_DIST=TRUE $(MAKE) cross-win32
172 # (this is done by "dist-package-macosx" target)
174 dist-build-macosx-ppc:
175 # (this is done by "dist-package-macosx-ppc" target)
178 ./Scripts/make_dist.sh unix .
181 ./Scripts/make_dist.sh win .
184 ./Scripts/make_dist.sh mac . $(MAKE)
186 dist-package-macosx-ppc:
187 ./Scripts/make_dist.sh mac-ppc . $(MAKE)
190 ./Scripts/make_dist.sh unix . upload
193 ./Scripts/make_dist.sh win . upload
196 ./Scripts/make_dist.sh mac . upload
198 dist-upload-macosx-ppc:
199 ./Scripts/make_dist.sh mac-ppc . upload
203 $(MAKE) dist-build-unix ; $(MAKE) dist-clean
204 $(MAKE) dist-build-win32 ; $(MAKE) dist-clean
207 $(MAKE) dist-package-unix
208 $(MAKE) dist-package-win32
209 $(MAKE) dist-package-macosx
210 $(MAKE) dist-package-macosx-ppc
213 $(MAKE) dist-upload-unix
214 $(MAKE) dist-upload-win32
215 $(MAKE) dist-upload-macosx
216 $(MAKE) dist-upload-macosx-ppc
218 dist-all: dist-build-all dist-package-all
220 upload-all: dist-upload-all
226 $(MAKE_CMD) TARGET=$(DEFAULT_TARGET) depend