goat3d
view goatview/Makefile @ 69:66cd8266f078
fixed animation export
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 21 Apr 2014 03:44:10 +0300 |
parents | f8bfc3177582 |
children | 9862541fdcf5 |
line source
1 PREFIX = /usr/local
3 src = $(wildcard src/*.c)
4 obj = $(src:.c=.o)
5 dep = $(obj:.o=.d)
6 bin = goatview
8 goat_root = ..
10 CC = clang
11 CPP = clang -E
12 CFLAGS = -pedantic -Wall -g -I$(goat_root)/src
13 LDFLAGS = $(libgoat) $(libgl)
15 ifeq ($(shell uname -s), Darwin)
16 libgl = -framework OpenGL -framework GLUT -lGLEW
17 libgoat = $(goat_root)/libgoat3d.dylib
18 else
19 libgl = -lGL -lGLU -lglut -lGLEW
20 libgoat = $(goat_root)/libgoat3d.so.0.1
21 endif
23 $(bin): $(obj) $(libgoat)
24 $(CC) -o $@ $(obj) $(LDFLAGS)
26 -include $(dep)
28 %.d: %.c
29 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
31 .PHONY: clean
32 clean:
33 rm -f $(obj) $(bin)
35 .PHONY: cleandep
36 cleandep:
37 rm -f $(dep)
39 .PHONY: install
40 install: $(bin)
41 cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)
43 .PHONY: uninstall
44 uninstall:
45 rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)