#!/bin/sh
if [ -z "$TIZEN_SDK_DEV_PATH" ] ; then
- TIZEN_SDK_DEV_PATH=${HOME}/tizen-sdk-dev
+ TIZEN_SDK_DEV_PATH=${HOME}/tizen-sdk-dev
fi
CONFIGURE_APPEND=""
-EMUL_TARGET_LIST=""
-YAGL_EN=""
-YAGL_STATS_EN=""
-VIGS_EN=""
+EMUL_TARGET_LIST="i386-softmmu"
+SUPPLEMENTS_EN=""
usage() {
echo "usage: build.sh [options] [target]"
echo "options:"
echo "-d, --debug"
echo " build debug configuration"
- echo "-yagl|--yagl-device"
- echo " enable YaGL passthrough device"
- echo "-ys|--yagl-stats"
- echo " enable YaGL stats"
- echo "-vigs|--vigs-device"
- echo " enable VIGS device"
echo "-e|--extra"
echo " extra options for QEMU configure"
echo "-u|-h|--help|--usage"
echo " display this help message and exit"
}
-yagl_enable() {
- case "$1" in
- 0|no|disable)
- YAGL_EN="no"
- ;;
- 1|yes|enable)
- YAGL_EN="yes"
- ;;
- *)
- usage
- exit 1
- ;;
- esac
-}
-
-yagl_stats_enable() {
- case "$1" in
- 0|no|disable)
- YAGL_STATS_EN="no"
- ;;
- 1|yes|enable)
- YAGL_STATS_EN="yes"
- ;;
- *)
- usage
- exit 1
- ;;
- esac
-}
-
-vigs_enable() {
- case "$1" in
- 0|no|disable)
- VIGS_EN="no"
- ;;
- 1|yes|enable)
- VIGS_EN="yes"
- ;;
- *)
- usage
- exit 1
- ;;
- esac
-}
-
set_target() {
- if [ ! -z "$EMUL_TARGET_LIST" ] ; then
- usage
- exit 1
- fi
-
case "$1" in
x86|i386|i486|i586|i686)
EMUL_TARGET_LIST="i386-softmmu"
- if [ -z "$YAGL_EN" ] ; then
- yagl_enable yes
- fi
- if [ -z "$VIGS_EN" ] ; then
- vigs_enable yes
- fi
;;
arm)
EMUL_TARGET_LIST="arm-softmmu"
- if [ -z "$YAGL_EN" ] && [ "$targetos" != "Darwin" ] ; then
- yagl_enable yes
- fi
- if [ -z "$VIGS_EN" ] && [ "$targetos" != "Darwin" ] ; then
- vigs_enable yes
- fi
;;
all)
# EMUL_TARGET_LIST="i386-softmmu,arm-softmmu"
EMUL_TARGET_LIST="i386-softmmu"
- if [ -z "$YAGL_EN" ] ; then
- yagl_enable yes
- fi
- if [ -z "$VIGS_EN" ] ; then
- vigs_enable yes
- fi
;;
esac
}
shift
CONFIGURE_APPEND="$CONFIGURE_APPEND $1"
;;
- -yagl|--yagl-device)
- yagl_enable 1
- ;;
- -ys|--yagl-stats)
- yagl_stats_enable 1
- ;;
- -vigs|--vigs-device)
- vigs_enable 1
- ;;
-u|-h|--help|--usage)
usage
exit 0
;;
+ supplements)
+ SUPPLEMENTS_EN="yes"
+ ;;
*)
echo "Syntax Error"
usage
set_target all
fi
-CONFIGURE_APPEND="--target-list=$EMUL_TARGET_LIST $CONFIGURE_APPEND"
-
-if test "$YAGL_EN" = "yes" ; then
- CONFIGURE_APPEND="$CONFIGURE_APPEND --enable-yagl"
-else
- CONFIGURE_APPEND="$CONFIGURE_APPEND --disable-yagl"
-fi
-
-if test "$YAGL_STATS_EN" = "yes" ; then
- CONFIGURE_APPEND="$CONFIGURE_APPEND --enable-yagl-stats"
-else
- CONFIGURE_APPEND="$CONFIGURE_APPEND --disable-yagl-stats"
-fi
+# append common flags
+CONFIGURE_APPEND="--target-list=$EMUL_TARGET_LIST --enable-yagl --enable-curl --disable-gtk --disable-quorum"
-if test "$VIGS_EN" = "yes" ; then
- CONFIGURE_APPEND="$CONFIGURE_APPEND --enable-vigs"
-else
+# for emulator-supplemnts
+if test "$SUPPLEMENTS_EN" = "yes" ; then
CONFIGURE_APPEND="$CONFIGURE_APPEND --disable-vigs"
+else
+ CONFIGURE_APPEND="$CONFIGURE_APPEND --enable-vigs --enable-maru --enable-libav --enable-libpng"
fi
-# append common flags
-CONFIGURE_APPEND="--enable-maru --enable-libav --enable-curl --enable-libpng --disable-gtk --disable-quorum $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
else