summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile18
-rwxr-xr-xlib/build.sh17
2 files changed, 25 insertions, 10 deletions
diff --git a/lib/Makefile b/lib/Makefile
index d7b1071b..cb05e44d 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -5,8 +5,8 @@
STOW_ROOT = /usr/local/stow
PRODUCTS = $(HOME)/Products
-GCC_VERSION = 4.6
-BOOST_VERSION = 1_48_0
+GCC_VERSION = 4.7
+BOOST_VERSION = 1_49_0
CC = gcc-mp-$(GCC_VERSION)
ifeq ($(CC),clang)
@@ -20,22 +20,20 @@ LD = gcc-mp-$(GCC_VERSION)
DIR_SUFFIX = gcc$(subst .,,$(GCC_VERSION))
OPTJ = #-j8
endif
-#CPPFLAGS = -D_GLIBCXX_FULLY_DYNAMIC_STRING=1
-#ifneq ($(CC),clang)
-#CPPFLAGS += -D_GLIBCXX_DEBUG=1
-#endif
CFLAGS = $(CPPFLAGS) -g2 -ggdb
LDFLAGS = -g2 -ggdb
BOOST_SOURCE = boost-release
-#BOOST_DEFINES = define=_GLIBCXX_FULLY_DYNAMIC_STRING=1
+ifeq ($(GCC_VERSION),4.7)
+BOOST_DEFINES = define=_GLIBCXX__PTHREADS=1
+else
+BOOST_DEFINES =
+endif
ifeq ($(CC),clang)
BOOST_TOOLSET = clang
else
BOOST_TOOLSET = darwin
-#BOOST_DEFINES += define=_GLIBCXX_DEBUG=1
endif
-#BOOST_FLAGS = --architecture=x86 --address_model=32_64
BOOST_FLAGS = toolset=$(BOOST_TOOLSET) --layout=versioned \
link=shared threading=single $(BOOST_DEFINES)
BOOST_DIR = boost_$(BOOST_VERSION)-$(DIR_SUFFIX)
@@ -55,7 +53,7 @@ prepare-boost:
boost-build: prepare-boost
(cd $(BOOST_SOURCE) && \
sh bootstrap.sh && \
- ./b2 $(OPTJ) debug --prefix=$(BOOST_STOW) \
+ ./b2 $(OPTJ) debug release --prefix=$(BOOST_STOW) \
--build-dir=$(BOOST_BUILD) $(BOOST_FLAGS) install)
icu-build:
diff --git a/lib/build.sh b/lib/build.sh
new file mode 100755
index 00000000..28408d73
--- /dev/null
+++ b/lib/build.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# This build script is for OS X Lion users who have compiled openmpi and
+# clang-3.1 from MacPorts. I build my own Boost instead of using MacPorts'
+# Boost in order to get better debugging support, and to link with libc++.
+
+export PATH=$PATH:/opt/local/lib/openmpi/bin
+
+cat > ~/user-config.jam <<EOF
+using clang-darwin : : "/usr/local/bin/clang++" : <cxxflags>-std=c++11 <include>/usr/local/include ;
+EOF
+
+# jww (2012-04-24): This is still linking against /usr/lib/libc++.1.dylib
+# instead of /usr/local/lib/libc++.1.dylib
+make CXX=clang++ LD=clang++ CC=clang OPTJ=-j20 \
+ BOOST_TOOLSET=clang-darwin DIR_SUFFIX=clang31 \
+ BOOST_DEFINES="-sICU_PATH=/usr/local cxxflags=\"-g -std=c++11 -nostdlibinc -I/usr/local/include -I/usr/local/include/c++/v1 -I/opt/local/include -I/usr/include -stdlib=libc++\" linkflags=\"-g -Z -L/usr/local/lib -L/opt/local/lib -L/usr/lib /usr/local/lib/libc++.dylib -stdlib=libc++\""