symmetry
view Makefile @ 0:a90a71a74f0b
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 25 Feb 2014 19:53:34 +0200 |
parents | |
children | 46fe847bba08 |
line source
1 src = $(wildcard src/*.cc) $(wildcard src/vr/*.cc)
2 csrc = $(wildcard src/*.c) $(wildcard src/vr/*.c)
3 obj = $(src:.cc=.o) $(csrc:.c=.o)
4 dep = $(obj:.o=.d)
5 bin = symmetry
7 CFLAGS = -pedantic -Wall -g -Isrc
8 CXXFLAGS = $(CFLAGS)
9 LDFLAGS = $(libgl) $(libovr) -lvmath -limago -lm
11 ifeq ($(shell uname -s), Darwin)
12 libgl = -framework OpenGL -framework GLUT -lGLEW
13 else
14 libgl = -lX11 -lGL -lGLU -lglut -lGLEW
15 libovr = -lXinerama -lovr -lpthread -ludev
16 endif
18 $(bin): $(obj)
19 $(CXX) -o $@ $(obj) $(LDFLAGS)
21 -include $(dep)
23 %.d: %.c
24 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
26 %.d: %.cc
27 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
29 .PHONY: clean
30 clean:
31 rm -f $(obj) $(bin) $(dep)