ld33_umonster

view Makefile @ 7:92d662deb66e

capsule distance seems broken
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 25 Aug 2015 00:38:00 +0300
parents 93ff21458a16
children
line source
1 ccsrc = $(wildcard src/*.cc)
2 csrc = $(wildcard src/*.c)
3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
4 dep = $(obj:.o=.d)
6 bin = umonster
8 sys = $(shell uname -s)
10 warn = -pedantic -Wall -Wno-format-extra-args
11 dbg = -g
12 opt = -O3
14 CFLAGS = $(warn) $(dbg) $(opt)
15 CXXFLAGS = $(CFLAGS)
16 LDFLAGS = $(libgl) -lvmath -limago -lpsys -lanim -lm -lmetasurf
18 ifeq ($(sys), Darwin)
19 libgl = -framework OpenGL -framework GLUT -lGLEW
20 warn += -Wno-deprecated-declarations
21 else
22 libgl = -lGL -lGLU -lglut -lGLEW
23 endif
25 .PHONY: all
26 all: $(bin)
28 $(bin): $(obj)
29 $(CXX) -o $@ $(obj) $(LDFLAGS)
31 -include $(dep)
33 %.d: %.c
34 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
36 %.d: %.cc
37 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
39 .PHONY: clean
40 clean:
41 rm -f $(obj) $(bin)
43 .PHONY: cleandep
44 cleandep:
45 rm -f $(dep)