1 #=============================================================================#
2 # Makefile for Rocks'n'Diamonds 1.2 #
3 # (c) 1995-98 Holger Schemel, aeglos@valinor.owl.de #
4 #=============================================================================#
6 #-----------------------------------------------------------------------------#
7 # configuration section #
8 #-----------------------------------------------------------------------------#
10 # change this to your favorite ANSI C compiler
13 # on Solaris and similar systems, you'll need to uncomment this
14 # EXTRA_LIBS = -lnsl -lsocket
16 # specify X11 library path on your system
17 XLIB_PATH = /usr/X11/lib
19 # choose directory for read-only game data (like graphics, sounds, levels)
20 # RO_GAME_DIR = /usr/games
22 # choose directory for writable game data (like highscore files)
23 # RW_GAME_DIR = /var/games
25 # uncomment this if your system has no joystick include file
26 # JOYSTICK = -DNO_JOYSTICK
28 # uncomment this if your system has no sound
29 # SOUNDS = -DNO_SOUNDS
31 # choose if you want to allow many global score file entries for one player
32 # when installing the game in a multi user environment, choose this
33 # SCORE_ENTRIES = ONE_PER_NAME
34 # when installing the game in a single user environment, choose this
35 SCORE_ENTRIES = MANY_PER_NAME
37 # The XPM-Library is no longer needed to build this program,
38 # but is used to load graphics if XPM_INCLUDE_FILE is defined,
39 # because the GIF loading routines are still a bit beta.
40 # If you want to use the Xpm library, convert the GIF files to Xpm
41 # files (and you need corresponding mask files in xbm format).
43 # XPM_INCLUDE_FILE = -DXPM_INCLUDE_FILE="<X11/xpm.h>"
44 # EXTRA_X11_LIBS = -lXpm
46 #-----------------------------------------------------------------------------#
47 # you shouldn't need to change anything below #
48 #-----------------------------------------------------------------------------#
56 ifeq ($(PLATFORM),unix)
58 PROGNAME = ../rocksndiamonds
59 LIBS = -L$(XLIB_PATH) $(EXTRA_X11_LIBS) -lX11 -lm $(EXTRA_LIBS)
62 PROGNAME = ../rocks.exe
69 CONFIG_RO_GAME_DIR = -DRO_GAME_DIR="\"$(RO_GAME_DIR)\""
73 CONFIG_RW_GAME_DIR = -DRW_GAME_DIR="\"$(RW_GAME_DIR)\""
76 CONFIG_SCORE_ENTRIES = -D$(SCORE_ENTRIES)
78 CONFIG_GAME_DIR = $(CONFIG_RO_GAME_DIR) $(CONFIG_RW_GAME_DIR)
80 CONFIG = $(CONFIG_GAME_DIR) $(SOUNDS) $(JOYSTICK) \
81 $(CONFIG_SCORE_ENTRIES) $(XPM_INCLUDE_FILE)
83 # DEBUG = -DDEBUG -g -Wall -ansi -pedantic
84 DEBUG = -DDEBUG -g -Wall
85 # DEBUG = -O3 -Wall -ansi -pedantic
89 # SYSTEM = -Aa -D_HPUX_SOURCE -Dhpux # for HP-UX (obsolete)
90 # SYSTEM = -DSYSV -Ae # for HP-UX
91 # INCL = -I/usr/include/X11R5 # for HP-UX and others
92 # INCL = -I/usr/local/X11/include # for SunOS and others
93 # LIBS = -L/usr/lib/X11R5 -lXpm -lX11 -lm
94 # # for HP-UX and others
95 # LIBS = -L/usr/local/X11/lib -lXpm -lX11 -lm -lsocket -R/usr/local/X11/lib
96 # # for SunOS and others
98 # LIBS = -L/usr/X11R6/lib -lXpm -lX11 -lm
99 # LIBS = -L/usr/X11R6/lib -lX11 -lm
101 # LIBS = -L/usr/X11R6/lib $(EXTRA_X11_LIBS) -lX11 -lm $(EXTRA_LIBS)
103 # LIBS = -L$(XLIB_PATH) $(EXTRA_X11_LIBS) -lX11 -lm $(EXTRA_LIBS)
105 # CFLAGS = -O2 $(CONFIG) $(SYSTEM)
106 CFLAGS = $(DEBUG) $(CONFIG) $(SYSTEM) $(INCL)
153 $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $(PROGNAME)
156 $(CC) $(CFLAGS) -c $*.c
163 for i in $(SRCS); do $(CPP) $(CFLAGS) -M $$i; done > .depend
165 ifeq (.depend,$(wildcard .depend))