coeng
view Makefile @ 10:305c8f6abef1
the plane doesn't need a PRS really
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 15 Feb 2015 05:25:04 +0200 |
parents | 8cce82794f90 |
children |
line source
1 csrc = $(wildcard src/*.c)
2 ccsrc = $(wildcard src/*.cc)
3 obj = $(ccsrc:.cc=.o) $(csrc:.c=.o)
4 dep = $(obj:.o=.d)
5 bin = test
7 warn = -pedantic -Wall
8 dbg = -g
10 CXXFLAGS = -std=c++11 $(warn) $(dbg)
11 LDFLAGS = $(libgl) -lm -lvmath -lpthread
13 ifeq ($(shell uname -s), Darwin)
14 libgl = -framework OpenGL -framework GLUT -lGLEW
15 warn += -Wno-deprecated-declarations
16 else
17 libgl = -lGL -lGLU -lglut -lGLEW
18 endif
20 .PHONY: all
21 all: $(bin) lucy.obj
23 $(bin): $(obj)
24 $(CXX) -o $@ $(obj) $(LDFLAGS)
26 lucy.obj: lucy.obj.xz
27 xzcat $< >$@
29 lucy.obj.xz:
30 wget -c mutantstargoat.com/~nuclear/tmp/lucy.obj.xz
32 -include $(dep)
34 %.d: %.c
35 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
37 %.d: %.cc
38 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
40 .PHONY: clean
41 clean:
42 rm -f $(obj) $(bin)
44 .PHONY: cleandep
45 cleandep:
46 rm -f $(dep)