goat3d

view goatview/Makefile @ 41:da3f335e0069

revamped the visual studio project files
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 01 Dec 2013 01:31:53 +0200
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)