SGI makefile for mklevel
[deeprace] / tools / mklevel / GNUmakefile
1 src = $(wildcard src/*.c)
2 obj = $(src:.c=.o)
3 dep = $(src:.c=.d)
4 bin = mklevel
5
6 warn = -pedantic -Wall
7 dbg = -g
8 inc = -I../../libs -I../../libs/goat3d/include -I../../libs/treestor/include
9 libdir = ../../libs/unix
10 libs = $(libdir)/goat3d.a $(libdir)/treestor.a
11
12 CC = gcc
13 CFLAGS = $(warn) $(dbg) $(inc) -MMD
14 LDFLAGS = $(libs) -lm
15
16 $(bin): $(obj) $(libs)
17         $(CC) -o $@ $(obj) $(LDFLAGS)
18
19 -include $(dep)
20
21 .PHONY: clean
22 clean:
23         rm -f $(obj) $(bin)
24
25 .PHONY: cleandep
26 cleandep:
27         rm -f $(dep)
28
29 $(libdir)/goat3d.a:
30         $(MAKE) -C ../../libs/goat3d
31
32 $(libdir)/treestor.a:
33         $(MAKE) -C ../../libs/treestor