goat3d

view goatview/Makefile @ 70:0bb33d04f279

fixed missing assignment to the scene goat pointer in goat3d_create
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 20 Apr 2014 13:36:28 +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)