qvolray

view Makefile @ 2:0b73aa7317e1

lalal
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 02 Apr 2012 14:00:28 +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)