started backporting the eradicate code
[dosdemo] / tools / gltest / Makefile
1 root = ../..
2
3 src = $(wildcard src/*.c) \
4           $(root)/src/bsptree.c \
5           $(root)/src/polyclip.c \
6           $(root)/src/mesh.c \
7           $(root)/src/meshload.c \
8           $(root)/src/dynarr.c \
9           $(root)/src/rbtree.c
10 obj = $(src:.c=.o)
11 dep = $(obj:.o=.d)
12 bin = test
13
14 incpath = -I$(root)/src
15 libpath = -L$(root)/libs/imago -L$(root)/libs/mikmod
16
17 CFLAGS = -pedantic -Wall -g $(incpath)
18 LDFLAGS = $(libpath) -lGL -lGLU -lglut -lm -limago -lmikmod
19
20 $(bin): $(obj)
21         $(CC) -o $@ $(obj) $(LDFLAGS)
22
23 -include $(dep)
24
25 %.d: %.c
26         @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
27
28 .PHONY: clean
29 clean:
30         rm -f src/*.o