metasurf

view 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
line source
1 src = $(wildcard src/*.c)
2 obj = $(src:.c=.o)
3 dep = $(obj:.o=.d)
4 bin = metaballs
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)
13 ifeq ($(shell uname -s), Darwin)
14 inc = -I/opt/local/include
15 libgl = -L/opt/local/lib -framework OpenGL -framework GLUT -lGLEW
16 else
17 libgl = -lGL -lGLU -lglut -lGLEW
18 endif
20 $(bin): $(obj)
21 $(CC) -o $@ $(obj) $(LDFLAGS)
23 -include $(dep)
25 %.d: %.c
26 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
28 .PHONY: clean
29 clean:
30 rm -f $(obj) $(bin)
33 .PHONY: cleandep
34 cleandep:
35 rm -f $(dep)