buildemotion.sh 2.83 KB
Newer Older
Thomas Guillem's avatar
Thomas Guillem committed
1 2 3 4
#!/bin/bash

SCRIPT=$(readlink -f "$0")
PROJECTPATH=$(dirname "$SCRIPT")
5
source ${PROJECTPATH}/buildcommon
Thomas Guillem's avatar
Thomas Guillem committed
6 7 8 9 10 11 12

#########################
# FETCH EMOTION SOURCES #
#########################

if [ ! -d "${PROJECTPATH}/emotion" ]; then
    echo -e "\e[1m\e[32mEMOTION source not found, cloning\e[0m"
13
    git clone http://code.videolan.org/videolan/tizen_emotion.git "${PROJECTPATH}/emotion"
Thomas Guillem's avatar
Thomas Guillem committed
14 15 16 17 18 19 20 21 22 23 24 25 26
    checkfail "emotion source: git clone failed"
fi

###############################
# EMOTION CONFIGURE ARGUMENTS #
###############################
EMOTION_CONFIGURE_ARGS="\
    --enable-libvlc=static \
    --disable-emotion-test \
    --disable-doc \
    --disable-xine \
    --disable-generic \
    --disable-gstreamer \
27 28
    --enable-static \
    --disable-shared \
Thomas Guillem's avatar
Thomas Guillem committed
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
"

echo -e "\e[1m\e[36mCFLAGS:            ${CFLAGS}\e[0m"
echo -e "\e[1m\e[36mEXTRA_CFLAGS:      ${EXTRA_CFLAGS}\e[0m"

###########################
# Build buildsystem tools #
###########################

cd ${PROJECTPATH}/emotion

#############
# BOOTSTRAP #
#############

if [ ! -f configure ]; then
    echo -e "\e[1m\e[32mBootstraping\e[0m"
    NOCONFIGURE=1 ./autogen.sh
    checkfail "emotion: bootstrap failed"
fi

#############
# CONFIGURE #
#############

54 55 56 57 58
EMOTION_BUILD_DIR=${PROJECTPATH}/emotion/build-tizen-${TARGET_TUPLE}
EMOTION_PREFIX=${EMOTION_BUILD_DIR}/prefix
mkdir -p ${EMOTION_PREFIX}

cd ${EMOTION_BUILD_DIR}
Thomas Guillem's avatar
Thomas Guillem committed
59 60 61 62 63 64 65 66 67 68 69 70

if [ ! -e ./config.h -o "$RELEASE" = 1 ]; then
CPPFLAGS="$CPPFLAGS" \
CFLAGS="$CFLAGS ${EXTRA_CFLAGS}" \
CXXFLAGS="$CFLAGS ${EXTRA_CXXFLAGS}" \
LDFLAGS="$LDFLAGS" \
CC="${CROSS_COMPILE}gcc -fPIC --sysroot=${SYSROOT}" \
CXX="${CROSS_COMPILE}g++ -fPIC --sysroot=${SYSROOT} -D__cpp_static_assert=200410" \
NM="${CROSS_COMPILE}nm" \
STRIP="${CROSS_COMPILE}strip" \
RANLIB="${CROSS_COMPILE}ranlib" \
AR="${CROSS_COMPILE}ar" \
71 72 73 74 75 76
ECORE_X_CFLAGS="-I${TIZEN_INCLUDES}/ecore-1" \
ECORE_X_LIBS="-L${TIZEN_LIBS} -lecore_x" \
ECORE_FB_CFLAGS="-I${TIZEN_INCLUDES}/ecore-1" \
ECORE_FB_LIBS="-L${TIZEN_LIBS} -lecore_fb" \
EDJE_EXTERNAL_CFLAGS="-I${TIZEN_INCLUDES}/edje-1" \
EDJE_EXTERNAL_LIBS="-L${TIZEN_LIBS} -ledje" \
Thomas Guillem's avatar
Thomas Guillem committed
77 78
LIBVLC_CFLAGS="-I${PROJECTPATH}/vlc/include" \
LIBVLC_LIBS="-L${PROJECTPATH}/lib -lvlc" \
79 80
EMOTION_CFLAGS="-I${TIZEN_INCLUDES}/ecore-1 -I${TIZEN_INCLUDES}/evas-1 \
-I${TIZEN_INCLUDES}/eet-1 -I${TIZEN_INCLUDES}/eina-1 -I${TIZEN_INCLUDES}/eina-1/eina \
Thomas Guillem's avatar
Thomas Guillem committed
81
${LIBVLC_CFLAGS}" \
82
EMOTION_LIBS="-L${TIZEN_LIBS} -lecore -levas -leet -leina -lpthread -ltbm ${LIBVLC_LIBS}" \
Thomas Guillem's avatar
Thomas Guillem committed
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
sh ../configure --host=$TARGET_TUPLE --build=x86_64-unknown-linux \
                ${EXTRA_PARAMS} ${EMOTION_CONFIGURE_ARGS} ${OPTS} \
                --prefix=${EMOTION_PREFIX}
checkfail "emotion: configure failed"
fi

############
# BUILDING #
############

echo -e "\e[1m\e[32mBuilding libemotion\e[0m"
make $MAKEFLAGS -C src install

checkfail "emotion: make failed"

98
cp -a ${EMOTION_PREFIX}/lib/libemotion.a ${PROJECTPATH}/lib
Thomas Guillem's avatar
Thomas Guillem committed
99 100

cd ../../