metasurf

annotate 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
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@5 10 CFLAGS = -pedantic -Wall -g -I../../src $(inc) $(nosdr)
nuclear@8 11 LDFLAGS = -L../.. -lmetasurf $(libgl) -limago -lm
nuclear@11 12 #-lgomp
nuclear@3 13
nuclear@3 14 ifeq ($(shell uname -s), Darwin)
nuclear@5 15 inc = -I/opt/local/include
nuclear@5 16 libgl = -L/opt/local/lib -framework OpenGL -framework GLUT -lGLEW
nuclear@3 17 else
nuclear@3 18 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@3 19 endif
nuclear@3 20
nuclear@3 21 $(bin): $(obj)
nuclear@3 22 $(CC) -o $@ $(obj) $(LDFLAGS)
nuclear@3 23
nuclear@3 24 -include $(dep)
nuclear@3 25
nuclear@3 26 %.d: %.c
nuclear@3 27 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@3 28
nuclear@3 29 .PHONY: clean
nuclear@3 30 clean:
nuclear@3 31 rm -f $(obj) $(bin)
nuclear@3 32
nuclear@3 33
nuclear@3 34 .PHONY: cleandep
nuclear@3 35 cleandep:
nuclear@3 36 rm -f $(dep)