erebus

annotate Makefile @ 6:bb006fb96f1b

forgot to add two files
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 24 May 2014 02:22:14 +0300
parents
children f067148b3494
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@4 8 LDFLAGS = -Lliberebus -Wl,-rpath=liberebus $(libgl_$(sys)) -lm -lerebus -lvmath
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@4 14 $(bin): $(obj) liberebus/liberebus.so
nuclear@4 15 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@4 16
nuclear@4 17 .PHONY: clean
nuclear@4 18 clean:
nuclear@4 19 rm -f $(obj) $(bin)
nuclear@4 20
nuclear@4 21 uname = $(shell uname -s)
nuclear@4 22 ifeq ($(uname), Darwin)
nuclear@4 23 sys = mac
nuclear@4 24 else ifeq ($(findstring MINGW, $(uname)), MINGW)
nuclear@4 25 sys = win
nuclear@4 26 else
nuclear@4 27 sys = unix
nuclear@4 28 endif