diff options
author | arseny.kapoulkine@gmail.com <arseny.kapoulkine@gmail.com@99668b35-9821-0410-8761-19e4c4f06640> | 2012-03-06 08:50:21 +0000 |
---|---|---|
committer | arseny.kapoulkine@gmail.com <arseny.kapoulkine@gmail.com@99668b35-9821-0410-8761-19e4c4f06640> | 2012-03-06 08:50:21 +0000 |
commit | 7d57b320ade1ebaf6f564419c71bd4774128cded (patch) | |
tree | c3d736edecbd00db4ec3b7bd2de7a2e70d2a512f | |
parent | 04629118dbde33fdedfe489119f34912f8e7c124 (diff) |
Android build support
git-svn-id: http://pugixml.googlecode.com/svn/trunk@847 99668b35-9821-0410-8761-19e4c4f06640
-rw-r--r-- | Jamrules.jam | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/Jamrules.jam b/Jamrules.jam index 5532181..96e6367 100644 --- a/Jamrules.jam +++ b/Jamrules.jam @@ -6,6 +6,10 @@ if ( $(toolset:I=^mingw) || $(toolset:I=^gcc) || $(toolset:I=^bada) || $(toolset { GCCPATH = "" ; } + else if ( $(toolset:I=^android) ) + { + GCCPATH = "%$(toolset)_PATH%\\toolchains\\arm-linux-androideabi-4.4.3\\prebuilt\\windows\\bin\\arm-linux-androideabi-" ; + } else if ( $(toolset:I=^bada) ) { GCCPATH = "%$(toolset)_PATH%\\Tools\\Toolchains\\ARM\\bin\\arm-bada-eabi-" ; @@ -14,10 +18,6 @@ if ( $(toolset:I=^mingw) || $(toolset:I=^gcc) || $(toolset:I=^bada) || $(toolset { GCCPATH = "%$(toolset)_PATH%\\host\\win32\\x86\\usr\\bin\\ntoarmv7-" ; } - else if ( $(toolset:I=^android) ) - { - GCCPATH = "%$(toolset)_PATH%\\bin\\arm-linux-androideabi-" ; - } else { GCCPATH = "%$(toolset)_PATH%\\bin\\" ; @@ -31,6 +31,25 @@ if ( $(toolset:I=^mingw) || $(toolset:I=^gcc) || $(toolset:I=^bada) || $(toolset { LDFLAGS += -lstdc++ -lsupc++-xnew -lc ; } + else if ( $(toolset:I=^android) ) + { + LDFLAGS += -nostdlib ; + LDFLAGS += -L"%$(toolset)_PATH%\\platforms\\android-5\\arch-arm\\usr\\lib" ; + + if ( $(toolset:I=stlport) ) + { + LDFLAGS += -L"%$(toolset)_PATH%\\sources\\cxx-stl\\stlport\\libs\\armeabi-v7a" ; + LDFLAGS += -lstlport_static ; + } + else + { + LDFLAGS += -L"%$(toolset)_PATH%\\sources\\cxx-stl\\gnu-libstdc++\\libs\\armeabi-v7a" ; + LDFLAGS += -lgnustl_static -lsupc++ ; + } + + LDFLAGS += "%$(toolset)_PATH%\\platforms\\android-5\\arch-arm\\usr\\lib\\crtbegin_dynamic.o" ; + LDFLAGS += -lstdc++ -lc -lm -lgcc ; + } else if ( $(OS) = NT || $(OS) = FREEBSD ) { LDFLAGS += -static-libgcc -static ; @@ -99,6 +118,25 @@ if ( $(toolset:I=^mingw) || $(toolset:I=^gcc) || $(toolset:I=^bada) || $(toolset RESULT += -fno-exceptions ; } + if ( $(toolset:I=^android) ) + { + RESULT += -DANDROID ; + RESULT += -mfloat-abi=softfp ; + + if ( $(toolset:I=stlport) ) + { + RESULT += -isystem"%$(toolset)_path%/sources/cxx-stl/stlport/stlport" ; + RESULT += -isystem"%$(toolset)_path%/sources/cxx-stl/system/include" ; + } + else + { + RESULT += -isystem"%$(toolset)_path%/sources/cxx-stl/gnu-libstdc++/include" ; + RESULT += -isystem"%$(toolset)_path%/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include" ; + } + + RESULT += -isystem"%$(toolset)_path%/platforms/android-5/arch-arm/usr/include" ; + } + RESULT += $(ARCH) ; return $(RESULT) ; @@ -721,7 +759,7 @@ if ( $(UNIX) ) } else { - if ( $(toolset:I=(^xbox360|^ps3|wince|^bada|^blackberry$)) ) + if ( $(toolset:I=(^xbox360|^ps3|wince|^android|^bada|^blackberry$)) ) { RUNRESULT = "skiprun" ; |