metasurf
view examples/metaballs/Makefile @ 0:7aa4627e492b
first commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 25 Oct 2011 07:34:31 +0300 |
parents | |
children | dc0e882ec3f9 |
line source
1 src = $(wildcard src/*.c)
2 obj = $(src:.c=.o)
3 dep = $(obj:.o=.d)
4 bin = metasurf
6 CC = gcc
7 CFLAGS = -pedantic -Wall -g -O3
8 LDFLAGS = $(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)