fixed imago 565, started on menu
[eradicate] / GNUmakefile
1 csrc = $(wildcard src/*.c) $(wildcard src/sdl/*.c) $(wildcard src/3dgfx/*.c)
2
3 obj = $(csrc:.c=.o)
4 dep = $(obj:.o=.d)
5 bin = game
6
7 inc = -Isrc -Isrc/sdl -Isrc/3dgfx -Ilibs/imago/src
8
9 CFLAGS = $(arch) -pedantic -Wall -g -MMD $(inc) `sdl-config --cflags`
10 LDFLAGS = $(arch) -Llibs/imago -limago `sdl-config --libs` -lm
11
12 ifneq ($(shell uname -m), i386)
13         arch = -m32
14         sdl_ldflags = -L/usr/lib/i386-linux-gnu -lSDL-1.2
15 else
16         sdl_ldflags = `sdl-config --libs`
17 endif
18
19
20 $(bin): $(obj) imago
21         $(CC) -o $@ $(obj) $(LDFLAGS)
22
23 -include $(dep)
24
25 .PHONY: imago
26 imago:
27         $(MAKE) -C libs/imago
28
29 .PHONY: clean
30 clean:
31         rm -f $(obj) $(bin)
32
33 .PHONY: cleandep
34 cleandep:
35         rm -f $(dep)