goat3d

view goatview/Makefile @ 19:b35427826b60

- added XML format reading support - wrote a rudimentary version of goatview
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 27 Sep 2013 06:58:37 +0300
parents
children b59a3650ed51
line source
1 src = $(wildcard src/*.c)
2 obj = $(src:.c=.o)
3 dep = $(obj:.o=.d)
4 bin = goatview
6 goat_root = ..
7 libgoat = $(goat_root)/libgoat3d.so.0.1
9 CC = clang
10 CPP = clang -E
11 CFLAGS = -pedantic -Wall -g -I$(goat_root)/src
12 LDFLAGS = $(libgoat) -Wl,-rpath=$(goat_root) $(libgl)
14 ifeq ($(shell uname -s), Darwin)
15 libgl = -framework OpenGL -framework GLUT -lGLEW
16 else
17 libgl = -lGL -lGLU -lglut -lGLEW
18 endif
20 $(bin): $(obj) $(libgoat)
21 $(CC) -o $@ $(obj) $(LDFLAGS)
23 -include $(dep)
25 %.d: %.c
26 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
28 .PHONY: clean
29 clean:
30 rm -f $(obj) $(bin)
32 .PHONY: cleandep
33 cleandep:
34 rm -f $(dep)