Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 918d33a

Browse filesBrowse files
robertchirasMyles Borins
authored andcommitted
build: add script to create Android .mk files
The create_android_makefiles script will create .mk files for node and all of its dependencies ready to be build using Android build system. Signed-off-by: Robert Chiras <robert.chiras@intel.com> PR-URL: #5544 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent 4ad7184 commit 918d33a
Copy full SHA for 918d33a

File tree

Expand file treeCollapse file tree

1 file changed

+46
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+46
-0
lines changed
Open diff view settings
Collapse file

‎tools/create_android_makefiles‎

Copy file name to clipboard
+46Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/bash
2+
# Run this script ONLY inside an Android build system
3+
# and after you ran lunch command!
4+
5+
if [ -z "$ANDROID_BUILD_TOP" ]; then
6+
echo "Run lunch before running this script!"
7+
exit 1
8+
fi
9+
10+
if [ -z "$1" ]; then
11+
ARCH="arm"
12+
else
13+
ARCH="$1"
14+
fi
15+
16+
if [ $ARCH = "x86" ]; then
17+
TARGET_ARCH="ia32"
18+
else
19+
TARGET_ARCH="$ARCH"
20+
fi
21+
22+
cd $(dirname $0)/..
23+
24+
./configure \
25+
--without-snapshot \
26+
--openssl-no-asm \
27+
--dest-cpu=$TARGET_ARCH \
28+
--dest-os=android
29+
30+
export GYP_GENERATORS="android"
31+
export GYP_GENERATOR_FLAGS="limit_to_target_all=true"
32+
GYP_DEFINES="target_arch=$TARGET_ARCH"
33+
GYP_DEFINES+=" v8_target_arch=$TARGET_ARCH"
34+
GYP_DEFINES+=" android_target_arch=$ARCH"
35+
GYP_DEFINES+=" host_os=linux OS=android"
36+
export GYP_DEFINES
37+
38+
./deps/npm/node_modules/node-gyp/gyp/gyp \
39+
-Icommon.gypi \
40+
-Iconfig.gypi \
41+
--depth=. \
42+
-Dcomponent=static_library \
43+
-Dlibrary=static_library \
44+
node.gyp
45+
46+
echo -e "LOCAL_PATH := \$(call my-dir)\n\ninclude \$(LOCAL_PATH)/GypAndroid.mk" > Android.mk

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.