summaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD/FINISH.sh6
-rwxr-xr-xBUILD/compile-darwin-mwcc54
-rwxr-xr-xBUILD/compile-dist5
3 files changed, 59 insertions, 6 deletions
diff --git a/BUILD/FINISH.sh b/BUILD/FINISH.sh
index 094eb8275d6..143db3e0692 100644
--- a/BUILD/FINISH.sh
+++ b/BUILD/FINISH.sh
@@ -2,12 +2,6 @@ cflags="$c_warnings $extra_flags"
cxxflags="$cxx_warnings $base_cxxflags $extra_flags"
extra_configs="$extra_configs $local_infile_configs"
configure="./configure $base_configs $extra_configs"
-for arg
-do
- # Escape special characters so they don't confuse eval
- configure="$configure "`echo "$arg" | \
- sed -e 's,\([^a-zA-Z0-9_.=-]\),\\\\\1,g'`
-done
commands="\
$make -k clean || true
diff --git a/BUILD/compile-darwin-mwcc b/BUILD/compile-darwin-mwcc
new file mode 100755
index 00000000000..6fd0eab7e26
--- /dev/null
+++ b/BUILD/compile-darwin-mwcc
@@ -0,0 +1,54 @@
+#! /bin/sh
+
+path=`dirname $0`
+. "$path/SETUP.sh"
+
+c_warnings=""
+cxx_warnings=""
+fast_cflags="-O3"
+base_cxxflags="-fno-handle-exceptions"
+
+# FIXME do we need to link static, not to depend on CodeWarrior libs?
+
+if [ x$MODE = x ] ; then
+ echo "You need to give an argument, 'standard', 'max', 'debug' or 'debug-max'"
+ echo "Like: MODE=standard BUILD/compile-darwin-codewarrior"
+ exit 1
+else
+ case $MODE in
+ standard|pro-gpl)
+ # FIXME pro/pro-gpl different libedit/readline
+ extra_flags="$ppc_cflags $fast_cflags"
+ ;;
+ pro)
+ # FIXME pro/pro-gpl different libedit/readline
+ extra_flags="$ppc_cflags $fast_cflags"
+ extra_configs="--with-libedit"
+ ;;
+ max)
+ extra_flags="$ppc_cflags $fast_cflags"
+ extra_configs="$max_configs"
+ ;;
+ debug)
+ extra_flags="$ppc_cflags $debug_cflags"
+ c_warnings="$c_warnings $debug_extra_warnings"
+ cxx_warnings="$cxx_warnings $debug_extra_warnings"
+ extra_configs="$debug_configs"
+ ;;
+ debug-max)
+ extra_flags="$ppc_cflags $debug_cflags $max_cflags"
+ c_warnings="$c_warnings $debug_extra_warnings"
+ cxx_warnings="$cxx_warnings $debug_extra_warnings"
+ extra_configs="$debug_configs $max_configs"
+ ;;
+ *)
+ echo "You need to give an argument, 'standard', 'max', 'debug' or 'debug-max'"
+ echo "Like: MODE=standard BUILD/compile-darwin-codewarrior"
+ exit 1
+ ;;
+ esac
+fi
+
+extra_configs="$extra_configs --with-darwin-mwcc"
+
+. "$path/FINISH.sh"
diff --git a/BUILD/compile-dist b/BUILD/compile-dist
index 7c177f54258..39095f59ffa 100755
--- a/BUILD/compile-dist
+++ b/BUILD/compile-dist
@@ -18,12 +18,17 @@ autoconf
# Default to gcc for CC and CXX
if test -z "$CXX" ; then
export CXX=gcc
+ # Set some required compile options
+ if test -z "$CXXFLAGS" ; then
+ export CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti"
+ fi
fi
if test -z "$CC" ; then
export CC=gcc
fi
+
# Use ccache, if available
if ccache -V > /dev/null 2>&1
then