volray

view Makefile @ 5:0c3874aa717a

slice
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 04 Apr 2012 01:37:33 +0300
parents b050ce167ff1
children
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)