goat3d

view goatview/Makefile @ 39:0e48907847ad

slugishly progressing with the blender exporter
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 09 Oct 2013 16:40:59 +0300
parents b35427826b60
children f8bfc3177582
line source
1 src = $(wildcard src/*.c)
2 obj = $(src:.c=.o)
3 dep = $(obj:.o=.d)
4 bin = goatview
6 goat_root = ..
8 CC = clang
9 CPP = clang -E
10 CFLAGS = -pedantic -Wall -g -I$(goat_root)/src
11 LDFLAGS = $(libgoat) $(libgl)
13 ifeq ($(shell uname -s), Darwin)
14 libgl = -framework OpenGL -framework GLUT -lGLEW
15 libgoat = $(goat_root)/libgoat3d.dylib
16 else
17 libgl = -lGL -lGLU -lglut -lGLEW
18 libgoat = $(goat_root)/libgoat3d.so.0.1 -Wl,-rpath=$(goat_root)
19 endif
21 $(bin): $(obj) $(libgoat)
22 $(CC) -o $@ $(obj) $(LDFLAGS)
24 -include $(dep)
26 %.d: %.c
27 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
29 .PHONY: clean
30 clean:
31 rm -f $(obj) $(bin)
33 .PHONY: cleandep
34 cleandep:
35 rm -f $(dep)