symmetry
diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/Makefile Tue Feb 25 19:53:34 2014 +0200 1.3 @@ -0,0 +1,31 @@ 1.4 +src = $(wildcard src/*.cc) $(wildcard src/vr/*.cc) 1.5 +csrc = $(wildcard src/*.c) $(wildcard src/vr/*.c) 1.6 +obj = $(src:.cc=.o) $(csrc:.c=.o) 1.7 +dep = $(obj:.o=.d) 1.8 +bin = symmetry 1.9 + 1.10 +CFLAGS = -pedantic -Wall -g -Isrc 1.11 +CXXFLAGS = $(CFLAGS) 1.12 +LDFLAGS = $(libgl) $(libovr) -lvmath -limago -lm 1.13 + 1.14 +ifeq ($(shell uname -s), Darwin) 1.15 + libgl = -framework OpenGL -framework GLUT -lGLEW 1.16 +else 1.17 + libgl = -lX11 -lGL -lGLU -lglut -lGLEW 1.18 + libovr = -lXinerama -lovr -lpthread -ludev 1.19 +endif 1.20 + 1.21 +$(bin): $(obj) 1.22 + $(CXX) -o $@ $(obj) $(LDFLAGS) 1.23 + 1.24 +-include $(dep) 1.25 + 1.26 +%.d: %.c 1.27 + @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ 1.28 + 1.29 +%.d: %.cc 1.30 + @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ 1.31 + 1.32 +.PHONY: clean 1.33 +clean: 1.34 + rm -f $(obj) $(bin) $(dep)