forked from multi-build/multibuild
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split off build environment configuration to a dedicated file
Resolution option 2-1 for https://github.com/matthew-brett/multibuild/issues/116
- Loading branch information
1 parent
b9071fc
commit a414ba0
Showing
7 changed files
with
36 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Find, load common utilities | ||
# Defines IS_OSX, fetch_unpack | ||
MULTIBUILD_DIR=$(dirname "${BASH_SOURCE[0]}") | ||
source $MULTIBUILD_DIR/common_utils.sh | ||
|
||
PLAT="${PLAT:x86_64}" | ||
BUILD_PREFIX="${BUILD_PREFIX:-/usr/local}" | ||
|
||
# Default compilation flags for OSX | ||
# IS_OSX is defined in common_utils.sh | ||
if [ -n "$IS_OSX" ]; then | ||
# Dual arch build by default | ||
ARCH_FLAGS=${ARCH_FLAGS:-"-arch i386 -arch x86_64"} | ||
# Only set CFLAGS, FFLAGS if they are not already defined. Build functions | ||
# can override the arch flags by setting CFLAGS, FFLAGS | ||
export CFLAGS="${CFLAGS:-$ARCH_FLAGS}" | ||
export CXXFLAGS="${CXXFLAGS:-$ARCH_FLAGS}" | ||
export FFLAGS="${FFLAGS:-$ARCH_FLAGS}" | ||
fi | ||
|
||
# Promote BUILD_PREFIX on search path to any newly built libs | ||
export CPPFLAGS="-L$BUILD_PREFIX/include $CPPFLAGS" | ||
export LIBRARY_PATH="$BUILD_PREFIX/lib:$LIBRARY_PATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters