conworlds
annotate Makefile @ 14:423d4e6728cb
removed data from hg
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 24 Aug 2014 09:43:58 +0300 |
parents | e3f0ca1d008a |
children | c814f77d177e |
rev | line source |
---|---|
nuclear@4 | 1 csrc = $(wildcard src/*.c) $(wildcard src/vr/*.c) |
nuclear@1 | 2 ccsrc = $(wildcard src/*.cc) |
nuclear@1 | 3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o) |
nuclear@1 | 4 dep = $(obj:.o=.d) |
nuclear@13 | 5 bin = conworlds |
nuclear@1 | 6 |
nuclear@6 | 7 # comment out to disable LibOVR (oculus sdk) |
nuclear@6 | 8 #ovr_cflags = -DUSE_LIBOVR |
nuclear@6 | 9 #ovr_libs = -lovr |
nuclear@10 | 10 # comment out to disable OpenHMD |
nuclear@10 | 11 ohmd_cflags = -DUSE_OPENHMD |
nuclear@10 | 12 ohmd_libs = -lopenhmd |
nuclear@6 | 13 |
nuclear@6 | 14 CFLAGS = -pedantic -Wall -g $(ovr_cflags) |
nuclear@1 | 15 CXXFLAGS = -std=c++11 $(CFLAGS) |
nuclear@13 | 16 LDFLAGS = $(libgl_$(sys)) -lm -lvmath -limago -lanim $(ovr_libs) |
nuclear@1 | 17 |
nuclear@1 | 18 libgl_unix = -lGL -lGLU -lglut -lGLEW |
nuclear@1 | 19 libgl_mac = -framework OpenGL -framework GLUT -lGLEW |
nuclear@1 | 20 libgl_win = -lopengl32 -lglu32 -lglut32 -lglew32 |
nuclear@1 | 21 |
nuclear@1 | 22 $(bin): $(obj) |
nuclear@1 | 23 $(CXX) -o $@ $(obj) $(LDFLAGS) |
nuclear@1 | 24 |
nuclear@1 | 25 -include $(dep) |
nuclear@1 | 26 |
nuclear@1 | 27 %.d: %.c |
nuclear@1 | 28 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@1 | 29 |
nuclear@1 | 30 %.d: %.cc |
nuclear@1 | 31 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@1 | 32 |
nuclear@1 | 33 .PHONY: clean |
nuclear@1 | 34 clean: |
nuclear@1 | 35 rm -f $(obj) $(bin) |
nuclear@1 | 36 |
nuclear@1 | 37 # os detection |
nuclear@1 | 38 uname = $(shell uname -s) |
nuclear@1 | 39 ifeq ($(sys), Darwin) |
nuclear@1 | 40 sys = mac |
nuclear@1 | 41 else ifeq ($(findstring MINGW, $(sys)), MINGW) |
nuclear@1 | 42 sys = win |
nuclear@1 | 43 else |
nuclear@1 | 44 sys = unix |
nuclear@1 | 45 endif |