18 |
|
|
19 |
# default parameters |
# default parameters |
20 |
prefix="/usr/local" |
prefix="/usr/local" |
21 |
interp_prefix="/usr/gnemul/qemu-i386" |
interp_prefix="/usr/gnemul/qemu-%M" |
22 |
static="no" |
static="no" |
23 |
cross_prefix="" |
cross_prefix="" |
24 |
cc="gcc" |
cc="gcc" |
27 |
make="make" |
make="make" |
28 |
strip="strip" |
strip="strip" |
29 |
cpu=`uname -m` |
cpu=`uname -m` |
30 |
target_list="i386 i386-softmmu arm" |
target_list="i386 i386-softmmu arm sparc" |
31 |
case "$cpu" in |
case "$cpu" in |
32 |
i386|i486|i586|i686|i86pc|BePC) |
i386|i486|i586|i686|i86pc|BePC) |
33 |
cpu="i386" |
cpu="i386" |
193 |
echo "Standard options:" |
echo "Standard options:" |
194 |
echo " --help print this message" |
echo " --help print this message" |
195 |
echo " --prefix=PREFIX install in PREFIX [$prefix]" |
echo " --prefix=PREFIX install in PREFIX [$prefix]" |
196 |
echo " --interp-prefix=PREFIX where to find shared libraries, etc. [$interp_prefix]" |
echo " --interp-prefix=PREFIX where to find shared libraries, etc." |
197 |
|
echo " use %M for cpu name [$interp_prefix]" |
198 |
echo " --target-list=LIST set target list [$target_list]" |
echo " --target-list=LIST set target list [$target_list]" |
199 |
echo "" |
echo "" |
200 |
echo "Advanced options (experts only):" |
echo "Advanced options (experts only):" |
311 |
config_h=$target_dir/config.h |
config_h=$target_dir/config.h |
312 |
target_cpu=`echo $target | cut -d '-' -f 1` |
target_cpu=`echo $target | cut -d '-' -f 1` |
313 |
target_bigendian="no" |
target_bigendian="no" |
314 |
|
[ "$target_cpu" = "sparc" ] && target_bigendian=yes |
315 |
target_softmmu="no" |
target_softmmu="no" |
316 |
if expr $target : '.*-softmmu' > /dev/null ; then |
if expr $target : '.*-softmmu' > /dev/null ; then |
317 |
target_softmmu="yes" |
target_softmmu="yes" |
328 |
|
|
329 |
echo "include ../config-host.mak" >> $config_mak |
echo "include ../config-host.mak" >> $config_mak |
330 |
echo "#include \"../config-host.h\"" >> $config_h |
echo "#include \"../config-host.h\"" >> $config_h |
331 |
echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix\"" >> $config_h |
|
332 |
|
interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_cpu/g"` |
333 |
|
echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h |
334 |
|
|
335 |
if test "$target_cpu" = "i386" ; then |
if test "$target_cpu" = "i386" ; then |
336 |
echo "TARGET_ARCH=i386" >> $config_mak |
echo "TARGET_ARCH=i386" >> $config_mak |
340 |
echo "TARGET_ARCH=arm" >> $config_mak |
echo "TARGET_ARCH=arm" >> $config_mak |
341 |
echo "#define TARGET_ARCH \"arm\"" >> $config_h |
echo "#define TARGET_ARCH \"arm\"" >> $config_h |
342 |
echo "#define TARGET_ARM 1" >> $config_h |
echo "#define TARGET_ARM 1" >> $config_h |
343 |
|
elif test "$target_cpu" = "sparc" ; then |
344 |
|
echo "TARGET_ARCH=sparc" >> $config_mak |
345 |
|
echo "#define TARGET_ARCH \"sparc\"" >> $config_h |
346 |
|
echo "#define TARGET_SPARC 1" >> $config_h |
347 |
else |
else |
348 |
echo "Unsupported target CPU" |
echo "Unsupported target CPU" |
349 |
exit 1 |
exit 1 |