erebus

annotate Makefile @ 29:fb20e3855740

write the rendered image when pressing '`' and on exit.
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 06 Jun 2014 15:08:09 +0300
parents f067148b3494
children 2c768a49e86e
rev   line source
nuclear@4 1 csrc = $(wildcard src/*.c)
nuclear@4 2 ccsrc = $(wildcard src/*.cc)
nuclear@4 3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
nuclear@4 4 bin = erebus
nuclear@4 5
nuclear@4 6 CFLAGS = -pedantic -Wall -g -Iliberebus/src
nuclear@4 7 CXXFLAGS = -std=c++11 $(CFLAGS)
nuclear@29 8 LDFLAGS = -Lliberebus -Wl,-rpath=liberebus $(libgl_$(sys)) -lm -lerebus -lvmath -limago
nuclear@4 9
nuclear@4 10 libgl_unix = -lGL -lGLU -lglut -lGLEW
nuclear@4 11 libgl_mac = -framework OpenGL -framework GLUT -lGLEW
nuclear@4 12 libgl_win = -lopengl32 -lglu32 -lglut32 -lglew32
nuclear@4 13
nuclear@7 14 $(bin): $(obj) liberebus
nuclear@4 15 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@4 16
nuclear@7 17 .PHONY: liberebus
nuclear@7 18 liberebus:
nuclear@7 19 $(MAKE) -C liberebus
nuclear@7 20
nuclear@4 21 .PHONY: clean
nuclear@4 22 clean:
nuclear@4 23 rm -f $(obj) $(bin)
nuclear@4 24
nuclear@4 25 uname = $(shell uname -s)
nuclear@4 26 ifeq ($(uname), Darwin)
nuclear@4 27 sys = mac
nuclear@4 28 else ifeq ($(findstring MINGW, $(uname)), MINGW)
nuclear@4 29 sys = win
nuclear@4 30 else
nuclear@4 31 sys = unix
nuclear@4 32 endif