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