diff options
author | Linus MÃ¥rtensson <linus.martensson@sonymobile.com> | 2013-05-08 14:10:07 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-06-17 17:21:56 +0200 |
commit | 5e4e8ec429381a8d1eebe31647e9daaaae42c54b (patch) | |
tree | c19748704e920881dcd48776a116539c21316bcf /common.gypi | |
parent | ffcd8b94c2111dcc72425ce0fbc48826ca8ba9ac (diff) | |
download | node-new-5e4e8ec429381a8d1eebe31647e9daaaae42c54b.tar.gz |
build: add android support
Resolves minor discrepancies between android and standard POSIX systems.
In addition, some configure parameters were added, and a helper-script
for android configuration. Ideally, this script should be merged into
the standard configure script.
To build for android, source the android-configure script with an NDK
path:
source ./android-configure ~/android-ndk-r8d
This will create an android standalone toolchain and export the
necessary environment parameters.
After that, build as normal:
make -j8
After the build, you should now have android-compatible NodeJS binaries.
Diffstat (limited to 'common.gypi')
-rw-r--r-- | common.gypi | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/common.gypi b/common.gypi index 3b08a7f8a3..043a267acb 100644 --- a/common.gypi +++ b/common.gypi @@ -161,10 +161,14 @@ 'BUILDING_UV_SHARED=1', ], }], - [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { - 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', '-pthread', ], + [ 'OS in "linux freebsd openbsd solaris"', { + 'cflags': [ '-pthread', ], + 'ldflags': [ '-pthread' ], + }], + [ 'OS in "linux freebsd openbsd solaris android"', { + 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ], - 'ldflags': [ '-pthread', '-rdynamic' ], + 'ldflags': [ '-rdynamic' ], 'target_conditions': [ ['_type=="static_library"', { 'standalone_static_library': 1, # disable thin archive which needs binutils >= 2.19 @@ -187,6 +191,10 @@ }], ], }], + [ 'OS=="android"', { + 'defines': ['_GLIBCXX_USE_C99_MATH'], + 'libraries': [ '-llog' ], + }], ['OS=="mac"', { 'defines': ['_DARWIN_USE_64_BIT_INODE=1'], 'xcode_settings': { |