X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2FMakefile;h=a652a6d49142cbef731f737d5eb45e17245b694d;hb=d2185c2bcdba9fc69846c99a2d01ef037ce2266f;hp=7333fb2803193b88aeb9f734a75b5b5ab2f152c9;hpb=c3d03cdffce070695ba0520d00667b42b8460087;p=rocksndiamonds.git diff --git a/src/Makefile b/src/Makefile index 7333fb28..a652a6d4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,77 +1,36 @@ -# -# Makefile fuer "Rocks'n'Diamonds -- McDuffin Strikes Back" -# +#=============================================================================# +# Makefile for Rocks'n'Diamonds 1.2 # +# (c) 1995-98 Holger Schemel, aeglos@valinor.owl.de # +#=============================================================================# -PROGNAME = rocksndiamonds - -RM = rm -f -CC = gcc -CPP = $(CC) -E -# CC = cc # for HP-UX and others - -GAME_DIR = -DGAME_DIR=\".\" # path of the game and its data -# JOYSTICK = -DNO_JOYSTICK # no joystick -# SOUNDS = -DNO_SOUNDS # no sounds -# SCORE_ENTRIES = -DONE_PER_NAME # only one score entry per name -SCORE_ENTRIES = -DMANY_PER_NAME # many score entries per name - -# the XPM-Library is needed to build this program: -XPM_INCLUDE_FILE = -DXPM_INCLUDE_FILE="" +#-----------------------------------------------------------------------------# +# configuration section # +#-----------------------------------------------------------------------------# -CONFIG = $(GAME_DIR) $(SOUNDS) $(JOYSTICK) \ - $(SCORE_ENTRIES) $(XPM_INCLUDE_FILE) +#-----------------------------------------------------------------------------# +# you shouldn't need to change anything below # +#-----------------------------------------------------------------------------# -# DEBUG = -DDEBUG -g -ansi -pedantic -Wall -# DEBUG = -DDEBUG -g -Wall -DEBUG = -O6 - -# SYSTEM = -Aa -D_HPUX_SOURCE -Dhpux # for HP-UX (obsolete) -# SYSTEM = -DSYSV -Ae # for HP-UX -# SYSTEM = -DSYSV # for systems without 'usleep()' -# INCL = -I/usr/include/X11R5 # for HP-UX and others -# LIBS = -lXpm -lX11 -lm -# LIBS = -L/usr/lib/X11R5 -lXpm -lX11 -lm # for HP-UX and others -LIBS = -lXpm -lXpm -lXpm -lX11 -lm # triple -lXpm; else I got an error... +PROGNAME = rocksndiamonds +SRC_DIR = src -# CFLAGS = -O2 $(CONFIG) $(SYSTEM) -CFLAGS = $(DEBUG) $(CONFIG) $(SYSTEM) $(INCL) +MAKE = make +RM = rm -f -SRCS = main.c \ - init.c \ - events.c \ - tools.c \ - screens.c \ - misc.c \ - game.c \ - editor.c \ - buttons.c \ - files.c \ - sound.c +MAKE_CMD = $(MAKE) -C $(SRC_DIR) -OBJS = main.o \ - init.o \ - events.o \ - tools.o \ - screens.o \ - misc.o \ - game.o \ - editor.o \ - buttons.o \ - files.o \ - sound.o -all: $(OBJS) - $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $(PROGNAME) +all: $(PROGNAME) -.c.o: - $(CC) $(CFLAGS) -c $*.c +$(PROGNAME): + $(MAKE_CMD) clean: - $(RM) $(OBJS) + $(MAKE_CMD) clean + $(RM) $(PROGNAME) -depend: - for i in $(SRCS); do $(CPP) $(CFLAGS) -M $$i; done > .depend +backup: + ./scripts/make_backup.sh -ifeq (.depend,$(wildcard .depend)) -include .depend -endif +depend: + $(MAKE_CMD) depend