moved code to separate function
[rocksndiamonds.git] / src / game_mm / Makefile
1 # =============================================================================
2 # Rocks'n'Diamonds - McDuffin Strikes Back!
3 # -----------------------------------------------------------------------------
4 # (c) 1989-2017 by Artsoft Entertainment
5 #                  Holger Schemel
6 #                  info@artsoft.org
7 #                  https://www.artsoft.org/
8 # -----------------------------------------------------------------------------
9 # The native Mirror Magic game engine is based on:
10 # - Mirror Magic II by Holger Schemel (Linux/DOS/Windows version, 1995)
11 # - Mindbender by Holger Schemel (Amiga version, 1989)
12 # -----------------------------------------------------------------------------
13 # src/game_mm/Makefile
14 # =============================================================================
15
16 # -----------------------------------------------------------------------------
17 # configuration
18 # -----------------------------------------------------------------------------
19
20 SRCS =  mm_init.c               \
21         mm_main.c               \
22         mm_game.c               \
23         mm_files.c              \
24         mm_tools.c
25
26 OBJS =  mm_init.o               \
27         mm_main.o               \
28         mm_game.o               \
29         mm_files.o              \
30         mm_tools.o
31
32 GAME_MM = game_mm.a
33
34
35 # -----------------------------------------------------------------------------
36 # build targets
37 # -----------------------------------------------------------------------------
38
39 all: $(GAME_MM)
40
41 $(GAME_MM): $(OBJS)
42         $(AR) cr $(GAME_MM) $(OBJS)
43         $(RANLIB) $(GAME_MM)
44
45 .c.o:
46         $(CC) $(PROFILING) $(CFLAGS) -c $*.c
47
48 clean:
49         $(RM) $(OBJS)
50         $(RM) $(GAME_MM)
51
52
53 # -----------------------------------------------------------------------------
54 # development only
55 # -----------------------------------------------------------------------------
56
57 depend:
58         for i in $(SRCS); do $(CPP) $(CFLAGS) -M $$i; done > .depend
59
60 depend-clean:
61         $(RM) .depend
62
63 ifeq (.depend,$(wildcard .depend))
64 include .depend
65 endif