You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.1 KiB

  1. #! /bin/sh
  2. # Copyright (C) 2005 MySQL AB
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; version 2 of the License.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program; if not, write to the Free Software
  15. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. path=`dirname $0`
  17. . "$path/SETUP.sh"
  18. c_warnings=""
  19. cxx_warnings=""
  20. fast_cflags="-O3"
  21. base_cxxflags="-fno-handle-exceptions"
  22. # FIXME do we need to link static, not to depend on CodeWarrior libs?
  23. if [ x$MODE = x ] ; then
  24. echo "You need to give an argument, 'standard', 'max', 'debug' or 'debug-max'"
  25. echo "Like: MODE=standard BUILD/compile-darwin-codewarrior"
  26. exit 1
  27. else
  28. case $MODE in
  29. standard|pro-gpl)
  30. # FIXME pro/pro-gpl different libedit/readline
  31. extra_flags="$ppc_cflags $fast_cflags"
  32. ;;
  33. pro)
  34. # FIXME pro/pro-gpl different libedit/readline
  35. extra_flags="$ppc_cflags $fast_cflags"
  36. extra_configs="--with-libedit"
  37. ;;
  38. max)
  39. extra_flags="$ppc_cflags $fast_cflags"
  40. extra_configs="$max_configs"
  41. ;;
  42. debug)
  43. extra_flags="$ppc_cflags $debug_cflags"
  44. c_warnings="$c_warnings $debug_extra_warnings"
  45. cxx_warnings="$cxx_warnings $debug_extra_warnings"
  46. extra_configs="$debug_configs"
  47. ;;
  48. debug-max)
  49. extra_flags="$ppc_cflags $debug_cflags $max_cflags"
  50. c_warnings="$c_warnings $debug_extra_warnings"
  51. cxx_warnings="$cxx_warnings $debug_extra_warnings"
  52. extra_configs="$debug_configs $max_configs"
  53. ;;
  54. *)
  55. echo "You need to give an argument, 'standard', 'max', 'debug' or 'debug-max'"
  56. echo "Like: MODE=standard BUILD/compile-darwin-codewarrior"
  57. exit 1
  58. ;;
  59. esac
  60. fi
  61. extra_configs="$extra_configs --with-darwin-mwcc"
  62. . "$path/FINISH.sh"