volray
annotate Makefile @ 0:b050ce167ff1
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 31 Mar 2012 02:08:42 +0300 |
parents | |
children | 6f275934717b |
rev | line source |
---|---|
nuclear@0 | 1 src = $(wildcard src/*.c) |
nuclear@0 | 2 obj = $(src:.c=.o) |
nuclear@0 | 3 dep = $(obj:.o=.d) |
nuclear@0 | 4 bin = volray |
nuclear@0 | 5 |
nuclear@0 | 6 CC = gcc |
nuclear@0 | 7 CFLAGS = -pedantic -Wall -g |
nuclear@0 | 8 LDFLAGS = $(libgl) -limago -lvmath -lm |
nuclear@0 | 9 |
nuclear@0 | 10 ifeq ($(shell uname -s), Darwin) |
nuclear@0 | 11 libgl = -framework OpenGL -framework GLUT |
nuclear@0 | 12 else |
nuclear@0 | 13 libgl = -lGL -lglut -lGLEW |
nuclear@0 | 14 endif |
nuclear@0 | 15 |
nuclear@0 | 16 $(bin): $(obj) |
nuclear@0 | 17 $(CC) -o $@ $(obj) $(LDFLAGS) |
nuclear@0 | 18 |
nuclear@0 | 19 -include $(dep) |
nuclear@0 | 20 |
nuclear@0 | 21 %.d: %.c |
nuclear@0 | 22 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@0 | 23 |
nuclear@0 | 24 .PHONY: clean |
nuclear@0 | 25 clean: |
nuclear@0 | 26 rm -f $(obj) $(bin) |