From 011a8f2ced9c9bede5b8b2bb0eb71c936529fad4 Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Tue, 31 Jan 2012 09:12:35 -0600 Subject: [PATCH] additional experimental c++11 and libc++ support --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8300054d96..dc527180c4 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,6 @@ objects = network_utilities.o sha1.o base64.o md5.o uri.o hybi_header.o data.o BOOST_LIB_PATH ?= /usr/local/lib BOOST_INCLUDE_PATH ?= /usr/local/include -CPP11 ?= libs = -lboost_system -lboost_date_time -lboost_regex -lboost_random -lboost_program_options @@ -40,9 +39,16 @@ libs = -lboost_system -lboost_date_time -lboost_regex -lboost_random -lboost_pro OS=$(shell uname) +# CPP11 build +ifeq ($(CPP11), 1) + CPP11_ = -std=c++0x -stdlib=libc++ +else + CPP11_ ?= +endif + # Defaults ifeq ($(OS), Darwin) - cxxflags_default = -c $(CPP11) -Wall -O2 -DNDEBUG -I$(BOOST_INCLUDE_PATH) + cxxflags_default = -c $(CPP11_) -Wall -O2 -DNDEBUG -I$(BOOST_INCLUDE_PATH) else cxxflags_default = -c -Wall -O2 -DNDEBUG -I$(BOOST_INCLUDE_PATH) endif @@ -84,6 +90,8 @@ else CXXFLAGS ?= $(cxxflags_default) endif + + # SHARED specific settings ifeq ($(SHARED), 1) ifeq ($(OS), Darwin)