goat3d

annotate 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
rev   line source
nuclear@19 1 src = $(wildcard src/*.c)
nuclear@19 2 obj = $(src:.c=.o)
nuclear@19 3 dep = $(obj:.o=.d)
nuclear@19 4 bin = goatview
nuclear@19 5
nuclear@19 6 goat_root = ..
nuclear@19 7
nuclear@19 8 CC = clang
nuclear@19 9 CPP = clang -E
nuclear@19 10 CFLAGS = -pedantic -Wall -g -I$(goat_root)/src
nuclear@23 11 LDFLAGS = $(libgoat) $(libgl)
nuclear@19 12
nuclear@19 13 ifeq ($(shell uname -s), Darwin)
nuclear@19 14 libgl = -framework OpenGL -framework GLUT -lGLEW
nuclear@23 15 libgoat = $(goat_root)/libgoat3d.dylib
nuclear@19 16 else
nuclear@19 17 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@23 18 libgoat = $(goat_root)/libgoat3d.so.0.1 -Wl,-rpath=$(goat_root)
nuclear@19 19 endif
nuclear@19 20
nuclear@19 21 $(bin): $(obj) $(libgoat)
nuclear@19 22 $(CC) -o $@ $(obj) $(LDFLAGS)
nuclear@19 23
nuclear@19 24 -include $(dep)
nuclear@19 25
nuclear@19 26 %.d: %.c
nuclear@19 27 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@19 28
nuclear@19 29 .PHONY: clean
nuclear@19 30 clean:
nuclear@19 31 rm -f $(obj) $(bin)
nuclear@19 32
nuclear@19 33 .PHONY: cleandep
nuclear@19 34 cleandep:
nuclear@19 35 rm -f $(dep)