1 # =============================================================================
2 # Rocks'n'Diamonds Makefile
3 # -----------------------------------------------------------------------------
4 # (c) 1995-2006 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
26 # directory for writable game data (like highscore files)
27 # default is '.' to be able to run program without installation
28 # RW_GAME_DIR = /var/games
30 # uncomment if system has no joystick include file
31 # JOYSTICK = -DNO_JOYSTICK
33 # choose if more than one global score file entry for one player is allowed
34 # (default: MANY_PER_NAME)
35 # uncomment to install game in multi-user environment
36 # SCORE_ENTRIES = ONE_PER_NAME
37 # uncomment to install game in single-user environment (default)
38 # SCORE_ENTRIES = MANY_PER_NAME
40 # paths for cross-compiling (only needed for non-native MS-DOS and Win32 build)
41 CROSS_PATH_MSDOS=/usr/local/cross-msdos/i386-msdosdjgpp
42 CROSS_PATH_WIN32=/usr/local/cross-tools/i386-mingw32msvc
44 # -----------------------------------------------------------------------------
45 # there should be no need to change anything below
46 # -----------------------------------------------------------------------------
48 .EXPORT_ALL_VARIABLES:
51 MAKE_CMD = $(MAKE) -C $(SRC_DIR)
53 # DEFAULT_TARGET = x11
57 # -----------------------------------------------------------------------------
59 # -----------------------------------------------------------------------------
62 @$(MAKE_CMD) TARGET=$(DEFAULT_TARGET)
65 @$(MAKE_CMD) TARGET=x11
68 @$(MAKE_CMD) TARGET=sdl
71 @$(MAKE_CMD) PLATFORM=solaris TARGET=x11
74 @$(MAKE_CMD) PLATFORM=solaris TARGET=sdl
77 @$(MAKE_CMD) PLATFORM=macosx
80 @$(MAKE_CMD) PLATFORM=macosx TARGET=sdl-static
83 @$(MAKE_CMD) PLATFORM=msdos
86 @$(MAKE_CMD) PLATFORM=os2
89 @PATH=$(CROSS_PATH_MSDOS)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-msdos
92 @PATH=$(CROSS_PATH_WIN32)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win32
95 @PATH=$(CROSS_PATH_WIN32)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win32 \
102 # -----------------------------------------------------------------------------
104 # -----------------------------------------------------------------------------
107 @$(MAKE_CMD) auto-conf
110 @./rocksndiamonds --verbose
113 @gdb -batch -x GDB_COMMANDS ./rocksndiamonds
116 @valgrind -v --leak-check=yes ./rocksndiamonds 2> valgrind.out
119 ./Scripts/make_enginetest.sh
121 enginetestcustom: all
122 ./Scripts/make_enginetest.sh custom
125 ./Scripts/make_enginetest.sh fast
128 ./Scripts/make_enginetest.sh new
131 ./Scripts/make_enginetest.sh leveltest
134 ./Scripts/make_backup.sh src 1
137 ./Scripts/make_backup.sh src 2
140 ./Scripts/make_backup.sh src 3
143 ./Scripts/make_backup.sh lev
146 ./Scripts/make_backup.sh gfx
149 # ./Scripts/make_prerelease.sh
152 ./Scripts/make_dist.sh unix .
155 ./Scripts/make_dist.sh dos .
158 ./Scripts/make_dist.sh win .
161 ./Scripts/make_dist.sh mac . $(MAKE)
164 ./Scripts/make_dist.sh unix . upload
167 ./Scripts/make_dist.sh dos . upload
170 ./Scripts/make_dist.sh win . upload
173 ./Scripts/make_dist.sh mac . upload
176 @$(MAKE_CMD) dist-clean
179 @BUILD_DIST=TRUE $(MAKE) x11
182 @BUILD_DIST=TRUE $(MAKE) cross-win32
185 @BUILD_DIST=TRUE $(MAKE) cross-msdos
189 $(MAKE) dist-build-unix ; $(MAKE) dist-clean
190 $(MAKE) dist-build-win32 ; $(MAKE) dist-clean
191 # $(MAKE) dist-build-msdos ; $(MAKE) dist-clean
193 # dist-all: dist-build-all dist-unix dist-msdos dist-win32 dist-macosx
194 dist-all: dist-build-all dist-unix dist-win32 dist-macosx
196 # upload-all: upload-unix upload-msdos upload-win32 upload-macosx
197 upload-all: upload-unix upload-win32 upload-macosx