forked from Unity-Technologies/mono
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_runtime_tizen.sh
executable file
·63 lines (44 loc) · 1.79 KB
/
build_runtime_tizen.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
#!/bin/bash
PREFIX="$PWD/builds/tizen"
BUILDDIR=/$PWD
OUTDIR=builds/embedruntimes/tizen
perl PrepareTizenNDK.pl -ndk=2.2.0 -env=envsetup.sh && source envsetup.sh && source ${TIZEN_NDK_ROOT}/tizen-ndk-env.sh
CXXFLAGS="-Os -DHAVE_ARMV6=1 -DARM_FPU_VFP=1 -D__ARM_EABI__ -mno-thumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a9 -ffunction-sections -fdata-sections -fno-strict-aliasing -fPIC "
CFLAGS="$CXXFLAGS"
TIZEN_PREFIX=${TIZEN_SDK}/tools/arm-linux-gnueabi-gcc-4.5/bin/arm-linux-gnueabi-
CC="${TIZEN_PREFIX}gcc --sysroot=${TIZEN_SDK}/platforms/${TIZEN_PLATFORM}/rootstraps/${TIZEN_ROOTSTRAP} -I${TIZEN_SDK}/platforms/${TIZEN_PLATFORM}/rootstraps/${TIZEN_ROOTSTRAP}/usr/include -DTIZEN"
CXX="${TIZEN_PREFIX}g++ --sysroot=${TIZEN_SDK}/platforms/${TIZEN_PLATFORM}/rootstraps/${TIZEN_ROOTSTRAP} -I${TIZEN_SDK}/platforms/${TIZEN_PLATFORM}/rootstraps/${TIZEN_ROOTSTRAP}/usr/include -DTIZEN"
AR="${TIZEN_PREFIX}ar"
LD="${TIZEN_PREFIX}ld"
CONFIG_OPTS="\
--prefix=$PREFIX \
--with-sysroot=${TIZEN_SDK}/platforms/${TIZEN_PLATFORM}/rootstraps/${TIZEN_ROOTSTRAP} \
--cache-file=tizen_cross.cache \
--host=arm-linux-gnueabi \
--disable-mcs-build \
--disable-parallel-mark \
--disable-shared-handles \
--with-sigaltstack=no \
--with-tls=pthread \
--with-glib=embedded \
--disable-nls \
mono_cv_uscore=yes"
LDFLAGS=""
make clean && make distclean
rm tizen_cross.cache
pushd eglib
autoreconf -i
popd
autoreconf -i
# Run configure
./configure $CONFIG_OPTS CFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" CC="$CC" CXX="$CXX" AR="$AR" LD="$LD"
# Run Make
make -j6 && echo "Build SUCCESS!" || exit 1
rm -rf $PWD/builds
mkdir -p $OUTDIR
cp -f mono/mini/.libs/libmono.a $OUTDIR
# Clean up for next build
make clean && make distclean
if [ -d builds/monodistribution ] ; then
rm -r builds/monodistribution
fi