rnd-20140515-1-src
[rocksndiamonds.git] / src / libgame / Makefile
1 # =============================================================================
2 # Rocks'n'Diamonds Makefile (libgame)
3 # -----------------------------------------------------------------------------
4 # (c) 1995-2006 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         snapshot.c      \
17         toons.c         \
18         pcx.c           \
19         image.c         \
20         random.c        \
21         hash.c          \
22         setup.c         \
23         misc.c          \
24         x11.c           \
25         sdl.c
26
27 OBJS =  system.o        \
28         gadgets.o       \
29         text.o          \
30         sound.o         \
31         snapshot.o      \
32         joystick.o      \
33         toons.o         \
34         pcx.o           \
35         image.o         \
36         random.o        \
37         hash.o          \
38         setup.o         \
39         misc.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