metasurf

view examples/volume/Makefile @ 11:430d8dde62aa

random changes
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 23 Aug 2015 07:17:56 +0300
parents 94220a9600b3
children
line source
1 src = $(wildcard src/*.c)
2 obj = $(src:.c=.o)
3 dep = $(obj:.o=.d)
4 bin = volume
6 # uncomment the following line to disable shaders (for old systems like SGI or whatever)
7 #nosdr = -DNO_SHADERS
9 CC = gcc
10 CFLAGS = -pedantic -Wall -g -I../../src $(inc) $(nosdr)
11 LDFLAGS = -L../.. -lmetasurf $(libgl) -limago -lm
12 #-lgomp
14 ifeq ($(shell uname -s), Darwin)
15 inc = -I/opt/local/include
16 libgl = -L/opt/local/lib -framework OpenGL -framework GLUT -lGLEW
17 else
18 libgl = -lGL -lGLU -lglut -lGLEW
19 endif
21 $(bin): $(obj)
22 $(CC) -o $@ $(obj) $(LDFLAGS)
24 -include $(dep)
26 %.d: %.c
27 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
29 .PHONY: clean
30 clean:
31 rm -f $(obj) $(bin)
34 .PHONY: cleandep
35 cleandep:
36 rm -f $(dep)