dbf-udg

view Makefile @ 15:2d1a9b5111f9

added visual studio project
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 20 Feb 2013 06:03:31 +0200
parents 6a836b1dc31b
children
line source
1 csrc = $(wildcard src/*.c) \
2 $(wildcard libs/metasurf/*.c) \
3 $(wildcard libs/dsys2/*.c)
4 ccsrc = $(wildcard src/*.cc)
5 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
6 dep = $(obj:.o=.d)
7 bin = printblobs
9 CFLAGS = -pedantic -Wall -g -O3 -ffast-math -Ilibs/metasurf -Ilibs/dsys2
10 CXXFLAGS = $(CFLAGS)
11 LDFLAGS = $(libgl)
13 ifeq ($(shell uname -s), Darwin)
14 libgl = -framework OpenGL -framework GLUT -lGLEW
15 else
16 libgl = -lGL -lGLU -lglut -lGLEW
17 endif
19 $(bin): $(obj)
20 $(CXX) -o $@ $(obj) $(LDFLAGS)
22 -include $(dep)
24 %.d: %.c
25 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
27 %.d: %.cc
28 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
30 .PHONY: clean
31 clean:
32 rm -f $(obj) $(dep)