diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/linux-build-dependencies.sh | 26 | ||||
| -rw-r--r-- | scripts/setenv-linbuild-clang.sh | 6 | 
2 files changed, 27 insertions, 5 deletions
| diff --git a/scripts/linux-build-dependencies.sh b/scripts/linux-build-dependencies.sh index d7d8f49..e8a43b3 100755 --- a/scripts/linux-build-dependencies.sh +++ b/scripts/linux-build-dependencies.sh @@ -120,7 +120,8 @@ build_boost()    ./bootstrap.sh --prefix=$DEPLOYDIR --with-libraries=thread,program_options,filesystem,system,regex  	if [ $CXX ]; then  		if [ $CXX = "clang" ]; then -		  ./b2 -j$NUMCPU toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" install +		  ./b2 -j$NUMCPU toolset=clang install +		  # ./b2 -j$NUMCPU toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" install  		fi  	else  	  ./b2 -j$NUMCPU @@ -171,7 +172,14 @@ build_glew()      sed -ibak s/"\-lXmu"/"\-L\/usr\/lib64\/libXmu.so.6"/ config/Makefile.linux    fi -  GLEW_DEST=$DEPLOYDIR make -j$NUMCPU +	if [ $CC ]; then +		if [ $CC = "clang" ]; then +			echo "modifying glew makefile for clang" +			sed -i s/\$\(CC\)/clang/ Makefile +		fi +	fi + +	GLEW_DEST=$DEPLOYDIR make -j$NUMCPU    GLEW_DEST=$DEPLOYDIR make install  } @@ -195,10 +203,20 @@ build_opencsg()    fi    if [ "`command -v qmake-qt4`" ]; then -    qmake-qt4 +    OPCSG_QM = qmake-qt4    else -    qmake +    OPCSG_QM = qmake    fi + +	if [ $CXX ]; then +		if [ $CXX = "clang++" ]; then +		  cd $BASEDIR/src/opencsg-$version/src +			$(OPCSG_QM) +		  cd $BASEDIR/src/opencsg-$version +			$(OPCSG_QM) +		fi +	fi +    make    cp -av lib/* $DEPLOYDIR/lib    cp -av include/* $DEPLOYDIR/include diff --git a/scripts/setenv-linbuild-clang.sh b/scripts/setenv-linbuild-clang.sh index c4e02f8..9551235 100644 --- a/scripts/setenv-linbuild-clang.sh +++ b/scripts/setenv-linbuild-clang.sh @@ -1,8 +1,12 @@ -# build dependencies and openscad on linux with clang. +# build dependencies and/or openscad on linux with the clang compiler  export CC=clang  export CXX=clang++  export QMAKESPEC=unsupported/linux-clang +echo CC has been modified: $CC +echo CXX has been modified: $CXX +echo QMAKESPEC has been modified: $QMAKESPEC +  . ./scripts/setenv-linbuild.sh | 
