diff options
author | John Wiegley <johnw@newartisans.com> | 2011-02-04 15:33:16 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2011-02-04 15:33:16 -0500 |
commit | 67047670a0b2884720694862a1f6c5735301ee3c (patch) | |
tree | 7bec1d5be6f95ac77cc58dfd821e4c57f8d5d286 /lib/Makefile | |
parent | c313cee085d97aa0c24ce1491cfc66bd025d32ef (diff) | |
download | fork-ledger-67047670a0b2884720694862a1f6c5735301ee3c.tar.gz fork-ledger-67047670a0b2884720694862a1f6c5735301ee3c.tar.bz2 fork-ledger-67047670a0b2884720694862a1f6c5735301ee3c.zip |
lib/Makefile now uses GCC_VERSION for building
Diffstat (limited to 'lib/Makefile')
-rw-r--r-- | lib/Makefile | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/lib/Makefile b/lib/Makefile index 8c35c4e3..ae677e6a 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -5,16 +5,19 @@ STOW_ROOT = /usr/local/stow PRODUCTS = $(HOME)/Products -CC = gcc-mp-4.5 +GCC_VERSION = 4.6 +BOOST_VERSION = 1_45_0 + +CC = gcc-mp-$(GCC_VERSION) ifeq ($(CC),clang) CXX = clang++ LD = llvm-ld DIR_SUFFIX = clang OPTJ = else -CXX = g++-mp-4.5 -LD = gcc-mp-4.5 -DIR_SUFFIX = gcc45 +CXX = g++-mp-$(GCC_VERSION) +LD = gcc-mp-$(GCC_VERSION) +DIR_SUFFIX = gcc$(subst .,,$(GCC_VERSION)) OPTJ = #-j16 endif CPPFLAGS = -D_GLIBCXX_FULLY_DYNAMIC_STRING=1 @@ -24,7 +27,6 @@ endif CFLAGS = $(CPPFLAGS) -g LDFLAGS = -g -BOOST_VERSION = 1_45_0 BOOST_SOURCE = boost-release BOOST_DEFINES = define=_GLIBCXX_FULLY_DYNAMIC_STRING=1 ifeq ($(CC),clang) @@ -40,38 +42,41 @@ BOOST_FLAGS = --toolset=$(BOOST_TOOLSET) \ BOOST_DIR = boost_$(BOOST_VERSION)-$(DIR_SUFFIX) BOOST_STOW = $(STOW_ROOT)/$(BOOST_DIR) BOOST_BUILD = $(PRODUCTS)/$(BOOST_DIR) -ICU_FLAGS = -sHAVE_ICU=1 -sICU_PATH=$(STOW_ROOT)/icu +ICU_FLAGS = -sHAVE_ICU=1 -sICU_PATH=$(STOW_ROOT)/icu-$(DIR_SUFFIX) BOOST_ICU_DIR = boost_$(BOOST_VERSION)-icu-$(DIR_SUFFIX) BOOST_ICU_STOW = $(STOW_ROOT)/$(BOOST_ICU_DIR) BOOST_ICU_BUILD = $(PRODUCTS)/$(BOOST_ICU_DIR) -all: boost-build #icu-build boost-icu-build +all: boost-build icu-build boost-icu-build prepare-boost: - perl -i -pe 's/local command = \[ common\.get-invocation-command darwin : g\+\+ : \$$\(command\) \] ;/local command = [ common.get-invocation-command darwin : g++ : $(CXX) ] ;/;' $(BOOST_SOURCE)/tools/build/v2/tools/darwin.jam + 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 perl -i -pe 's/flags darwin\.compile OPTIONS : -no-cpp-precomp -gdwarf-2 ;/flags darwin\.compile OPTIONS : -gdwarf-2 ;/;' $(BOOST_SOURCE)/tools/build/v2/tools/darwin.jam boost-build: prepare-boost (cd $(BOOST_SOURCE) && \ sh bootstrap.sh && \ - ./bjam $(OPTJ) debug --prefix=$(BOOST_STOW) --build-dir=$(BOOST_BUILD) \ + ./bjam $(OPTJ) debug --prefix=$(BOOST_STOW) \ + --build-dir=$(BOOST_BUILD) \ $(BOOST_FLAGS) install) -#icu-build: -# -(cd icu/source; make distclean) -# (cd icu/source; sh autogen.sh; \ -# ./configure CPPFLAGS="$(CPPFLAGS)" \ -# CFLAGS="$(CFLAGS)" \ -# LDFLAGS="$(LDFLAGS)" \ -# CC="$(CC)" CXX="$(CXX)" LD="$(LD)" \ -# --enable-static --enable-debug \ -# --prefix=$(STOW_ROOT)/icu-$(DIR_SUFFIX) && \ -# make install) -# -#boost-icu-build: -# (cd $(BOOST_SOURCE) && \ -# bjam debug --prefix=$(BOOST_ICU_STOW) --build-dir=$(BOOST_ICU_BUILD) \ -# $(BOOST_FLAGS) $(ICU_FLAGS) install) +icu-build: + -(cd icu/source; make distclean) + (cd icu/source; sh autogen.sh; \ + ./configure CPPFLAGS="$(CPPFLAGS)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + CC="$(CC)" CXX="$(CXX)" LD="$(LD)" \ + --enable-static --enable-debug \ + --prefix=$(STOW_ROOT)/icu-$(DIR_SUFFIX) && \ + make install) + +boost-icu-build: + (cd $(BOOST_SOURCE) && \ + sh bootstrap.sh && \ + ./bjam $(OPTJ) debug --prefix=$(BOOST_ICU_STOW) \ + --build-dir=$(BOOST_ICU_BUILD) \ + $(BOOST_FLAGS) $(ICU_FLAGS) install) clean: -rm -fr $(BOOST_STOW) $(BOOST_BUILD) |