rnd-20140114-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         msdos.c         \
25         x11.c           \
26         sdl.c
27
28 OBJS =  system.o        \
29         gadgets.o       \
30         text.o          \
31         sound.o         \
32         snapshot.o      \
33         joystick.o      \
34         toons.o         \
35         pcx.o           \
36         image.o         \
37         random.o        \
38         hash.o          \
39         setup.o         \
40         misc.o          \
41         msdos.o         \
42         x11.o           \
43         sdl.o
44
45 LIBGAME = libgame.a
46
47
48 # -----------------------------------------------------------------------------
49 # build targets
50 # -----------------------------------------------------------------------------
51
52 all: $(LIBGAME)
53
54 $(LIBGAME): $(OBJS)
55         $(AR) cru $(LIBGAME) $(OBJS)
56         $(RANLIB) $(LIBGAME)
57
58 .c.o:
59         $(CC) $(PROFILING) $(CFLAGS) -c $*.c
60
61 clean:
62         $(RM) $(OBJS)
63         $(RM) $(LIBGAME)
64
65
66 # -----------------------------------------------------------------------------
67 # development only
68 # -----------------------------------------------------------------------------
69
70 depend:
71         for i in $(SRCS); do $(CPP) $(CFLAGS) -M $$i; done > .depend
72
73 ifeq (.depend,$(wildcard .depend))
74 include .depend
75 endif