#!/bin/sh
-if [ -z "$TIZEN_SDK_DEV_PATH" ] ; then
- TIZEN_SDK_DEV_PATH=${HOME}/tizen-sdk-dev
-fi
-
CONFIGURE_APPEND=""
EMUL_TARGET_LIST="x86_64-softmmu"
echo "options:"
echo "-d, --debug"
echo " build debug configuration"
- echo "-e|--extra"
+ echo "-e|--extra EXTRA"
+ echo " extra options for QEMU configure"
+ echo "-p|--cross-prefix CROSS_PREFIX"
echo " extra options for QEMU configure"
echo "-u|-h|--help|--usage"
echo " display this help message and exit"
esac
}
-
-# OS specific
-targetos=`uname -s`
-echo "##### checking for os... targetos $targetos"
-
-echo "##### TIZEN_SDK_DEV_PATH: ${TIZEN_SDK_DEV_PATH}"
-
-echo "$*"
-
while [ "$#" -gt "0" ]
do
case $1 in
shift
CONFIGURE_APPEND="$CONFIGURE_APPEND $1"
;;
+ -p|--cross-prefix)
+ shift
+ CROSS_PREFIX="$1"
+ ;;
-u|-h|--help|--usage)
usage
exit 0
shift
done
+hostos=`uname -s`
+if [ -z "$CROSS_PREFIX" ] ; then
+ targetos=$hostos
+else
+ # FIXME
+ targetos="CROSS_MINGW";
+fi
+
+if [ -z "$TIZEN_SDK_DEV_PATH" ] ; then
+ if [ -z "$CROSS_PREFIX" ] ; then
+ TIZEN_SDK_DEV_PATH=${HOME}/tizen-sdk-dev
+ else
+ TIZEN_SDK_DEV_PATH=${HOME}/${CROSS_PREFIX}tizen-sdk-dev
+ fi
+fi
+
+echo "##### checking for os... Host OS $hostos, Target OS $targetos"
+echo "##### TIZEN_SDK_DEV_PATH: ${TIZEN_SDK_DEV_PATH}"
+echo "$*"
+
if [ -z "$EMUL_TARGET_LIST" ] ; then
set_target all
fi
# append common flags
-CONFIGURE_APPEND="--target-list=$EMUL_TARGET_LIST --enable-yagl --enable-curl --enable-vigs --enable-maru --enable-qt --enable-libav --enable-libpng --disable-sdl --disable-gtk --disable-vnc --disable-spice --disable-curses --disable-xen $CONFIGURE_APPEND"
+CONFIGURE_APPEND="--target-list=$EMUL_TARGET_LIST --enable-yagl --enable-curl --enable-vigs --enable-maru --enable-qt --enable-libpng --disable-sdl --disable-gtk --disable-vnc --disable-spice --disable-curses --disable-xen $CONFIGURE_APPEND"
if [ -z ${PKG_CONFIG_PATH} ] ; then # avoid pkg-config bug on Windows
export PKG_CONFIG_PATH=${TIZEN_SDK_DEV_PATH}/distrib/lib/pkgconfig
--enable-virtfs \
$CONFIGURE_APPEND \
;;
+CROSS_MINGW*)
+cd ..
+echo ""
+echo "##### QEMU configuring for emulator"
+echo "##### QEMU configure append:" $CONFIGURE_APPEND
+exec ./configure \
+ --enable-werror \
+ --cross-prefix=$CROSS_PREFIX \
+ --extra-ldflags=-Wl,--large-address-aware \
+ --extra-ldflags=-Wl,--export-all-symbols \
+ --extra-ldflags=-static-libgcc \
+ --extra-ldflags=-static-libstdc++ \
+ --audio-drv-list=dsound \
+ --enable-hax \
+ $CONFIGURE_APPEND \
+;;
MINGW*)
cd ..
echo ""
exec ./configure \
--enable-werror \
--cc=gcc \
+ --cxx=g++ \
--extra-cflags=-Wno-error=format \
--extra-cflags=-Wno-error=format-extra-args \
--extra-cflags=-Wno-error=redundant-decls \
--extra-ldflags=-Wl,--large-address-aware \
--extra-ldflags=-Wl,--export-all-symbols \
+ --extra-ldflags=-static-libgcc \
+ --extra-ldflags=-static-libstdc++ \
--audio-drv-list=dsound \
--enable-hax \
$CONFIGURE_APPEND \