Coder Social home page Coder Social logo

putiancaijunyu / boost_for_android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from teamarkstudio/boost_for_android

0.0 2.0 0.0 48.96 MB

boost pre-build binaries for android & build steps

C++ 99.81% C 0.18% Perl 0.01% M4 0.01% Batchfile 0.01% Shell 0.01%

boost_for_android's Introduction

######This is a simple tutorial for building boost on android platform. if you dont like pre-build binaries, do following steps:

  1. prepare environment, make sure cygwin is installed if you work on windows.
  2. execute ./bootstrap.sh to generate compile tools.
  3. edit project-config.jam or user-config.jam, add following lines, you can change building libs or compiler flags as your wish.
  4. execute ./b2 toolset=gcc-android4.9 link=static threading=multi target-os=linux --stagedir=android, or replace args for your own.
# define platform name of ndk
import os ;
if [ os.name ] = CYGWIN || [ os.name ] = NT 
{  
    androidPlatform = windows-x86_64 ;  
}  
else if [ os.name ] = LINUX 
{  
    androidPlatform = linux-x86_64 ;  
}  
else if [ os.name ] = MACOSX 
{  
    androidPlatform = darwin-x86 ;  
}

# replace with your own path
ANDROID_NDK = "D:/NVPACK/android-ndk-r12b" ;

# compile with gcc, you can change compiler to clang or others
using gcc : android4.9 : $(ANDROID_NDK)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(androidPlatform)/bin/arm-linux-androideabi-g++ :  
<archiver>$(ANDROID_NDK)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(androidPlatform)/bin/arm-linux-androideabi-ar  
<ranlib>$(ANDROID_NDK)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(androidPlatform)/bin/arm-linux-androideabi-ranlib  
<compileflags>-I$(ANDROID_NDK)/platforms/android-19/arch-arm/usr/include 
<compileflags>-I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/4.9/include
<compileflags>-I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/4.9/include/backward
<compileflags>-I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include  
<compileflags>-fexceptions
<compileflags>-frtti
<compileflags>-fpic
<compileflags>-ffunction-sections
<compileflags>-funwind-tables
<compileflags>-D__ARM_ARCH_5__
<compileflags>-D__ARM_ARCH_5T__
<compileflags>-D__ARM_ARCH_5E__
<compileflags>-D__ARM_ARCH_5TE__
<compileflags>-D__ARM_ARCH_7__
<compileflags>-D__ARM_ARCH_7A__
<compileflags>-Wno-psabi
<compileflags>-march=armv7-a
<compileflags>-mtune=xscale
<compileflags>-mfloat-abi=softfp
<compileflags>-marm
<compileflags>-mthumb
<compileflags>-Os
<compileflags>-std=gnu++11
<compileflags>-fomit-frame-pointer
<compileflags>-fno-strict-aliasing
<compileflags>-finline-limit=64
<compileflags>-Wa,--noexecstack
<compileflags>-DANDROID
<compileflags>-D__ANDROID__
<compileflags>-D__ARM_EABI__
<compileflags>-DNDEBUG
<compileflags>-O2
<compileflags>-g
;  

# project default compiler
project : default-build <toolset>gcc-android4.9 ;

# replace with libraries you wanna to build
libraries = --with-container --with-coroutine --with-coroutine2 --with-fiber --with-graph --with-graph_parallel --with-log --with-metaparse --with-python --with-test --with-type_erasure --with-atomic --with-date_time --with-program_options --with-chrono --with-context --with-iostreams --with-locale --with-mpi --with-serialization --with-signals --with-timer --with-wave --with-math --with-random --with-exception --with-filesystem --with-thread --with-system --with-regex --with-program_options ;

boost_for_android's People

Contributors

teamarkstudio avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.