1 #=============================================================================#
2 # Makefile for Rocks'n'Diamonds 1.2 #
3 # (c) 1995-98 Holger Schemel, aeglos@valinor.owl.de #
4 #=============================================================================#
6 ifndef PLATFORM # platform not defined -- try auto detection
14 ifdef X11_PATH # path to X11 specified by top level Makefile
15 XINC_PATH = $(X11_PATH)/include
16 XLIB_PATH = $(X11_PATH)/lib
17 X11_INCL = -I$(XINC_PATH)
18 X11_LIBS = -L$(XLIB_PATH)
21 ifndef GAME_DIR # path to game data not defined -- try '.'
25 ifndef SCORE_ENTRIES # number of score entries per player undefined
26 SCORE_ENTRIES = MANY_PER_NAME
30 # The Xpm library is no longer needed to build this program,
31 # but is used to load graphics if XPM_INCLUDE_FILE is defined.
32 # If you want to use the Xpm library, convert the PCX files to XPM
33 # files (and you need corresponding mask files in X11 Bitmap format).
35 # XPM_INCLUDE_FILE = -DXPM_INCLUDE_FILE="<X11/xpm.h>"
36 # EXTRA_X11_LIBS = -lXpm
39 ifeq ($(PLATFORM),dos) # DOS / Windows
42 PROGNAME = ..\rocks.exe
48 PROGNAME = ../rocksndiamonds
50 ifeq ($(PLATFORM),solaris)
51 EXTRA_LIBS = -lnsl -lsocket -R$(XLIB_PATH)
55 LIBS = $(X11_LIBS) $(EXTRA_X11_LIBS) -lX11 -lm $(EXTRA_LIBS)
60 CONFIG_GAME_DIR = -DGAME_DIR="\"$(GAME_DIR)\""
61 CONFIG_SCORE_ENTRIES = -D$(SCORE_ENTRIES)
63 CONFIG = $(CONFIG_GAME_DIR) $(SOUNDS) $(JOYSTICK) \
64 $(CONFIG_SCORE_ENTRIES) $(XPM_INCLUDE_FILE)
66 # OPTIONS = -DDEBUG -g -Wall # only for debugging purposes
69 # SYSTEM = -DSYSV -Ae # maybe needed for HP-UX
71 CFLAGS = $(OPTIONS) $(SYSTEM) $(INCL) $(CONFIG)
118 $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $(PROGNAME)
121 $(CC) $(CFLAGS) -c $*.c