metasurf

annotate examples/metaballs/Makefile @ 5:dedd153d2ceb

- fixed makefile to produce non-broken shared objects - removed glutGetModifiers from the motion callback and placed it in the mouse callback as apparently it's not supposed to be called from there. - added MacOSX include paths in the examples
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 25 Oct 2011 23:38:39 +0300
parents 9ab057fba0c5
children 246260d95415
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@5 10 CFLAGS = -pedantic -Wall -g -I../../src $(inc) $(nosdr)
nuclear@1 11 LDFLAGS = -L../.. -lmetasurf $(libgl)
nuclear@0 12
nuclear@0 13 ifeq ($(shell uname -s), Darwin)
nuclear@5 14 inc = -I/opt/local/include
nuclear@5 15 libgl = -L/opt/local/lib -framework OpenGL -framework GLUT -lGLEW
nuclear@0 16 else
nuclear@0 17 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@0 18 endif
nuclear@0 19
nuclear@0 20 $(bin): $(obj)
nuclear@0 21 $(CC) -o $@ $(obj) $(LDFLAGS)
nuclear@0 22
nuclear@0 23 -include $(dep)
nuclear@0 24
nuclear@0 25 %.d: %.c
nuclear@0 26 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@0 27
nuclear@0 28 .PHONY: clean
nuclear@0 29 clean:
nuclear@0 30 rm -f $(obj) $(bin)
nuclear@0 31
nuclear@0 32
nuclear@0 33 .PHONY: cleandep
nuclear@0 34 cleandep:
nuclear@0 35 rm -f $(dep)