COMPILER='@@@'
SUFFIX='---'
PREFIX='&&&'
OUTPUT_O='NO'
OUTPUT=''
NAMED_OUTPUT=''
LASTFILE=''
INTEL='NO'
SIZE32='NO'
SIZE64='NO'
NEWARGS=''
SKIP='NO'
do
if [ $SKIP = 'ARCH' ]; then
# intercept -arch option and set SIZEXX
SKIP='NO'
SIZE64='YES'
else
SIZE32='YES'
fi
# which architecture are we compiling for?
INTEL='YES'
fi
elif [ $arg = '-arch' ]; then
SKIP='ARCH'
elif [ $arg = '--version' ]; then
exit 0
else
# if the -c option is given, the output is .o
if [ $arg = '-c' ]; then
OUTPUT_O='YES'
fi
# if the output file is given by a -o option, record it
if [ $SKIP = 'O' ]; then
SKIP='NO'
fi
if [ $arg = '-o' ]; then
SKIP='O'
fi
# Note each file ending by ${SUFFIX} and remember the last one
# Transform them in .o
OUTPUT+=' '
fi
fi
done
# What is the output?
elif [ $OUTPUT_O = 'NO' ]; then
# It is an executable whose is name is the LASTFILE without suffix
fi
# Othewise, the output is just the ${OUTPUT} variable as computed before
# For some reason, -dynamiclib and -lpython2.6 are missing when linking
# .so files. Add them, except if -bundle is set (incompatible switches)
NEWARGS="${NEWARGS} ${PREFIX}/lib/libpython2.6.dylib -dynamiclib"
fi
# Now, compile
# No size indication given, just proceed with default
exit 0
else
exit 1
fi
# 32-bit
exit 0
else
exit 1
fi
# 64-bit
exit 0
else
exit 1
fi
else
# Universal case
do
done
do
if [ $INTEL = 'YES' ]; then
else
fi
done
else
exit 1
fi
else
exit 1
fi
fi
exit 0