metasurf

annotate examples/volume/Makefile @ 3:52664d3451ad

added volume rendering example
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 25 Oct 2011 13:30:03 +0300
parents
children dedd153d2ceb
rev   line source
nuclear@3 1 src = $(wildcard src/*.c)
nuclear@3 2 obj = $(src:.c=.o)
nuclear@3 3 dep = $(obj:.o=.d)
nuclear@3 4 bin = volume
nuclear@3 5
nuclear@3 6 # uncomment the following line to disable shaders (for old systems like SGI or whatever)
nuclear@3 7 #nosdr = -DNO_SHADERS
nuclear@3 8
nuclear@3 9 CC = gcc
nuclear@3 10 CFLAGS = -pedantic -Wall -g -I../../src $(nosdr)
nuclear@3 11 LDFLAGS = -L../.. -lmetasurf $(libgl) -limago
nuclear@3 12
nuclear@3 13 ifeq ($(shell uname -s), Darwin)
nuclear@3 14 libgl = -framework OpenGL -framework GLUT -lGLEW
nuclear@3 15 else
nuclear@3 16 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@3 17 endif
nuclear@3 18
nuclear@3 19 $(bin): $(obj)
nuclear@3 20 $(CC) -o $@ $(obj) $(LDFLAGS)
nuclear@3 21
nuclear@3 22 -include $(dep)
nuclear@3 23
nuclear@3 24 %.d: %.c
nuclear@3 25 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@3 26
nuclear@3 27 .PHONY: clean
nuclear@3 28 clean:
nuclear@3 29 rm -f $(obj) $(bin)
nuclear@3 30
nuclear@3 31
nuclear@3 32 .PHONY: cleandep
nuclear@3 33 cleandep:
nuclear@3 34 rm -f $(dep)