metasurf
annotate examples/volume/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 | 52664d3451ad |
children | 94220a9600b3 |
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@3 | 11 LDFLAGS = -L../.. -lmetasurf $(libgl) -limago |
nuclear@3 | 12 |
nuclear@3 | 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@3 | 16 else |
nuclear@3 | 17 libgl = -lGL -lGLU -lglut -lGLEW |
nuclear@3 | 18 endif |
nuclear@3 | 19 |
nuclear@3 | 20 $(bin): $(obj) |
nuclear@3 | 21 $(CC) -o $@ $(obj) $(LDFLAGS) |
nuclear@3 | 22 |
nuclear@3 | 23 -include $(dep) |
nuclear@3 | 24 |
nuclear@3 | 25 %.d: %.c |
nuclear@3 | 26 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@3 | 27 |
nuclear@3 | 28 .PHONY: clean |
nuclear@3 | 29 clean: |
nuclear@3 | 30 rm -f $(obj) $(bin) |
nuclear@3 | 31 |
nuclear@3 | 32 |
nuclear@3 | 33 .PHONY: cleandep |
nuclear@3 | 34 cleandep: |
nuclear@3 | 35 rm -f $(dep) |