dbf-udg

annotate Makefile @ 5:e09cbb2e9d4f

metaballs
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 18 Feb 2013 03:46:52 +0200
parents 2d27bfd21fc5
children 7056437a361b
rev   line source
nuclear@5 1 csrc = $(wildcard src/*.c) \
nuclear@5 2 $(wildcard libs/metasurf/*.c)
nuclear@0 3 ccsrc = $(wildcard src/*.cc)
nuclear@0 4 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
nuclear@0 5 dep = $(obj:.o=.d)
nuclear@0 6 bin = udg
nuclear@0 7
nuclear@5 8 CFLAGS = -pedantic -Wall -g -O3 -Ilibs/metasurf
nuclear@0 9 CXXFLAGS = -std=c++11 $(CFLAGS)
nuclear@5 10 LDFLAGS = $(libgl) -limago -lvmath
nuclear@0 11
nuclear@0 12 ifeq ($(shell uname -s), Darwin)
nuclear@0 13 libgl = -framework OpenGL -framework GLUT -lGLEW
nuclear@0 14 else
nuclear@0 15 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@0 16 endif
nuclear@0 17
nuclear@0 18 $(bin): $(obj)
nuclear@0 19 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@0 20
nuclear@0 21 -include $(dep)
nuclear@0 22
nuclear@0 23 %.d: %.c
nuclear@0 24 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@0 25
nuclear@0 26 %.d: %.cc
nuclear@0 27 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@0 28
nuclear@0 29 .PHONY: clean
nuclear@0 30 clean:
nuclear@0 31 rm -f $(obj) $(bin) $(dep)