summaryrefslogtreecommitdiff
path: root/scripts/macosx-build-dependencies.sh
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-08-22 01:12:53 (GMT)
committerMarius Kintel <marius@kintel.net>2012-10-23 02:07:45 (GMT)
commit85bc16fc9ffa69d5428d8322ba0cdc14f010aaaf (patch)
treefb028cedfc8442f261a93cee4162aa06668b7ddd /scripts/macosx-build-dependencies.sh
parentdadde5d754191cc0cc430d3079d8811147db4bc1 (diff)
Initial clang build support
Conflicts: scripts/macosx-build-dependencies.sh
Diffstat (limited to 'scripts/macosx-build-dependencies.sh')
-rwxr-xr-xscripts/macosx-build-dependencies.sh20
1 files changed, 6 insertions, 14 deletions
diff --git a/scripts/macosx-build-dependencies.sh b/scripts/macosx-build-dependencies.sh
index f6b8161..024020a 100755
--- a/scripts/macosx-build-dependencies.sh
+++ b/scripts/macosx-build-dependencies.sh
@@ -9,6 +9,7 @@
# Usage: macosx-build-dependencies.sh [-6l]
# -6 Build only 64-bit binaries
# -l Force use of LLVM compiler
+# -c Force use of clang compiler
#
# Prerequisites:
# - MacPorts: curl, cmake
@@ -33,10 +34,11 @@ export QMAKESPEC=macx-g++
printUsage()
{
- echo "Usage: $0 [-6l]"
+ echo "Usage: $0 [-6lc]"
echo
echo " -6 Build only 64-bit binaries"
echo " -l Force use of LLVM compiler"
+ echo " -c Force use of clang compiler"
}
# Hack warning: gmplib is built separately in 32-bit and 64-bit mode
@@ -248,7 +250,7 @@ build_glew()
if $OPTION_32BIT; then
GLEW_EXTRA_FLAGS="-arch i386"
fi
- make GLEW_DEST=$DEPLOYDIR CFLAGS.EXTRA="-no-cpp-precomp -dynamic -fno-common -mmacosx-version-min=$MAC_OSX_VERSION_MIN $GLEW_EXTRA_FLAGS -arch x86_64" LDFLAGS.EXTRA="-mmacosx-version-min=$MAC_OSX_VERSION_MIN $GLEW_EXTRA_FLAGS -arch x86_64" STRIP= install
+ make GLEW_DEST=$DEPLOYDIR CC=$CC CFLAGS.EXTRA="-no-cpp-precomp -dynamic -fno-common -mmacosx-version-min=$MAC_OSX_VERSION_MIN $GLEW_EXTRA_FLAGS -arch x86_64" LDFLAGS.EXTRA="-mmacosx-version-min=$MAC_OSX_VERSION_MIN $GLEW_EXTRA_FLAGS -arch x86_64" STRIP= install
}
build_opencsg()
@@ -308,24 +310,18 @@ if [ ! -f $OPENSCADDIR/openscad.pro ]; then
exit 0
fi
-while getopts '6l' c
+while getopts '6lc' c
do
case $c in
6) OPTION_32BIT=false;;
l) OPTION_LLVM=true;;
+ c) OPTION_CLANG=true;;
esac
done
OSVERSION=`sw_vers -productVersion | cut -d. -f2`
if [[ $OSVERSION -ge 7 ]]; then
echo "Detected Lion or later"
- export LION=1
- export CC=gcc
- export CXX=g++
- export CPP=cpp
- # Somehow, qmake in Qt-4.8.2 doesn't detect Lion's gcc and falls back into
- # project file mode unless manually given a QMAKESPEC
- export QMAKESPEC=macx-llvm
DETECTED_LION=true
else
echo "Detected Snow Leopard or earlier"
@@ -335,10 +331,6 @@ USING_LLVM=false
USING_GCC=false
USING_CLANG=false
if $OPTION_LLVM; then
- echo "Using LLVM compiler"
- export CC=llvm-gcc
- export CXX=llvm-g++
- export QMAKESPEC=macx-llvm
USING_LLCM=true
elif $OPTION_GCC; then
USING_GCC=true
contact: Jan Huwald // Impressum