metasurf
annotate examples/metaballs/Makefile @ 1:dc0e882ec3f9
renamed example source file test.c -> metaballs.c
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 25 Oct 2011 07:57:07 +0300 |
parents | 7aa4627e492b |
children | 9ab057fba0c5 |
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@0 | 6 CC = gcc |
nuclear@1 | 7 CFLAGS = -pedantic -Wall -g -I../../src |
nuclear@1 | 8 LDFLAGS = -L../.. -lmetasurf $(libgl) |
nuclear@0 | 9 |
nuclear@0 | 10 ifeq ($(shell uname -s), Darwin) |
nuclear@0 | 11 libgl = -framework OpenGL -framework GLUT -lGLEW |
nuclear@0 | 12 else |
nuclear@0 | 13 libgl = -lGL -lGLU -lglut -lGLEW |
nuclear@0 | 14 endif |
nuclear@0 | 15 |
nuclear@0 | 16 $(bin): $(obj) |
nuclear@0 | 17 $(CC) -o $@ $(obj) $(LDFLAGS) |
nuclear@0 | 18 |
nuclear@0 | 19 -include $(dep) |
nuclear@0 | 20 |
nuclear@0 | 21 %.d: %.c |
nuclear@0 | 22 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@0 | 23 |
nuclear@0 | 24 .PHONY: clean |
nuclear@0 | 25 clean: |
nuclear@0 | 26 rm -f $(obj) $(bin) |
nuclear@0 | 27 |
nuclear@0 | 28 |
nuclear@0 | 29 .PHONY: cleandep |
nuclear@0 | 30 cleandep: |
nuclear@0 | 31 rm -f $(dep) |