@@ -11,7 +11,7 @@ NDK=`which ndk-build`
11
11
NDK=` dirname $NDK `
12
12
NDK=` readlink -f $NDK `
13
13
14
- for ARCH in armeabi armeabi-v7a; do
14
+ for ARCH in armeabi armeabi-v7a x86 mips ; do
15
15
16
16
cd $BUILDDIR
17
17
mkdir -p $ARCH
@@ -25,7 +25,7 @@ cd android_support
25
25
ln -sf $NDK /sources/android/support jni
26
26
27
27
ndk-build -j$NCPU APP_ABI=$ARCH || exit 1
28
- ln -sf android_support/ obj/local/$ARCH /libandroid_support.a ../
28
+ cp -f obj/local/$ARCH /libandroid_support.a ../
29
29
30
30
} || exit 1
31
31
@@ -35,81 +35,91 @@ cd $BUILDDIR/$ARCH
35
35
36
36
[ -e libiconv.so ] || {
37
37
38
- [ -d libiconv-1.14 ] || curl http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz | tar xvz || exit 1
38
+ [ -d libiconv-1.14 ] || curl http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz | tar xvz || exit 1
39
39
40
- cd libiconv-1.14
40
+ cd libiconv-1.14
41
41
42
- cp -f $BUILDDIR /config.sub build-aux/
43
- cp -f $BUILDDIR /config.guess build-aux/
44
- cp -f $BUILDDIR /config.sub libcharset/build-aux/
45
- cp -f $BUILDDIR /config.guess libcharset/build-aux/
42
+ cp -f $BUILDDIR /config.sub build-aux/
43
+ cp -f $BUILDDIR /config.guess build-aux/
44
+ cp -f $BUILDDIR /config.sub libcharset/build-aux/
45
+ cp -f $BUILDDIR /config.guess libcharset/build-aux/
46
46
47
- env CFLAGS=" -I$NDK /sources/android/support/include" \
48
- LDFLAGS=" -L$BUILDDIR /$ARCH -landroid_support" \
49
- $BUILDDIR /setCrossEnvironment-$ARCH .sh \
50
- ./configure \
51
- --host=arm-linux-androideabi \
52
- --prefix=` pwd` /.. \
53
- --enable-static --enable-shared \
54
- || exit 1
47
+ env CFLAGS=" -I$NDK /sources/android/support/include" \
48
+ LDFLAGS=" -L$BUILDDIR /$ARCH -landroid_support" \
49
+ $BUILDDIR /setCrossEnvironment-$ARCH .sh \
50
+ ./configure \
51
+ --host=arm-linux-androideabi \
52
+ --prefix=` pwd` /.. \
53
+ --enable-static --enable-shared \
54
+ || exit 1
55
55
56
- env PATH=` pwd` :$PATH \
57
- $BUILDDIR /setCrossEnvironment-$ARCH .sh \
58
- make -j$NCPU V=1 || exit 1
56
+ env PATH=` pwd` :$PATH \
57
+ $BUILDDIR /setCrossEnvironment-$ARCH .sh \
58
+ make -j$NCPU V=1 || exit 1
59
59
60
- env PATH=` pwd` :$PATH \
61
- $BUILDDIR /setCrossEnvironment-$ARCH .sh \
62
- make V=1 install || exit 1
60
+ env PATH=` pwd` :$PATH \
61
+ $BUILDDIR /setCrossEnvironment-$ARCH .sh \
62
+ make V=1 install || exit 1
63
63
64
- ln -sf lib/libiconv.so ../
65
- ln -sf lib/libcharset.so ../
64
+ cd ..
65
+
66
+ for f in libiconv libcharset; do
67
+ cp -f lib/$f .so ./
68
+ $BUILDDIR /setCrossEnvironment-$ARCH .sh \
69
+ sh -c ' $STRIP' " $f .so"
70
+ done
66
71
67
72
} || exit 1
68
73
69
74
cd $BUILDDIR /$ARCH
70
75
71
- # =========== libicu.so ===========
72
-
73
- [ -e libicudata.so ] || {
74
-
75
- [ -d icu ] || curl http://download.icu-project.org/files/icu4c/52.1/icu4c-52_1-src.tgz | tar xvz || exit 1
76
-
77
- cd icu/source
78
-
79
- cp -f $BUILDDIR /config.sub .
80
- cp -f $BUILDDIR /config.guess .
81
-
82
- [ -d cross ] || {
83
- mkdir cross
84
- cd cross
85
- ../configure || exit 1
86
- make -j$NCPU VERBOSE=1 || exit 1
87
- cd ..
88
- } || exit 1
89
-
90
- env CFLAGS=" -I$NDK /sources/android/support/include -frtti -fexceptions" \
91
- LDFLAGS=" -frtti -fexceptions" \
92
- LIBS=" -L$BUILDDIR /$ARCH -landroid_support -lgnustl_static -lstdc++" \
93
- $BUILDDIR /setCrossEnvironment-$ARCH .sh \
94
- ./configure \
95
- --host=arm-linux-androideabi \
96
- --prefix=` pwd` /../.. \
97
- --with-cross-build=` pwd` /cross \
98
- --enable-static --enable-shared \
99
- || exit 1
100
-
101
- env PATH=` pwd` :$PATH \
102
- $BUILDDIR /setCrossEnvironment-$ARCH .sh \
103
- make -j$NCPU VERBOSE=1 || exit 1
104
-
105
- env PATH=` pwd` :$PATH \
106
- $BUILDDIR /setCrossEnvironment-$ARCH .sh \
107
- make V=1 install || exit 1
108
-
109
- for f in libicudata libicui18n libicuio libicule libiculx libicutest libicutu libicuuc; do
110
- ln -sf lib/$f .so ../../
111
- ln -sf lib/$f .a ../../
112
- done
76
+ # =========== libicuXX.so ===========
77
+
78
+ [ -e libicuuc.so ] || {
79
+
80
+ [ -d icu ] || curl http://download.icu-project.org/files/icu4c/52.1/icu4c-52_1-src.tgz | tar xvz || exit 1
81
+
82
+ cd icu/source
83
+
84
+ cp -f $BUILDDIR /config.sub .
85
+ cp -f $BUILDDIR /config.guess .
86
+
87
+ [ -d cross ] || {
88
+ mkdir cross
89
+ cd cross
90
+ ../configure || exit 1
91
+ make -j$NCPU VERBOSE=1 || exit 1
92
+ cd ..
93
+ } || exit 1
94
+
95
+ env CFLAGS=" -I$NDK /sources/android/support/include -frtti -fexceptions" \
96
+ LDFLAGS=" -frtti -fexceptions" \
97
+ LIBS=" -L$BUILDDIR /$ARCH -landroid_support -lgnustl_static -lstdc++" \
98
+ $BUILDDIR /setCrossEnvironment-$ARCH .sh \
99
+ ./configure \
100
+ --host=arm-linux-androideabi \
101
+ --prefix=` pwd` /../../ \
102
+ --with-cross-build=` pwd` /cross \
103
+ --enable-static --enable-shared \
104
+ --with-data-packaging=archive \
105
+ || exit 1
106
+
107
+ env PATH=` pwd` :$PATH \
108
+ $BUILDDIR /setCrossEnvironment-$ARCH .sh \
109
+ make -j$NCPU VERBOSE=1 || exit 1
110
+
111
+ env PATH=` pwd` :$PATH \
112
+ $BUILDDIR /setCrossEnvironment-$ARCH .sh \
113
+ make V=1 install || exit 1
114
+
115
+ # cp -f -a share ../../
116
+
117
+ for f in libicudata libicui18n libicuio libicule libiculx libicutu libicuuc; do
118
+ cp -f lib/$f .so ../../
119
+ cp -f lib/$f .a ../../
120
+ $BUILDDIR /setCrossEnvironment-$ARCH .sh \
121
+ sh -c ' $STRIP' " ../../$f .so"
122
+ done
113
123
114
124
} || exit 1
115
125
0 commit comments