1 # =============================================================================
2 # Rocks'n'Diamonds Makefile
3 # -----------------------------------------------------------------------------
4 # (c) 1995-2003 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=msdos
83 @$(MAKE_CMD) PLATFORM=os2
86 @PATH=$(CROSS_PATH_MSDOS)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-msdos
89 @PATH=$(CROSS_PATH_WIN32)/bin:${PATH} $(MAKE_CMD) PLATFORM=cross-win32
95 # -----------------------------------------------------------------------------
97 # -----------------------------------------------------------------------------
100 @$(MAKE_CMD) auto-conf
103 @./rocksndiamonds --verbose
106 @gdb ./rocksndiamonds
109 @valgrind -v --leak-check=yes ./rocksndiamonds 2> valgrind.out
112 ./Scripts/make_enginetest.sh
114 enginetestcustom: all
115 ./Scripts/make_enginetest.sh custom
118 ./Scripts/make_enginetest.sh fast
121 ./Scripts/make_enginetest.sh new
124 ./Scripts/make_backup.sh src
127 ./Scripts/make_backup.sh lev
130 ./Scripts/make_backup.sh gfx
133 ./Scripts/make_dist.sh unix .
136 ./Scripts/make_dist.sh dos .
139 ./Scripts/make_dist.sh win .
142 ./Scripts/make_dist.sh mac . $(MAKE)
145 ./Scripts/make_dist.sh unix . upload
148 ./Scripts/make_dist.sh dos . upload
151 ./Scripts/make_dist.sh win . upload
154 ./Scripts/make_dist.sh mac . upload
157 @$(MAKE_CMD) dist-clean
160 @BUILD_DIST=TRUE $(MAKE) x11
163 @BUILD_DIST=TRUE $(MAKE) cross-win32
166 @BUILD_DIST=TRUE $(MAKE) cross-msdos
170 $(MAKE) dist-build-unix ; $(MAKE) dist-clean
171 $(MAKE) dist-build-win32 ; $(MAKE) dist-clean
172 $(MAKE) dist-build-msdos ; $(MAKE) dist-clean
174 dist-all: dist-build-all dist-unix dist-msdos dist-win32 dist-macosx
176 upload-all: upload-unix upload-msdos upload-win32 upload-macosx