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