Debian Codegraph @

lib/Makefile

raw symbols SCIP
1 # Uncomment these if you are on OS X and want to build universal libraries.
2 # This is only important if you intend to produce a Ledger binary for
3 # installation.
4
5 STOW_ROOT = /usr/local/Cellar/boost
6 PRODUCTS = $(HOME)/Products
7
8 GCC_VERSION = 4.7
9 BOOST_VERSION = 1_52_0
10
11 CC = gcc-mp-$(GCC_VERSION)
12 ifeq ($(CC),clang)
13 CXX = clang++
14 LD = llvm-ld
15 DIR_SUFFIX = clang
16 OPTJ =
17 else
18 CXX = g++-mp-$(GCC_VERSION)
19 LD = gcc-mp-$(GCC_VERSION)
20 DIR_SUFFIX = gcc$(subst .,,$(GCC_VERSION))
21 OPTJ = #-j8
22 endif
23 CFLAGS = $(CPPFLAGS) -g2 -ggdb
24 LDFLAGS = -g2 -ggdb
25
26 BOOST_SOURCE = boost-release
27 ifeq ($(GCC_VERSION),4.7)
28 BOOST_DEFINES = define=_GLIBCXX__PTHREADS=1
29 else
30 BOOST_DEFINES =
31 endif
32 ifeq ($(CC),clang)
33 BOOST_TOOLSET = clang
34 else
35 BOOST_TOOLSET = darwin
36 endif
37 BOOST_FLAGS = toolset=$(BOOST_TOOLSET) --layout=versioned \
38 link=shared threading=single $(BOOST_DEFINES)
39 BOOST_DIR = boost_$(BOOST_VERSION)-$(DIR_SUFFIX)
40 BOOST_STOW = $(STOW_ROOT)/$(BOOST_VERSION)
41 BOOST_BUILD = $(PRODUCTS)/$(BOOST_DIR)
42
43 all: boost-build
44
45 prepare-boost:
46 perl -i -pe 's/local command = \[ common\.get-invocation-command darwin : g\+\+ : .*/local command = [ common.get-invocation-command darwin : g++ : $(CXX) ] ;/;' $(BOOST_SOURCE)/tools/build/v2/tools/darwin.jam
47 perl -i -pe 's/flags darwin\.compile OPTIONS : -no-cpp-precomp -gdwarf-2 (-fexceptions )?;/flags darwin\.compile OPTIONS : -gdwarf-2 \1;/;' $(BOOST_SOURCE)/tools/build/v2/tools/darwin.jam
48
49 boost-build: prepare-boost
50 (cd $(BOOST_SOURCE) && \
51 sh bootstrap.sh && \
52 ./b2 $(OPTJ) debug release --prefix=$(BOOST_STOW) \
53 --build-dir=$(BOOST_BUILD) $(BOOST_FLAGS) install)
54
55 clean:
56 -rm -fr $(BOOST_STOW) $(BOOST_BUILD)