Commit 8001f226 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Update instruction and Dockerfile to build android binary

parent 1c0fa46d
...@@ -65,9 +65,11 @@ RUN export CROSS_COMPILE=$TOOLCHAIN/bin/arm-linux-androideabi- && \ ...@@ -65,9 +65,11 @@ RUN export CROSS_COMPILE=$TOOLCHAIN/bin/arm-linux-androideabi- && \
make && make install_sw make && make install_sw
WORKDIR /root/build WORKDIR /root/build
RUN curl -L -O https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz RUN curl -L -O http://dist.schmorp.de/libev/libev-4.19.tar.gz
RUN tar xf libevent-2.0.21-stable.tar.gz RUN curl -L -O https://gist.github.com/tatsuhiro-t/48c45f08950f587180ed/raw/80a8f003b5d1091eae497c5995bbaa68096e739b/libev-4.19-android.patch
WORKDIR /root/build/libevent-2.0.21-stable RUN tar xf libev-4.19.tar.gz
WORKDIR /root/build/libev-4.19
RUN patch -p1 < ../libev-4.19-android.patch
RUN ./configure \ RUN ./configure \
--host=arm-linux-androideabi \ --host=arm-linux-androideabi \
--build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \ --build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
...@@ -94,6 +96,7 @@ RUN autoreconf -i && \ ...@@ -94,6 +96,7 @@ RUN autoreconf -i && \
LIBSPDYLAY_CFLAGS=-I$PREFIX/usr/local/include \ LIBSPDYLAY_CFLAGS=-I$PREFIX/usr/local/include \
LIBSPDYLAY_LIBS="-L$PREFIX/usr/local/lib -lspdylay" \ LIBSPDYLAY_LIBS="-L$PREFIX/usr/local/lib -lspdylay" \
CPPFLAGS="-I$PREFIX/include" \ CPPFLAGS="-I$PREFIX/include" \
CXXFLAGS="-fno-strict-aliasing" \
PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \ PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \
LDFLAGS="-L$PREFIX/lib" && \ LDFLAGS="-L$PREFIX/lib" && \
make && \ make && \
......
...@@ -29,7 +29,7 @@ are using x86_64 system. ...@@ -29,7 +29,7 @@ are using x86_64 system.
The platform level is not important here because we don't use Android The platform level is not important here because we don't use Android
specific C/C++ API. specific C/C++ API.
The dependent libraries, such as OpenSSL and libevent should be built The dependent libraries, such as OpenSSL and libev should be built
with the toolchain and installed under ``$ANDROID_HOME/usr/local``. with the toolchain and installed under ``$ANDROID_HOME/usr/local``.
We recommend to build these libraries as static library to make the We recommend to build these libraries as static library to make the
deployment easier. libxml2 support is currently disabled. deployment easier. libxml2 support is currently disabled.
...@@ -65,7 +65,10 @@ To configure OpenSSL, use the following script: ...@@ -65,7 +65,10 @@ To configure OpenSSL, use the following script:
And run ``make install`` to build and install. And run ``make install`` to build and install.
To configure libevent, use the following script: We cannot compile libev without modification. Apply `this patch
<https://gist.github.com/tatsuhiro-t/48c45f08950f587180ed>`_ before
configuring libev. This patch is for libev-4.19. After applying the
patch, to configure libev, use the following script:
.. code-block:: sh .. code-block:: sh
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment