erebus

diff Makefile @ 4:93894c232d65

more changes across the board
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 29 Apr 2014 07:38:40 +0300
parents
children f067148b3494
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile	Tue Apr 29 07:38:40 2014 +0300
     1.3 @@ -0,0 +1,28 @@
     1.4 +csrc = $(wildcard src/*.c)
     1.5 +ccsrc = $(wildcard src/*.cc)
     1.6 +obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
     1.7 +bin = erebus
     1.8 +
     1.9 +CFLAGS = -pedantic -Wall -g -Iliberebus/src
    1.10 +CXXFLAGS = -std=c++11 $(CFLAGS)
    1.11 +LDFLAGS = -Lliberebus -Wl,-rpath=liberebus $(libgl_$(sys)) -lm -lerebus -lvmath
    1.12 +
    1.13 +libgl_unix = -lGL -lGLU -lglut -lGLEW
    1.14 +libgl_mac = -framework OpenGL -framework GLUT -lGLEW
    1.15 +libgl_win = -lopengl32 -lglu32 -lglut32 -lglew32
    1.16 +
    1.17 +$(bin): $(obj) liberebus/liberebus.so
    1.18 +	$(CXX) -o $@ $(obj) $(LDFLAGS)
    1.19 +
    1.20 +.PHONY: clean
    1.21 +clean:
    1.22 +	rm -f $(obj) $(bin)
    1.23 +
    1.24 +uname = $(shell uname -s)
    1.25 +ifeq ($(uname), Darwin)
    1.26 +	sys = mac
    1.27 +else ifeq ($(findstring MINGW, $(uname)), MINGW)
    1.28 +	sys = win
    1.29 +else
    1.30 +	sys = unix
    1.31 +endif