273cecdda90277cbadcf84e30b6b2a34e39aca84
[rocksndiamonds.git] / src / Makefile
1 #
2 # Makefile fuer "Rocks'n'Diamonds -- McDuffin Strikes Back"
3 #
4
5 PROGNAME = rocksndiamonds
6
7 RM = rm -f
8 CC = gcc
9 CPP = $(CC) -E
10 # CC = cc                               # for HP-UX and others
11
12 GAME_DIR = -DGAME_DIR=\".\"             # path of the game and its data
13 # JOYSTICK = -DNO_JOYSTICK              # no joystick
14 # SOUNDS = -DNO_SOUNDS                  # no sounds
15 # SCORE_ENTRIES = -DONE_PER_NAME        # only one score entry per name
16 SCORE_ENTRIES = -DMANY_PER_NAME         # many score entries per name
17
18 # the XPM-Library is needed to build this program:
19 XPM_INCLUDE_FILE = -DXPM_INCLUDE_FILE="<X11/xpm.h>"
20
21 CONFIG = $(GAME_DIR) $(SOUNDS) $(JOYSTICK)      \
22          $(SCORE_ENTRIES) $(XPM_INCLUDE_FILE)
23
24 # DEBUG = -DDEBUG -g -ansi -pedantic -Wall
25 DEBUG = -DDEBUG -g -Wall
26 # DEBUG = -O6
27
28 # SYSTEM = -Aa -D_HPUX_SOURCE -Dhpux    # for HP-UX (obsolete)
29 # SYSTEM = -DSYSV -Ae                   # for HP-UX
30 # SYSTEM = -DSYSV                       # for systems without 'usleep()'
31 # INCL = -I/usr/include/X11R5           # for HP-UX and others
32 # LIBS = -L/usr/lib/X11R5 -lXpm -lX11 -lm # for HP-UX and others
33 LIBS = -L/usr/X11R6/lib -lXpm -lX11 -lm
34
35 # CFLAGS = -O2 $(CONFIG) $(SYSTEM)
36 CFLAGS = $(DEBUG) $(CONFIG) $(SYSTEM) $(INCL)
37
38 SRCS =  main.c          \
39         init.c          \
40         events.c        \
41         tools.c         \
42         screens.c       \
43         misc.c          \
44         game.c          \
45         editor.c        \
46         buttons.c       \
47         files.c         \
48         tape.c          \
49         sound.c
50
51 OBJS =  main.o          \
52         init.o          \
53         events.o        \
54         tools.o         \
55         screens.o       \
56         misc.o          \
57         game.o          \
58         editor.o        \
59         buttons.o       \
60         files.o         \
61         tape.o          \
62         sound.o
63
64 all:    $(OBJS)
65         $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $(PROGNAME)
66
67 .c.o:
68         $(CC) $(CFLAGS) -c $*.c
69
70 clean:
71         $(RM) $(OBJS)