dbf-udg

annotate Makefile @ 12:1abbed71e9c9

cleanup, copyright statements and notices, readme files
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 20 Feb 2013 05:45:27 +0200
parents 7056437a361b
children 6a836b1dc31b
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@12 10 CXXFLAGS = $(CFLAGS)
nuclear@12 11 LDFLAGS = $(libgl)
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)