erebus

view Makefile @ 9:d38e13d6063c

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 24 May 2014 17:22:53 +0300
parents 93894c232d65
children fb20e3855740
line source
1 csrc = $(wildcard src/*.c)
2 ccsrc = $(wildcard src/*.cc)
3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
4 bin = erebus
6 CFLAGS = -pedantic -Wall -g -Iliberebus/src
7 CXXFLAGS = -std=c++11 $(CFLAGS)
8 LDFLAGS = -Lliberebus -Wl,-rpath=liberebus $(libgl_$(sys)) -lm -lerebus -lvmath
10 libgl_unix = -lGL -lGLU -lglut -lGLEW
11 libgl_mac = -framework OpenGL -framework GLUT -lGLEW
12 libgl_win = -lopengl32 -lglu32 -lglut32 -lglew32
14 $(bin): $(obj) liberebus
15 $(CXX) -o $@ $(obj) $(LDFLAGS)
17 .PHONY: liberebus
18 liberebus:
19 $(MAKE) -C liberebus
21 .PHONY: clean
22 clean:
23 rm -f $(obj) $(bin)
25 uname = $(shell uname -s)
26 ifeq ($(uname), Darwin)
27 sys = mac
28 else ifeq ($(findstring MINGW, $(uname)), MINGW)
29 sys = win
30 else
31 sys = unix
32 endif