volray

view Makefile @ 0:b050ce167ff1

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 31 Mar 2012 02:08:42 +0300
parents
children 6f275934717b
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
8 LDFLAGS = $(libgl) -limago -lvmath -lm
10 ifeq ($(shell uname -s), Darwin)
11 libgl = -framework OpenGL -framework GLUT
12 else
13 libgl = -lGL -lglut -lGLEW
14 endif
16 $(bin): $(obj)
17 $(CC) -o $@ $(obj) $(LDFLAGS)
19 -include $(dep)
21 %.d: %.c
22 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
24 .PHONY: clean
25 clean:
26 rm -f $(obj) $(bin)