goat3d
annotate goatview/Makefile @ 46:9d911100935b
added install/uninstall targets in goatview
added load statistics in goatview
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 08 Dec 2013 03:00:25 +0200 |
parents | f8bfc3177582 |
children | 9862541fdcf5 |
rev | line source |
---|---|
nuclear@46 | 1 PREFIX = /usr/local |
nuclear@46 | 2 |
nuclear@19 | 3 src = $(wildcard src/*.c) |
nuclear@19 | 4 obj = $(src:.c=.o) |
nuclear@19 | 5 dep = $(obj:.o=.d) |
nuclear@19 | 6 bin = goatview |
nuclear@19 | 7 |
nuclear@19 | 8 goat_root = .. |
nuclear@19 | 9 |
nuclear@19 | 10 CC = clang |
nuclear@19 | 11 CPP = clang -E |
nuclear@19 | 12 CFLAGS = -pedantic -Wall -g -I$(goat_root)/src |
nuclear@23 | 13 LDFLAGS = $(libgoat) $(libgl) |
nuclear@19 | 14 |
nuclear@19 | 15 ifeq ($(shell uname -s), Darwin) |
nuclear@19 | 16 libgl = -framework OpenGL -framework GLUT -lGLEW |
nuclear@23 | 17 libgoat = $(goat_root)/libgoat3d.dylib |
nuclear@19 | 18 else |
nuclear@19 | 19 libgl = -lGL -lGLU -lglut -lGLEW |
nuclear@44 | 20 libgoat = $(goat_root)/libgoat3d.so.0.1 |
nuclear@19 | 21 endif |
nuclear@19 | 22 |
nuclear@19 | 23 $(bin): $(obj) $(libgoat) |
nuclear@19 | 24 $(CC) -o $@ $(obj) $(LDFLAGS) |
nuclear@19 | 25 |
nuclear@19 | 26 -include $(dep) |
nuclear@19 | 27 |
nuclear@19 | 28 %.d: %.c |
nuclear@19 | 29 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@19 | 30 |
nuclear@19 | 31 .PHONY: clean |
nuclear@19 | 32 clean: |
nuclear@19 | 33 rm -f $(obj) $(bin) |
nuclear@19 | 34 |
nuclear@19 | 35 .PHONY: cleandep |
nuclear@19 | 36 cleandep: |
nuclear@19 | 37 rm -f $(dep) |
nuclear@46 | 38 |
nuclear@46 | 39 .PHONY: install |
nuclear@46 | 40 install: $(bin) |
nuclear@46 | 41 cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin) |
nuclear@46 | 42 |
nuclear@46 | 43 .PHONY: uninstall |
nuclear@46 | 44 uninstall: |
nuclear@46 | 45 rm -f $(DESTDIR)$(PREFIX)/bin/$(bin) |