metasurf
view 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 |
line source
1 src = $(wildcard src/*.c)
2 obj = $(src:.c=.o)
3 dep = $(obj:.o=.d)
4 bin = metaballs
6 CC = gcc
7 CFLAGS = -pedantic -Wall -g -I../../src
8 LDFLAGS = -L../.. -lmetasurf $(libgl)
10 ifeq ($(shell uname -s), Darwin)
11 libgl = -framework OpenGL -framework GLUT -lGLEW
12 else
13 libgl = -lGL -lGLU -lglut -lGLEW
14 endif
16 $(bin): $(obj)
17 $(CC) -o $@ $(obj) $(LDFLAGS)
19 -include $(dep)
21 %.d: %.c
22 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
24 .PHONY: clean
25 clean:
26 rm -f $(obj) $(bin)
29 .PHONY: cleandep
30 cleandep:
31 rm -f $(dep)