qvolray
diff Makefile @ 0:b050ce167ff1
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 31 Mar 2012 02:08:42 +0300 |
parents | |
children | 6f275934717b |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/Makefile Sat Mar 31 02:08:42 2012 +0300 1.3 @@ -0,0 +1,26 @@ 1.4 +src = $(wildcard src/*.c) 1.5 +obj = $(src:.c=.o) 1.6 +dep = $(obj:.o=.d) 1.7 +bin = volray 1.8 + 1.9 +CC = gcc 1.10 +CFLAGS = -pedantic -Wall -g 1.11 +LDFLAGS = $(libgl) -limago -lvmath -lm 1.12 + 1.13 +ifeq ($(shell uname -s), Darwin) 1.14 + libgl = -framework OpenGL -framework GLUT 1.15 +else 1.16 + libgl = -lGL -lglut -lGLEW 1.17 +endif 1.18 + 1.19 +$(bin): $(obj) 1.20 + $(CC) -o $@ $(obj) $(LDFLAGS) 1.21 + 1.22 +-include $(dep) 1.23 + 1.24 +%.d: %.c 1.25 + @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ 1.26 + 1.27 +.PHONY: clean 1.28 +clean: 1.29 + rm -f $(obj) $(bin)