qvolray
view Makefile @ 3:6f275934717b
foon
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 02 Apr 2012 14:42:03 +0300 |
parents | b050ce167ff1 |
children | 8990b5d2c7fe |
line source
1 src = $(wildcard src/*.c)
2 obj = $(src:.c=.o)
3 dep = $(obj:.o=.d)
4 bin = volray
6 CC = gcc
7 CFLAGS = -pedantic -Wall -g $(incdir)
8 LDFLAGS = $(libdir) $(libgl) -limago -lvmath -lm
10 ifeq ($(shell uname -s), Darwin)
11 libgl = -framework OpenGL -framework GLUT -lGLEW
12 incdir = -I/opt/local/include
13 libdir = -L/opt/local/lib
14 else
15 libgl = -lGL -lglut -lGLEW
16 endif
18 $(bin): $(obj)
19 $(CC) -o $@ $(obj) $(LDFLAGS)
21 -include $(dep)
23 %.d: %.c
24 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
26 .PHONY: clean
27 clean:
28 rm -f $(obj) $(bin)