rnd-20031019-4-src
[rocksndiamonds.git] / src / libgame / Makefile
1 # =============================================================================
2 # Rocks'n'Diamonds Makefile (libgame)
3 # -----------------------------------------------------------------------------
4 # (c) 1995-2003 Holger Schemel <info@artsoft.org>
5 # =============================================================================
6
7 # -----------------------------------------------------------------------------
8 # configuration
9 # -----------------------------------------------------------------------------
10
11 SRCS =  system.c        \
12         gadgets.c       \
13         text.c          \
14         sound.c         \
15         joystick.c      \
16         toons.c         \
17         pcx.c           \
18         image.c         \
19         random.c        \
20         hash.c          \
21         setup.c         \
22         misc.c          \
23         msdos.c         \
24         x11.c           \
25         sdl.c
26
27 OBJS =  system.o        \
28         gadgets.o       \
29         text.o          \
30         sound.o         \
31         joystick.o      \
32         toons.o         \
33         pcx.o           \
34         image.o         \
35         random.o        \
36         hash.o          \
37         setup.o         \
38         misc.o          \
39         msdos.o         \
40         x11.o           \
41         sdl.o
42
43 LIBGAME = libgame.a
44
45
46 # -----------------------------------------------------------------------------
47 # build targets
48 # -----------------------------------------------------------------------------
49
50 all: $(LIBGAME)
51
52 $(LIBGAME): $(OBJS)
53         $(AR) cru $(LIBGAME) $(OBJS)
54         $(RANLIB) $(LIBGAME)
55
56 .c.o:
57         $(CC) $(PROFILING) $(CFLAGS) -c $*.c
58
59 clean:
60         $(RM) $(OBJS)
61         $(RM) $(LIBGAME)
62
63
64 # -----------------------------------------------------------------------------
65 # development only
66 # -----------------------------------------------------------------------------
67
68 depend:
69         for i in $(SRCS); do $(CPP) $(CFLAGS) -M $$i; done > .depend
70
71 ifeq (.depend,$(wildcard .depend))
72 include .depend
73 endif