3 # Small and fast configure script for Amiga family of operating systems
5 # Modify this line in order to add or remove additional subdirectories
6 # that also need to be configured
7 extra_packages
="opcodes"
12 echo "Usage: $0 [--host=<cpu>-<os>]"
13 echo "<cpu> is target CPU"
14 echo "<os> is one of: amigaos, morphos, aros"
15 echo "By default your current CPU and OS are autodetected"
19 echo -n "Checking target operating system... "
20 host=`echo $1 | cut -d= -f2`
21 cpu
=`echo $host | cut -d- -f1`
22 os
=`echo $host | cut -d- -f2`
28 if [ "$os" = "" ]; then
29 echo -n "Checking host operating system... "
32 os
=`echo $os | tr '[A-Z]' '[a-z]'`
35 if [ ! -d "config/$os" ]; then
36 echo "Error: Unsupported operating system"
40 echo "Writing makefile.inc"
42 cp -f config
/$os/makefile.inc makefile.inc
43 if [ "$cpu" != "" ]; then
45 echo >>makefile.inc
"CC := $cpu-$os-gcc"
48 echo "Configuring additional packages"
50 for pkg
in $extra_packages; do
51 echo "Configuring $pkg..."
53 cd $pkg && .
/configure $@