metasurf

annotate examples/metaballs/Makefile @ 2:9ab057fba0c5

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