symmetry

view Makefile @ 1:46fe847bba08

using goat3dgfx
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 25 Feb 2014 23:47:20 +0200
parents a90a71a74f0b
children
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 `pkg-config --cflags goat3dgfx`
8 CXXFLAGS = $(CFLAGS)
9 LDFLAGS = `pkg-config --libs goat3dgfx`
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)