-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
108 lines (79 loc) · 2.07 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
104
105
106
CFLAGS=-g
all: inferno
clean:
rm -fv inferno inferno.exe *.png *.o *.wav *.ogg *.jpg *.ttf acid.c adler.c mapa.c hero.c zombie.c fogo.c
# FIXME troll mode
m60.wav: ./data/m60.wav
cp -v $< $@
pick.wav: ./data/pick.wav
cp -v $< $@
shot.wav: ./data/shot.wav
cp -v $< $@
punch0.wav: ./data/punch0.wav
cp -v $< $@
punch1.wav: ./data/punch1.wav
cp -v $< $@
punch2.wav: ./data/punch2.wav
cp -v $< $@
punch3.wav: ./data/punch3.wav
cp -v $< $@
punch4.wav: ./data/punch4.wav
cp -v $< $@
acid.ttf: ./data/acid.ttf
cp -v $< $@
adler.ttf: ./data/adler.ttf
cp -v $< $@
menu.wav: ./data/menu.wav
cp -v $< $@
menu_select.wav: ./data/menu_select.wav
cp -v $< $@
zombie.png: ./data/inferno_zombie_1.png
cp -v $< $@
hero.png: ./data/inferno_hero.png
cp -v $< $@
fogo.png: ./data/fogo.png
cp -v $< $@
%.c : %.wav
xxd -i $< > $@
%.c : %.ttf
xxd -i $< > $@
%.c: %.png
xxd -i $^ > $@
%.c: %.jpg
xxd -i $^ > $@
%.o : %.c
gcc $(CFLAGS) $< -c -o $@
%.c : %.ogg
xxd -i $< > $@
music.ogg: ./data/music.ogg
cp $< $@
music_menu.ogg: ./data/music_menu.ogg
cp $< $@
music_ingame.ogg: ./data/music_ingame.ogg
cp $< $@
music_credit.ogg: ./data/music_credit.ogg
cp $< $@
mapa.jpg: ./data/mapa.jpg
cp $< $@
player_hud.png: ./data/player_hud.png
cp $< $@
stats_hud.png: ./data/stats_hud.png
cp $< $@
caveira.png: ./data/caveira.png
cp $< $@
logo_pseudo.png: ./data/logo_pseudo.png
cp $< $@
creditos.jpg: ./data/creditos.jpg
cp $< $@
main.o: main.c
gcc $(CFLAGS) $< `sdl-config --cflags` -c -o $@
sound.o: sound.c
gcc $(CFLAGS) $< `sdl-config --cflags` -c -o $@
font.o: font.c
gcc $(CFLAGS) $< `sdl-config --cflags` -c -o $@
acid.c: ./data/acid.ttf
adler.c: ./data/adler.ttf
inferno: main.o highscore.o sound.o font.o m60.o pick.o shot.o punch0.o punch1.o punch2.o punch3.o punch4.o adler.o acid.o mapa.o menu.o menu_select.o music_credit.o music_ingame.o music_menu.o hero.o zombie.o logo_pseudo.o creditos.o player_hud.o stats_hud.o fogo.o caveira.o
gcc $(CFLAGS) $(LDFLAGS) $^ -lSDL_gfx -lSDL_image -lSDL_mixer -lSDL_ttf -lSDL_net `sdl-config --libs` -o $@
debug: inferno
gdb $<