metasurf
annotate 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 |
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@0 | 4 bin = metasurf |
nuclear@0 | 5 |
nuclear@0 | 6 CC = gcc |
nuclear@0 | 7 CFLAGS = -pedantic -Wall -g -O3 |
nuclear@0 | 8 LDFLAGS = $(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) |