goat3d
view goatview/Makefile @ 44:f8bfc3177582
fixed the goatview makefile
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 08 Dec 2013 02:14:46 +0200 |
parents | b59a3650ed51 |
children | 9d911100935b |
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
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)