dbf-udg

view Makefile @ 1:1d5dc834d403

blockify
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 08 Jan 2013 14:19:06 +0200
parents
children e09cbb2e9d4f
line source
1 csrc = $(wildcard src/*.c)
2 ccsrc = $(wildcard src/*.cc)
3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
4 dep = $(obj:.o=.d)
5 bin = udg
7 CFLAGS = -pedantic -Wall -g
8 CXXFLAGS = -std=c++11 $(CFLAGS)
9 LDFLAGS = $(libgl) -limago
11 ifeq ($(shell uname -s), Darwin)
12 libgl = -framework OpenGL -framework GLUT -lGLEW
13 else
14 libgl = -lGL -lGLU -lglut -lGLEW
15 endif
17 $(bin): $(obj)
18 $(CXX) -o $@ $(obj) $(LDFLAGS)
20 -include $(dep)
22 %.d: %.c
23 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
25 %.d: %.cc
26 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
28 .PHONY: clean
29 clean:
30 rm -f $(obj) $(bin) $(dep)