erebus

view 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 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/liberebus.so
15 $(CXX) -o $@ $(obj) $(LDFLAGS)
17 .PHONY: clean
18 clean:
19 rm -f $(obj) $(bin)
21 uname = $(shell uname -s)
22 ifeq ($(uname), Darwin)
23 sys = mac
24 else ifeq ($(findstring MINGW, $(uname)), MINGW)
25 sys = win
26 else
27 sys = unix
28 endif