dbf-udg

annotate Makefile @ 9:7056437a361b

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