forked from avose/ChromoCraft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
103 lines (68 loc) · 2.69 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
CC= gcc
OPTS= -std=gnu99
# Debug options
GCFLAGS= -g -Wall
GLIBS= -lm -lpthread -lGL -lGLU -lX11 -lopenal -lalut
# Release options
CFLAGS= -O3 -Wall
LIBS= -lm -lpthread -lGL -lGLU -lX11 -lopenal -lalut
all: chromo_craft
debug: CFLAGS = $(GCFLAGS)
debug: LIBS = $(GLIBS)
debug: clean all
# Obj deps
util.o: util.c util.h Makefile
${CC} ${OPTS} ${CFLAGS} -c util.c
random.o: random.c random.h Makefile
${CC} ${OPTS} ${CFLAGS} -c random.c
vector.o: vector.c vector.h Makefile
${CC} ${OPTS} ${CFLAGS} -c vector.c
path.o: path.c path.h Makefile
${CC} ${OPTS} ${CFLAGS} -c path.c
color.o: color.c color.h Makefile
${CC} ${OPTS} ${CFLAGS} -c color.c
effect.o: effect.c effect.h Makefile
${CC} ${OPTS} ${CFLAGS} -c effect.c
special.o: special.c special.h Makefile
${CC} ${OPTS} ${CFLAGS} -c special.c
gem.o: gem.c gem.h Makefile
${CC} ${OPTS} ${CFLAGS} -c gem.c
tower.o: tower.c tower.h Makefile
${CC} ${OPTS} ${CFLAGS} -c tower.c
enemy.o: enemy.c enemy.h Makefile
${CC} ${OPTS} ${CFLAGS} -c enemy.c
bag.o: bag.c bag.h Makefile
${CC} ${OPTS} ${CFLAGS} -c bag.c
player.o: player.c player.h Makefile
${CC} ${OPTS} ${CFLAGS} -c player.c
game_event.o: game_event.c game_event.h Makefile
${CC} ${OPTS} ${CFLAGS} -c game_event.c
# I/O deps
io_bitmap.o: io_bitmap.c io_bitmap.h Makefile
${CC} ${OPTS} ${CFLAGS} -c io_bitmap.c
# GUI deps
gui_button.o: gui_button.c gui_button.h gui.h types.h Makefile
${CC} ${OPTS} ${CFLAGS} -c gui_button.c
gui_bag.o: gui_bag.c gui_bag.h gui.h types.h Makefile
${CC} ${OPTS} ${CFLAGS} -c gui_bag.c
gui_stats.o: gui_stats.c gui_stats.h gui.h types.h Makefile
${CC} ${OPTS} ${CFLAGS} -c gui_stats.c
gui_loss.o: gui_loss.c gui_loss.h gui.h types.h Makefile
${CC} ${OPTS} ${CFLAGS} -c gui_loss.c
gui_gameframe.o: gui_gameframe.c gui_gameframe.h gui.h types.h Makefile
${CC} ${OPTS} ${CFLAGS} -c gui_gameframe.c
gui_game_event.o: gui_game_event.c gui_game_event.h types.h Makefile
${CC} ${OPTS} ${CFLAGS} -c gui_game_event.c
gui.o: gui.c gui.h types.h Makefile
${CC} ${OPTS} ${CFLAGS} -c gui.c
# Main
chromo_craft.o: chromo_craft.c chromo_craft.h Makefile
${CC} ${OPTS} ${CFLAGS} -c chromo_craft.c
# Link
chromo_craft: util.o random.o vector.o path.o color.o effect.o special.o gem.o tower.o enemy.o bag.o player.o io_bitmap.o gui_button.o gui_game_event.o gui_bag.o gui_stats.o gui_loss.o gui_gameframe.o gui.o chromo_craft.o game_event.o Makefile
${CC} ${OPTS} -o chromo_craft util.o random.o vector.o path.o color.o effect.o special.o gem.o tower.o enemy.o bag.o player.o io_bitmap.o gui_button.o gui_game_event.o gui_bag.o gui_stats.o gui_loss.o gui_gameframe.o gui.o chromo_craft.o game_event.o ${LIBS}
# Maintenance
clean:
rm -f chromo_craft *.o
strip: clean
rm -f *~ \#*