summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorSeokYeon Hwang <syeon.hwang@samsung.com>2015-09-09 22:52:05 +0900
committerSeokYeon Hwang <syeon.hwang@samsung.com>2015-09-10 10:54:41 +0900
commitb0cdcf237a43e569d41035a33c8575be6115b432 (patch)
treef7f4f9baa01b28bfd3142f14966136cd828226db /package
parentb7c5f9c6d49d0409fcafd489de7e60e5b0e6adbe (diff)
downloadqemu-b0cdcf237a43e569d41035a33c8575be6115b432.tar.gz
qemu-b0cdcf237a43e569d41035a33c8575be6115b432.tar.bz2
qemu-b0cdcf237a43e569d41035a33c8575be6115b432.zip
dibs: prepared cross building on DIBS
Change-Id: I2e669d1fb8cc7507608bcd898ac5cde740ca872d Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Diffstat (limited to 'package')
-rw-r--r--package/build.common5
-rwxr-xr-xpackage/build.linux69
2 files changed, 50 insertions, 24 deletions
diff --git a/package/build.common b/package/build.common
index e8c2d77c4b..ed3240ec3f 100644
--- a/package/build.common
+++ b/package/build.common
@@ -5,14 +5,13 @@ build_common()
cd ${SRCDIR}/tizen
- PKG_CONFIG_PATH=${ROOTDIR}/lib/pkgconfig:${ROOTDIR}/remote/lib/pkgconfig:${ROOTDIR}/libav/lib/pkgconfig
+ PKG_CONFIG_PATH=${ROOTDIR}/lib/pkgconfig
PATH=${PATH}:${ROOTDIR}/bin
PKG_CONFIG_PATH=${PKG_CONFIG_PATH} ./emulator_configure.sh x86
make clean
- # FIXME: PKG_CONFIG_PATH is only for qt5_msg_box
- PATH=${PATH} PKG_CONFIG_PATH=${PKG_CONFIG_PATH} make all_dibs -j8
+ PATH=${PATH} make all_dibs -j8
make install_dibs
if [ $? -eq 0 ]
diff --git a/package/build.linux b/package/build.linux
index 343ac2121d..d43568dbba 100755
--- a/package/build.linux
+++ b/package/build.linux
@@ -10,42 +10,69 @@ prepare()
exit 1
fi
- REQUIRED_PKG="ant python zlib1g-dev libglib2.0-dev libsdl1.2-dev libasound2-dev \
- libx11-dev libv4l-dev libxcomposite-dev libpixman-1-dev libcurl4-gnutls-dev \
- libcap-dev libattr1-dev"
-
- echo "Checking required packages before compling!!"
- for pkg in ${REQUIRED_PKG}
- do
- dpkg -s ${pkg} > /dev/null
- if [ "x$?" = "x0" ]
- then
- echo "checking ${pkg} ... OK"
- else
- echo "checking ${pkg} ... failure"
- exit 1
- fi
- done
+ if [ "${TARGET_OS}" = "windows-32" ] || [ "${TARGET_OS}" = "windows-64" ]
+ then
+ # for Windows target (cross compiling)
+
+ # we should use cross compiler from mingw-x package
+ export PATH=/opt/mingw32/bin:$PATH
+ export CROSS_PREFIX=i686-w64-mingw32-
+
+ # correct pc's prefix since windows install script is not run
+ # on linux
+ PCs=$(find ${ROOTDIR}/lib/pkgconfig -name '*.pc')
+
+ for pc in ${PCs}; do
+ echo "${pc}"
+ LIB_DIR=${ROOTDIR}
+ sed -i '/LIBDIR=/d' ${pc}
+ sed -i '/^prefix=/!b;c\prefix=${LIBDIR}' ${pc}
+ sed -i "1s|^|LIBDIR=${LIB_DIR}\n|" ${pc}
+ done
+
+ # mingw-x doesn't have zlib, so we use our own.
+ export EXTRA_CFLAGS=-I${ROOTDIR}/include
+ export EXTRA_LDFLAGS=-L${ROOTDIR}/lib
+ else
+ # for linux target
+
+ REQUIRED_PKG="ant python zlib1g-dev libglib2.0-dev libsdl1.2-dev \
+ libasound2-dev libx11-dev libv4l-dev libxcomposite-dev \
+ libpixman-1-dev libcurl4-gnutls-dev libcap-dev libattr1-dev"
+
+ echo "Checking required packages before compling!!"
+ for pkg in ${REQUIRED_PKG}
+ do
+ dpkg -s ${pkg} > /dev/null
+ if [ "x$?" = "x0" ]
+ then
+ echo "checking ${pkg} ... OK"
+ else
+ echo "checking ${pkg} ... failure"
+ exit 1
+ fi
+ done
+ fi
}
# clean
clean()
{
- echo "nothing to do"
+ echo "nothing to do"
}
# build
build()
{
- . $SRCDIR/package/build.common
- build_common
+ . $SRCDIR/package/build.common
+ build_common
}
# install
install()
{
- . $SRCDIR/package/build.common
- install_common
+ . $SRCDIR/package/build.common
+ install_common
}
[ "$1" = "clean" ] && clean