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=msdos
97 @$(MAKE_CMD) PLATFORM=os2
100 @PATH=$(CROSS_PATH_MSDOS)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-msdos
103 @PATH=$(CROSS_PATH_WIN32)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win32
109 # -----------------------------------------------------------------------------
110 # development, test, distribution build and packaging targets
111 # -----------------------------------------------------------------------------
114 @$(MAKE_CMD) auto-conf
123 @$(MAKE_CMD) valgrind
126 ./Scripts/make_enginetest.sh
128 enginetestcustom: all
129 ./Scripts/make_enginetest.sh custom
132 ./Scripts/make_enginetest.sh fast
135 ./Scripts/make_enginetest.sh new
138 ./Scripts/make_enginetest.sh leveltest
140 levelsketch_images: all
141 ./Scripts/make_levelsketch_images.sh
144 ./Scripts/make_backup.sh src tar
147 ./Scripts/make_backup.sh src scp
149 backup-all: backup backup-net-copy
152 ./Scripts/make_backup.sh lev
155 ./Scripts/make_backup.sh gfx
158 # ./Scripts/make_prerelease.sh
161 @$(MAKE) SPECIAL_EDITION=rnd_jue all
164 @$(MAKE) SPECIAL_EDITION=rnd_jue cross-win32
167 @$(MAKE_CMD) dist-clean
170 @BUILD_DIST=TRUE $(MAKE) x11
173 @BUILD_DIST=TRUE $(MAKE) cross-msdos
176 @BUILD_DIST=TRUE $(MAKE) cross-win32
179 # (this is done by "dist-package-macosx" target)
181 dist-build-macosx-ppc:
182 # (this is done by "dist-package-macosx-ppc" target)
185 ./Scripts/make_dist.sh unix .
188 ./Scripts/make_dist.sh dos .
191 ./Scripts/make_dist.sh win .
194 ./Scripts/make_dist.sh mac . $(MAKE)
196 dist-package-macosx-ppc:
197 ./Scripts/make_dist.sh mac-ppc . $(MAKE)
200 ./Scripts/make_dist.sh unix . upload
203 ./Scripts/make_dist.sh dos . upload
206 ./Scripts/make_dist.sh win . upload
209 ./Scripts/make_dist.sh mac . upload
211 dist-upload-macosx-ppc:
212 ./Scripts/make_dist.sh mac-ppc . upload
216 $(MAKE) dist-build-unix ; $(MAKE) dist-clean
217 $(MAKE) dist-build-win32 ; $(MAKE) dist-clean
218 # $(MAKE) dist-build-msdos ; $(MAKE) dist-clean
221 $(MAKE) dist-package-unix
222 $(MAKE) dist-package-win32
223 $(MAKE) dist-package-macosx
224 $(MAKE) dist-package-macosx-ppc
225 # $(MAKE) dist-package-msdos
228 $(MAKE) dist-upload-unix
229 $(MAKE) dist-upload-win32
230 $(MAKE) dist-upload-macosx
231 $(MAKE) dist-upload-macosx-ppc
232 # $(MAKE) dist-upload-msdos
234 dist-all: dist-build-all dist-package-all
236 upload-all: dist-upload-all
242 $(MAKE_CMD) TARGET=$(DEFAULT_TARGET) depend