下载zeromq
http://download.zeromq.org/zeromq-3.2.4.tar.gz
下载jzmq
https://github.com/zeromq/jzmq/archive/v3.1.0.tar.gz
操作系统使用ubuntu14.04-i386
cd /zeromq
wget http://dl.google.com/android/ndk/android-ndk-r9-linux-x86.tar.bz2
tar xvfj android-ndk-r9-linux-x86.tar.bz2
sudo ./android-ndk-r9/build/tools/make-standalone-toolchain.sh --install-dir=/opt/android-toolchain
export PATH=/opt/android-toolchain/bin:$PATH
export OUTPUT_DIR=/zeromq/zeromq-android
cd zeromq-3.2.4/
sudo apt-get install autoconf
sudo apt-get install libtool
./autogen.sh
./configure --enable-static --disable-shared --host=arm-linux-androideabi --prefix=$OUTPUT_DIR LDFLAGS="-L$OUTPUT_DIR/lib" CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" LIBS="-lgcc"
make
make install
cd ..
cd jzmq-3.1.0/
./autogen.sh
sudo apt-get install default-jdk
./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" LDFLAGS="-L$OUTPUT_DIR/lib" --disable-version
make
make install