-
Notifications
You must be signed in to change notification settings - Fork 2
/
buildemotion.sh
executable file
·108 lines (88 loc) · 2.99 KB
/
buildemotion.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/bin/bash
SCRIPT=$(readlink -f "$0")
PROJECTPATH=$(dirname "$SCRIPT")
if [ "$BUILDCOMMONDONE" != 1 ]; then
source ${PROJECTPATH}/buildcommon
fi
#########################
# FETCH EMOTION SOURCES #
#########################
if [ ! -d "${PROJECTPATH}/emotion" ]; then
echo -e "\e[1m\e[32mEMOTION source not found, cloning\e[0m"
git clone http://code.videolan.org/videolan/tizen_emotion.git "${PROJECTPATH}/emotion"
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 \
--enable-static \
--disable-shared \
"
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 #
#############
if [ "$RELEASE" = 1 ]; then
EMOTION_BUILD_DIR=${PROJECTPATH}/emotion/build-tizen-${TARGET_TUPLE}-release
else
EMOTION_BUILD_DIR=${PROJECTPATH}/emotion/build-tizen-${TARGET_TUPLE}
fi
EMOTION_PREFIX=${EMOTION_BUILD_DIR}/prefix
mkdir -p ${EMOTION_PREFIX}
cd ${EMOTION_BUILD_DIR}
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" \
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" \
LIBVLC_CFLAGS="-I${PROJECTPATH}/vlc/include" \
LIBVLC_LIBS="-L${PROJECTPATH}/lib -lvlc" \
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 \
${LIBVLC_CFLAGS}" \
EMOTION_LIBS="-L${TIZEN_LIBS} -lecore -levas -leet -leina -lpthread -ltbm ${LIBVLC_LIBS}" \
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"
cp -a ${EMOTION_PREFIX}/lib/libemotion.a ${PROJECTPATH}/lib
cd ../../