erebus
annotate 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 |
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@33 | 6 opt = -O3 -ffast-math |
nuclear@33 | 7 dbg = -g |
nuclear@33 | 8 warn = -Wall |
nuclear@33 | 9 |
nuclear@33 | 10 CFLAGS = -pedantic $(warn) $(opt) $(dbg) -Iliberebus/src |
nuclear@4 | 11 CXXFLAGS = -std=c++11 $(CFLAGS) |
nuclear@33 | 12 LDFLAGS = -Lliberebus $(rpath) $(libgl_$(sys)) -lm -lerebus -lvmath -limago -ldrawtext |
nuclear@4 | 13 |
nuclear@4 | 14 libgl_unix = -lGL -lGLU -lglut -lGLEW |
nuclear@4 | 15 libgl_mac = -framework OpenGL -framework GLUT -lGLEW |
nuclear@4 | 16 libgl_win = -lopengl32 -lglu32 -lglut32 -lglew32 |
nuclear@4 | 17 |
nuclear@7 | 18 $(bin): $(obj) liberebus |
nuclear@4 | 19 $(CXX) -o $@ $(obj) $(LDFLAGS) |
nuclear@4 | 20 |
nuclear@7 | 21 .PHONY: liberebus |
nuclear@7 | 22 liberebus: |
nuclear@7 | 23 $(MAKE) -C liberebus |
nuclear@7 | 24 |
nuclear@4 | 25 .PHONY: clean |
nuclear@4 | 26 clean: |
nuclear@4 | 27 rm -f $(obj) $(bin) |
nuclear@4 | 28 |
nuclear@4 | 29 uname = $(shell uname -s) |
nuclear@4 | 30 ifeq ($(uname), Darwin) |
nuclear@4 | 31 sys = mac |
nuclear@33 | 32 warn += -Wno-deprecated-declarations |
nuclear@4 | 33 else ifeq ($(findstring MINGW, $(uname)), MINGW) |
nuclear@4 | 34 sys = win |
nuclear@4 | 35 else |
nuclear@4 | 36 sys = unix |
nuclear@33 | 37 rpath = -Wl,-rpath=liberebus |
nuclear@4 | 38 endif |