qvolray
annotate Makefile @ 10:9d2396738b60
GL_RGBA32F -> GL_RGBA32F_ARB
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 08 Apr 2012 14:31:03 +0300 |
parents | b050ce167ff1 |
children | 8990b5d2c7fe |
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@3 | 7 CFLAGS = -pedantic -Wall -g $(incdir) |
nuclear@3 | 8 LDFLAGS = $(libdir) $(libgl) -limago -lvmath -lm |
nuclear@0 | 9 |
nuclear@0 | 10 ifeq ($(shell uname -s), Darwin) |
nuclear@3 | 11 libgl = -framework OpenGL -framework GLUT -lGLEW |
nuclear@3 | 12 incdir = -I/opt/local/include |
nuclear@3 | 13 libdir = -L/opt/local/lib |
nuclear@0 | 14 else |
nuclear@0 | 15 libgl = -lGL -lglut -lGLEW |
nuclear@0 | 16 endif |
nuclear@0 | 17 |
nuclear@0 | 18 $(bin): $(obj) |
nuclear@0 | 19 $(CC) -o $@ $(obj) $(LDFLAGS) |
nuclear@0 | 20 |
nuclear@0 | 21 -include $(dep) |
nuclear@0 | 22 |
nuclear@0 | 23 %.d: %.c |
nuclear@0 | 24 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@0 | 25 |
nuclear@0 | 26 .PHONY: clean |
nuclear@0 | 27 clean: |
nuclear@0 | 28 rm -f $(obj) $(bin) |