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 # paths for cross-compiling (only needed for non-native MS-DOS and Win32 build)
45 CROSS_PATH_MSDOS = /usr/local/cross-msdos/i386-msdosdjgpp
46 CROSS_PATH_WIN32 = /usr/local/cross-tools/i386-mingw32msvc
48 # compile special edition of R'n'D instead of the normal (classic) version
49 # SPECIAL_EDITION = rnd_jue
52 # -----------------------------------------------------------------------------
53 # there should be no need to change anything below
54 # -----------------------------------------------------------------------------
56 .EXPORT_ALL_VARIABLES:
59 MAKE_CMD = $(MAKE) -C $(SRC_DIR)
61 # DEFAULT_TARGET = x11
65 # -----------------------------------------------------------------------------
67 # -----------------------------------------------------------------------------
70 @$(MAKE_CMD) TARGET=$(DEFAULT_TARGET)
73 @$(MAKE_CMD) TARGET=x11
76 @$(MAKE_CMD) TARGET=sdl
79 @$(MAKE_CMD) TARGET=sdl2
82 @$(MAKE_CMD) PLATFORM=solaris TARGET=x11
85 @$(MAKE_CMD) PLATFORM=solaris TARGET=sdl
88 @$(MAKE_CMD) PLATFORM=macosx
91 @$(MAKE_CMD) PLATFORM=macosx TARGET=sdl-static
94 @$(MAKE_CMD) PLATFORM=macosx TARGET=sdl2-static
97 @$(MAKE_CMD) PLATFORM=msdos
100 @$(MAKE_CMD) PLATFORM=os2
103 @PATH=$(CROSS_PATH_MSDOS)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-msdos
106 @PATH=$(CROSS_PATH_WIN32)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win32
112 # -----------------------------------------------------------------------------
113 # development, test, distribution build and packaging targets
114 # -----------------------------------------------------------------------------
117 @$(MAKE_CMD) auto-conf
126 @$(MAKE_CMD) valgrind
129 ./Scripts/make_enginetest.sh
131 enginetestcustom: all
132 ./Scripts/make_enginetest.sh custom
135 ./Scripts/make_enginetest.sh fast
138 ./Scripts/make_enginetest.sh new
141 ./Scripts/make_enginetest.sh leveltest
143 levelsketch_images: all
144 ./Scripts/make_levelsketch_images.sh
147 ./Scripts/make_backup.sh src tar
150 ./Scripts/make_backup.sh src scp
152 backup-all: backup backup-net-copy
155 ./Scripts/make_backup.sh lev
158 ./Scripts/make_backup.sh gfx
161 # ./Scripts/make_prerelease.sh
164 @$(MAKE) SPECIAL_EDITION=rnd_jue all
167 @$(MAKE) SPECIAL_EDITION=rnd_jue cross-win32
170 @$(MAKE_CMD) dist-clean
173 @BUILD_DIST=TRUE $(MAKE)
176 @BUILD_DIST=TRUE $(MAKE) cross-msdos
179 @BUILD_DIST=TRUE $(MAKE) cross-win32
182 # (this is done by "dist-package-macosx" target)
184 dist-build-macosx-ppc:
185 # (this is done by "dist-package-macosx-ppc" target)
188 ./Scripts/make_dist.sh unix .
191 ./Scripts/make_dist.sh dos .
194 ./Scripts/make_dist.sh win .
197 ./Scripts/make_dist.sh mac . $(MAKE)
199 dist-package-macosx-ppc:
200 ./Scripts/make_dist.sh mac-ppc . $(MAKE)
203 ./Scripts/make_dist.sh unix . upload
206 ./Scripts/make_dist.sh dos . upload
209 ./Scripts/make_dist.sh win . upload
212 ./Scripts/make_dist.sh mac . upload
214 dist-upload-macosx-ppc:
215 ./Scripts/make_dist.sh mac-ppc . upload
219 $(MAKE) dist-build-unix ; $(MAKE) dist-clean
220 $(MAKE) dist-build-win32 ; $(MAKE) dist-clean
221 # $(MAKE) dist-build-msdos ; $(MAKE) dist-clean
224 $(MAKE) dist-package-unix
225 $(MAKE) dist-package-win32
226 $(MAKE) dist-package-macosx
227 $(MAKE) dist-package-macosx-ppc
228 # $(MAKE) dist-package-msdos
231 $(MAKE) dist-upload-unix
232 $(MAKE) dist-upload-win32
233 $(MAKE) dist-upload-macosx
234 $(MAKE) dist-upload-macosx-ppc
235 # $(MAKE) dist-upload-msdos
237 dist-all: dist-build-all dist-package-all
239 upload-all: dist-upload-all
245 $(MAKE_CMD) TARGET=$(DEFAULT_TARGET) depend