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 # directory for read-only game data (like graphics, sounds, levels)
20 # default is '.' to be able to run program without installation
21 # RO_GAME_DIR = /usr/games
22 # use the following setting for Debian / Ubuntu installations:
23 # RO_GAME_DIR = /usr/share/games/rocksndiamonds
25 # directory for writable game data (like highscore files)
26 # default is '.' to be able to run program without installation
27 # RW_GAME_DIR = /var/games
28 # use the following setting for Debian / Ubuntu installations:
29 # RW_GAME_DIR = /var/games/rocksndiamonds
31 # uncomment if system has no joystick include file
32 # JOYSTICK = -DNO_JOYSTICK
34 # choose if more than one global score file entry for one player is allowed
35 # (default: MANY_PER_NAME)
36 # uncomment to install game in multi-user environment
37 # SCORE_ENTRIES = ONE_PER_NAME
38 # uncomment to install game in single-user environment (default)
39 # SCORE_ENTRIES = MANY_PER_NAME
41 # path for cross-compiling (only needed for non-native Windows build)
42 CROSS_PATH_WIN32 = /usr/local/cross-tools/i386-mingw32msvc
44 # compile special edition of R'n'D instead of the normal (classic) version
45 # SPECIAL_EDITION = rnd_jue
48 # -----------------------------------------------------------------------------
49 # there should be no need to change anything below
50 # -----------------------------------------------------------------------------
52 .EXPORT_ALL_VARIABLES:
55 MAKE_CMD = $(MAKE) -C $(SRC_DIR)
60 # -----------------------------------------------------------------------------
62 # -----------------------------------------------------------------------------
65 @$(MAKE_CMD) TARGET=$(DEFAULT_TARGET)
68 @$(MAKE_CMD) TARGET=sdl
71 @$(MAKE_CMD) TARGET=sdl2
74 @$(MAKE_CMD) PLATFORM=macosx
77 @$(MAKE_CMD) PLATFORM=macosx TARGET=sdl-static
80 @$(MAKE_CMD) PLATFORM=macosx TARGET=sdl2-static
83 @$(MAKE_CMD) PLATFORM=os2
86 @PATH=$(CROSS_PATH_WIN32)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win32
92 # -----------------------------------------------------------------------------
93 # development, test, distribution build and packaging targets
94 # -----------------------------------------------------------------------------
97 @$(MAKE_CMD) auto-conf
106 @$(MAKE_CMD) valgrind
109 ./Scripts/make_enginetest.sh
111 enginetestcustom: all
112 ./Scripts/make_enginetest.sh custom
115 ./Scripts/make_enginetest.sh fast
118 ./Scripts/make_enginetest.sh new
121 ./Scripts/make_enginetest.sh leveltest
123 levelsketch_images: all
124 ./Scripts/make_levelsketch_images.sh
127 ./Scripts/make_backup.sh src tar
130 ./Scripts/make_backup.sh src scp
132 backup-all: backup backup-net-copy
135 ./Scripts/make_backup.sh lev
138 ./Scripts/make_backup.sh gfx
141 # ./Scripts/make_prerelease.sh
144 @$(MAKE) SPECIAL_EDITION=rnd_jue all
147 @$(MAKE) SPECIAL_EDITION=rnd_jue cross-win32
150 @$(MAKE_CMD) dist-clean
153 @BUILD_DIST=TRUE $(MAKE)
156 @BUILD_DIST=TRUE $(MAKE) cross-win32
159 # (this is done by "dist-package-macosx" target)
161 dist-build-macosx-ppc:
162 # (this is done by "dist-package-macosx-ppc" target)
165 ./Scripts/make_dist.sh unix .
168 ./Scripts/make_dist.sh win .
171 ./Scripts/make_dist.sh mac . $(MAKE)
173 dist-package-macosx-ppc:
174 ./Scripts/make_dist.sh mac-ppc . $(MAKE)
177 ./Scripts/make_dist.sh unix . upload
180 ./Scripts/make_dist.sh win . upload
183 ./Scripts/make_dist.sh mac . upload
185 dist-upload-macosx-ppc:
186 ./Scripts/make_dist.sh mac-ppc . upload
190 $(MAKE) dist-build-unix ; $(MAKE) dist-clean
191 $(MAKE) dist-build-win32 ; $(MAKE) dist-clean
194 $(MAKE) dist-package-unix
195 $(MAKE) dist-package-win32
196 $(MAKE) dist-package-macosx
197 $(MAKE) dist-package-macosx-ppc
200 $(MAKE) dist-upload-unix
201 $(MAKE) dist-upload-win32
202 $(MAKE) dist-upload-macosx
203 $(MAKE) dist-upload-macosx-ppc
205 dist-all: dist-build-all dist-package-all
207 upload-all: dist-upload-all
213 $(MAKE_CMD) TARGET=$(DEFAULT_TARGET) depend