11 echo "usage: build.sh [options] [target]"
14 echo " emulator target, one of: [x86|i386|i486|i586|i686|arm|all]. Defaults to \"all\""
18 echo " build debug configuration"
19 echo "-vgl|--virtio-gl"
20 echo " enable virtio GL support"
21 echo "-yagl|--yagl-device"
22 echo " enable YaGL passthrough device"
23 echo "-ys|--yagl-stats"
24 echo " enable YaGL stats"
25 echo "-vigs|--vigs-device"
26 echo " enable VIGS device"
28 echo " extra options for QEMU configure"
29 echo "-u|-h|--help|--usage"
30 echo " display this help message and exit"
94 if [ ! -z "$EMUL_TARGET_LIST" ] ; then
100 x86|i386|i486|i586|i686)
101 EMUL_TARGET_LIST="i386-softmmu"
102 if [ -z "$VIRTIOGL_EN" ] ; then
105 if [ -z "$YAGL_EN" ] ; then
108 if [ -z "$VIGS_EN" ] ; then
113 EMUL_TARGET_LIST="arm-softmmu"
114 if [ -z "$YAGL_EN" ] && [ "$targetos" != "Darwin" ] ; then
117 if [ -z "$VIGS_EN" ] && [ "$targetos" != "Darwin" ] ; then
122 # EMUL_TARGET_LIST="i386-softmmu,arm-softmmu"
123 EMUL_TARGET_LIST="i386-softmmu"
124 if [ -z "$VIRTIOGL_EN" ] ; then
127 if [ -z "$YAGL_EN" ] ; then
130 if [ -z "$VIGS_EN" ] ; then
140 targetarch=`echo | gcc -E -dM - | grep __x86_64`
143 if test "$targetarch" != ""
148 echo "##### checking for os... targetos $targetos"
152 while [ "$#" -gt "0" ]
155 x86|i386|i486|i586|i686|arm|all)
159 CONFIGURE_APPEND="$CONFIGURE_APPEND --enable-debug"
163 CONFIGURE_APPEND="$CONFIGURE_APPEND $1"
177 -u|-h|--help|--usage)
190 if [ -z "$EMUL_TARGET_LIST" ] ; then
194 CONFIGURE_APPEND="--target-list=$EMUL_TARGET_LIST $CONFIGURE_APPEND"
196 if test "$VIRTIOGL_EN" = "yes" ; then
197 CONFIGURE_APPEND="$CONFIGURE_APPEND --enable-gl"
199 CONFIGURE_APPEND="$CONFIGURE_APPEND --disable-gl"
202 if test "$YAGL_EN" = "yes" ; then
203 CONFIGURE_APPEND="$CONFIGURE_APPEND --enable-yagl"
205 CONFIGURE_APPEND="$CONFIGURE_APPEND --disable-yagl"
208 if test "$YAGL_STATS_EN" = "yes" ; then
209 CONFIGURE_APPEND="$CONFIGURE_APPEND --enable-yagl-stats"
211 CONFIGURE_APPEND="$CONFIGURE_APPEND --disable-yagl-stats"
214 if test "$VIGS_EN" = "yes" ; then
215 CONFIGURE_APPEND="$CONFIGURE_APPEND --enable-vigs"
217 CONFIGURE_APPEND="$CONFIGURE_APPEND --disable-vigs"
224 echo "##### FFMPEG configure for emulator"
226 --prefix=./$bindir --arch=${ffmpegarc} --enable-static --enable-pic --enable-optimizations --disable-doc --disable-gpl --disable-yasm --disable-postproc --disable-swscale --disable-ffmpeg --disable-ffprobe --disable-ffserver --disable-ffplay --disable-decoders --disable-encoders --disable-muxers --disable-demuxers --disable-parsers --disable-protocols --disable-network --disable-bsfs --disable-devices --disable-filters --enable-encoder=aac --enable-encoder=h263 --enable-encoder=h263p --enable-encoder=mpeg4 --enable-encoder=msmpeg4v2 --enable-encoder=msmpeg4v3 --enable-decoder=aac --enable-decoder=h263 --enable-decoder=h264 --enable-decoder=mp3 --enable-decoder=mp3adu --enable-decoder=mpeg4 --enable-decoder=mpegvideo --enable-decoder=msmpeg4v1 --enable-decoder=msmpeg4v2 --enable-decoder=msmpeg4v3 --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=wmv3 --enable-decoder=vc1
232 echo "##### QEMU configuring for emulator"
233 echo "##### QEMU configure append:" $CONFIGURE_APPEND
234 export PKG_CONFIG_PATH=${PWD}/tizen/distrib/remote/output/lib/pkgconfig:${PKG_CONFIG_PATH}
235 echo "PKG_CONFIG_PATH="${PKG_CONFIG_PATH}
238 --audio-drv-list=alsa \
248 echo "##### FFMPEG configure for emulator"
250 --prefix=./$bindir --arch=x86 --enable-static --enable-w32threads --enable-optimizations --enable-memalign-hack --disable-doc --disable-gpl --disable-yasm --disable-postproc --disable-swscale --disable-ffmpeg --disable-ffprobe --disable-ffserver --disable-ffplay --disable-decoders --disable-encoders --disable-muxers --disable-demuxers --disable-parsers --disable-protocols --disable-network --disable-bsfs --disable-devices --disable-filters --enable-encoder=aac --enable-encoder=h263 --enable-encoder=h263p --enable-encoder=mpeg4 --enable-encoder=msmpeg4v2 --enable-encoder=msmpeg4v3 --enable-decoder=aac --enable-decoder=h263 --enable-decoder=h264 --enable-decoder=mp3 --enable-decoder=mp3adu --enable-decoder=mpeg4 --enable-decoder=mpegvideo --enable-decoder=msmpeg4v1 --enable-decoder=msmpeg4v2 --enable-decoder=msmpeg4v3 --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=wmv3 --enable-decoder=vc1
255 echo "##### QEMU configuring for emulator"
256 echo "##### QEMU configure append:" $CONFIGURE_APPEND
257 # We add CFLAGS '-fno-omit-frame-pointer'.
258 # A GCC might have a bug related with omitting frame pointer. It generates weird instructions.
260 --extra-cflags=-fno-omit-frame-pointer \
262 --audio-drv-list=winwave \
271 echo "##### FFMPEG configure for emulator"
273 --prefix=./$bindir --extra-cflags=-mmacosx-version-min=10.4 --arch=x86 --enable-static --enable-pic --enable-optimizations --disable-doc --disable-gpl --disable-yasm --disable-postproc --disable-swscale --disable-ffmpeg --disable-ffprobe --disable-ffserver --disable-ffplay --disable-decoders --disable-encoders --disable-muxers --disable-demuxers --disable-parsers --disable-protocols --disable-network --disable-bsfs --disable-devices --disable-filters --enable-encoder=aac --enable-encoder=h263 --enable-encoder=h263p --enable-encoder=mpeg4 --enable-encoder=msmpeg4v2 --enable-encoder=msmpeg4v3 --enable-decoder=aac --enable-decoder=h263 --enable-decoder=h264 --enable-decoder=mp3 --enable-decoder=mp3adu --enable-decoder=mpeg4 --enable-decoder=mpegvideo --enable-decoder=msmpeg4v1 --enable-decoder=msmpeg4v2 --enable-decoder=msmpeg4v3 --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=wmv3 --enable-decoder=vc1 --cc=cc
278 echo "##### QEMU configuring for emulator"
279 echo "##### QEMU configure append:" $CONFIGURE_APPEND
281 --extra-cflags=-mmacosx-version-min=10.4 \
282 --audio-drv-list=coreaudio \