goat3d
annotate goatview/Makefile @ 22:44a20d72f3a6
merged
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 27 Sep 2013 07:14:49 +0300 |
parents | |
children | b59a3650ed51 |
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 libgoat = $(goat_root)/libgoat3d.so.0.1 |
nuclear@19 | 8 |
nuclear@19 | 9 CC = clang |
nuclear@19 | 10 CPP = clang -E |
nuclear@19 | 11 CFLAGS = -pedantic -Wall -g -I$(goat_root)/src |
nuclear@19 | 12 LDFLAGS = $(libgoat) -Wl,-rpath=$(goat_root) $(libgl) |
nuclear@19 | 13 |
nuclear@19 | 14 ifeq ($(shell uname -s), Darwin) |
nuclear@19 | 15 libgl = -framework OpenGL -framework GLUT -lGLEW |
nuclear@19 | 16 else |
nuclear@19 | 17 libgl = -lGL -lGLU -lglut -lGLEW |
nuclear@19 | 18 endif |
nuclear@19 | 19 |
nuclear@19 | 20 $(bin): $(obj) $(libgoat) |
nuclear@19 | 21 $(CC) -o $@ $(obj) $(LDFLAGS) |
nuclear@19 | 22 |
nuclear@19 | 23 -include $(dep) |
nuclear@19 | 24 |
nuclear@19 | 25 %.d: %.c |
nuclear@19 | 26 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@19 | 27 |
nuclear@19 | 28 .PHONY: clean |
nuclear@19 | 29 clean: |
nuclear@19 | 30 rm -f $(obj) $(bin) |
nuclear@19 | 31 |
nuclear@19 | 32 .PHONY: cleandep |
nuclear@19 | 33 cleandep: |
nuclear@19 | 34 rm -f $(dep) |