erebus
view Makefile @ 33:2c768a49e86e
- added -ldrawtext to the makefile
- removed -rpath from osx build
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 07 Jun 2014 14:21:56 +0300 |
parents | fb20e3855740 |
children | d15ee526daa6 |
line source
1 csrc = $(wildcard src/*.c)
2 ccsrc = $(wildcard src/*.cc)
3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
4 bin = erebus
6 opt = -O3 -ffast-math
7 dbg = -g
8 warn = -Wall
10 CFLAGS = -pedantic $(warn) $(opt) $(dbg) -Iliberebus/src
11 CXXFLAGS = -std=c++11 $(CFLAGS)
12 LDFLAGS = -Lliberebus $(rpath) $(libgl_$(sys)) -lm -lerebus -lvmath -limago -ldrawtext
14 libgl_unix = -lGL -lGLU -lglut -lGLEW
15 libgl_mac = -framework OpenGL -framework GLUT -lGLEW
16 libgl_win = -lopengl32 -lglu32 -lglut32 -lglew32
18 $(bin): $(obj) liberebus
19 $(CXX) -o $@ $(obj) $(LDFLAGS)
21 .PHONY: liberebus
22 liberebus:
23 $(MAKE) -C liberebus
25 .PHONY: clean
26 clean:
27 rm -f $(obj) $(bin)
29 uname = $(shell uname -s)
30 ifeq ($(uname), Darwin)
31 sys = mac
32 warn += -Wno-deprecated-declarations
33 else ifeq ($(findstring MINGW, $(uname)), MINGW)
34 sys = win
35 else
36 sys = unix
37 rpath = -Wl,-rpath=liberebus
38 endif