projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-19991005-1-src
[rocksndiamonds.git]
/
src
/
Makefile
diff --git
a/src/Makefile
b/src/Makefile
index 6dc3a1a2480e7645034ce1ae99dbfa051f5ff3dd..4a065da30c83d35377a455aace7d9b5ee13a0373 100644
(file)
--- a/
src/Makefile
+++ b/
src/Makefile
@@
-16,8
+16,11
@@
CC = gcc
# specify X11 library path on your system
XLIB_PATH = /usr/X11/lib
# specify X11 library path on your system
XLIB_PATH = /usr/X11/lib
-# change this to the directory where you want to install game data like levels
-GAME_DIR = .
+# choose directory for read-only game data (like graphics, sounds, levels)
+# RO_GAME_DIR = /usr/games
+
+# choose directory for writable game data (like highscore files)
+# RW_GAME_DIR = /var/games
# uncomment this if your system has no joystick include file
# JOYSTICK = -DNO_JOYSTICK
# uncomment this if your system has no joystick include file
# JOYSTICK = -DNO_JOYSTICK
@@
-28,8
+31,8
@@
GAME_DIR = .
# choose if you want to allow many global score file entries for one player
# when installing the game in a multi user environment, choose this
# SCORE_ENTRIES = ONE_PER_NAME
# choose if you want to allow many global score file entries for one player
# when installing the game in a multi user environment, choose this
# SCORE_ENTRIES = ONE_PER_NAME
-# when installing the game in a single user environment, choose this
-SCORE_ENTRIES = MANY_PER_NAME
+# when installing the game in a single user environment, choose this
(default)
+
#
SCORE_ENTRIES = MANY_PER_NAME
# The XPM-Library is no longer needed to build this program,
# but is used to load graphics if XPM_INCLUDE_FILE is defined,
# The XPM-Library is no longer needed to build this program,
# but is used to load graphics if XPM_INCLUDE_FILE is defined,
@@
-44,20
+47,46
@@
SCORE_ENTRIES = MANY_PER_NAME
# you shouldn't need to change anything below #
#-----------------------------------------------------------------------------#
# you shouldn't need to change anything below #
#-----------------------------------------------------------------------------#
-PROGNAME = rocksndiamonds
+ifdef COMSPEC
+PLATFORM = dos
+else
+PLATFORM = unix
+endif
+ifeq ($(PLATFORM),unix)
RM = rm -f
RM = rm -f
+PROGNAME = ../rocksndiamonds
+LIBS = -L$(XLIB_PATH) $(EXTRA_X11_LIBS) -lX11 -lm $(EXTRA_LIBS)
+else
+RM = del
+PROGNAME = ../rocks.exe
+LIBS = -s -lm -lalleg
+endif
+
CPP = $(CC) -E
CPP = $(CC) -E
-CONFIG_GAME_DIR = -DGAME_DIR="\"$(GAME_DIR)\""
+ifdef RO_GAME_DIR
+CONFIG_RO_GAME_DIR = -DRO_GAME_DIR="\"$(RO_GAME_DIR)\""
+endif
+
+ifdef RW_GAME_DIR
+CONFIG_RW_GAME_DIR = -DRW_GAME_DIR="\"$(RW_GAME_DIR)\""
+endif
+
+ifdef SCORE_ENTRIES
CONFIG_SCORE_ENTRIES = -D$(SCORE_ENTRIES)
CONFIG_SCORE_ENTRIES = -D$(SCORE_ENTRIES)
+endif
+
+CONFIG_GAME_DIR = $(CONFIG_RO_GAME_DIR) $(CONFIG_RW_GAME_DIR)
CONFIG = $(CONFIG_GAME_DIR) $(SOUNDS) $(JOYSTICK) \
$(CONFIG_SCORE_ENTRIES) $(XPM_INCLUDE_FILE)
CONFIG = $(CONFIG_GAME_DIR) $(SOUNDS) $(JOYSTICK) \
$(CONFIG_SCORE_ENTRIES) $(XPM_INCLUDE_FILE)
-# DEBUG = -DDEBUG -g -
ansi -pedantic -Wall
+# DEBUG = -DDEBUG -g -
Wall -ansi -pedantic
DEBUG = -DDEBUG -g -Wall
DEBUG = -DDEBUG -g -Wall
-# DEBUG = -O6
+# DEBUG = -O3 -Wall -ansi -pedantic
+# DEBUG = -O3 -Wall
+# DEBUG = -O3
# SYSTEM = -Aa -D_HPUX_SOURCE -Dhpux # for HP-UX (obsolete)
# SYSTEM = -DSYSV -Ae # for HP-UX
# SYSTEM = -Aa -D_HPUX_SOURCE -Dhpux # for HP-UX (obsolete)
# SYSTEM = -DSYSV -Ae # for HP-UX
@@
-72,7
+101,8
@@
DEBUG = -DDEBUG -g -Wall
# LIBS = -L/usr/X11R6/lib -lX11 -lm
# LIBS = -L/usr/X11R6/lib $(EXTRA_X11_LIBS) -lX11 -lm $(EXTRA_LIBS)
# LIBS = -L/usr/X11R6/lib -lX11 -lm
# LIBS = -L/usr/X11R6/lib $(EXTRA_X11_LIBS) -lX11 -lm $(EXTRA_LIBS)
-LIBS = -L$(XLIB_PATH) $(EXTRA_X11_LIBS) -lX11 -lm $(EXTRA_LIBS)
+
+# LIBS = -L$(XLIB_PATH) $(EXTRA_X11_LIBS) -lX11 -lm $(EXTRA_LIBS)
# CFLAGS = -O2 $(CONFIG) $(SYSTEM)
CFLAGS = $(DEBUG) $(CONFIG) $(SYSTEM) $(INCL)
# CFLAGS = -O2 $(CONFIG) $(SYSTEM)
CFLAGS = $(DEBUG) $(CONFIG) $(SYSTEM) $(INCL)
@@
-95,7
+125,8
@@
SRCS = main.c \
pcx.c \
image.c \
network.c \
pcx.c \
image.c \
network.c \
- netserv.c
+ netserv.c \
+ msdos.c
OBJS = main.o \
init.o \
OBJS = main.o \
init.o \
@@
-115,7
+146,8
@@
OBJS = main.o \
pcx.o \
image.o \
network.o \
pcx.o \
image.o \
network.o \
- netserv.o
+ netserv.o \
+ msdos.o
all: $(PROGNAME)
all: $(PROGNAME)
@@
-126,10
+158,8
@@
$(PROGNAME): $(OBJS)
$(CC) $(CFLAGS) -c $*.c
clean:
$(CC) $(CFLAGS) -c $*.c
clean:
- $(RM) $(PROGNAME) $(SERVNAME) $(OBJS)
-
-backup:
- ./make_backup.sh
+ $(RM) *.o
+ $(RM) $(PROGNAME)
depend:
for i in $(SRCS); do $(CPP) $(CFLAGS) -M $$i; done > .depend
depend:
for i in $(SRCS); do $(CPP) $(CFLAGS) -M $$i; done > .depend