#!/bin/sh # Shave and a Haircut # (c) 2019 Epic Games # US Patent 6720962 debugArg= debugExt= mayaVersion= # Parse the parameter list. while [ "$1" != "" ]; do if [ "$1" = "debug" ]; then debugArg=debug debugExt=dbg else mayaVersion=$1 fi shift done if [ "${mayaVersion}" = "" ]; then echo "mklinuxBase:error: Maya version not specified." exit 1 fi tmpLog=/var/tmp/$$.log # Set up DTS, if needed. dtsNeeded=`utils/getg++.sh -dts ${mayaVersion}` if [ "$dtsNeeded" = "y" ]; then source /opt/rh/devtoolset-2/enable fi # Get the proper compiler gcc=`utils/getg++.sh ${mayaVersion} | sed 's/++/cc/'` if [ "$gcc" = "" ]; then echo "mklinuxBase:error: Maya version ${mayaVersion} not supported on this system." exit 1 fi # Build all the libexe components. opt="-O3" cd libexe echo "mklinuxBase:status: cleaning out old builds" make -f Makefile.linux cleanAll-x64 >& $tmpLog echo "mklinuxBase:status: building libAWLINUX${debugExt}-x64" make -f Makefile.linux SHAVE_OPT=${opt} CC=$gcc libAWLINUX${debugExt}-x64 >& ${tmpLog} if [ $? != 0 ]; then cat ${tmpLog} rm ${tmpLog} echo "mklinuxBase:error: errors building libAWLINUX${debugExt}-x64" exit 1 fi echo "mklinuxBase:status: building libAWLINUX2${debugExt}-x64" make -f Makefile.linux cleanIntermediates >& $tmpLog make -f Makefile.linux SHAVE_OPT=$opt CC=$gcc libAWLINUX2${debugExt}-x64 >& $tmpLog if [ $? != 0 ]; then cat ${tmpLog} rm ${tmpLog} echo "mklinuxBase:error: errors building libAWLINUX2${debugExt}-x64" exit 1 fi echo "mklinuxBase:status: building libAWLINUXEXT${debugExt}-x64" make -f Makefile.linux cleanIntermediates >& $tmpLog make -f Makefile.linux SHAVE_OPT=$opt CC=$gcc libAWLINUXEXT${debugExt}-x64 >& $tmpLog if [ $? != 0 ]; then cat ${tmpLog} rm ${tmpLog} echo "mklinuxBase:error: errors building libAWLINUXEXT${debugExt}-x64" exit 1 fi ./mkSDKincludes.csh rm $tmpLog cd .. echo "mklinuxBase:DONE :-)"