forked from nodejs/node-v0.x-archive
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathAndroid.common.mk
110 lines (96 loc) · 2.24 KB
/
Android.common.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
ifndef NODE_PREFIX
NODE_PREFIX := $(LOCAL_PATH)
endif
include $(CLEAR_VARS)
intermediates := $(LOCAL_PATH)/out/$(APP_OPTIM)
include $(LOCAL_PATH)/Android.jsnatives.mk
$(LOCAL_PATH)/src/node_javascript.cc : $(jsnatives)
LOCAL_MODULE := node
LOCAL_CPP_EXTENSION := .cc
LOCAL_C_INCLUDES += \
$(intermediates)/src \
$(LOCAL_PATH)/src
LOCAL_SRC_FILES := \
src/node.cc \
src/node_buffer.cc \
src/node_constants.cc \
src/node_crypto.cc \
src/node_dtrace.cc \
src/node_extensions.cc \
src/node_file.cc \
src/node_http_parser.cc \
src/node_io_watcher.cc \
src/node_javascript.cc \
src/node_main.cc \
src/node_os.cc \
src/node_script.cc \
src/node_signal_watcher.cc \
src/node_stat_watcher.cc \
src/node_string.cc \
src/node_zlib.cc \
src/cares_wrap.cc \
src/fs_event_wrap.cc \
src/handle_wrap.cc \
src/pipe_wrap.cc \
src/process_wrap.cc \
src/stream_wrap.cc \
src/tcp_wrap.cc \
src/timer_wrap.cc \
src/tty_wrap.cc \
src/udp_wrap.cc \
src/v8_typed_array.cc \
src/platform_android.cc
LOCAL_SHARED_LIBRARIES += \
crypto \
ssl
LOCAL_STATIC_LIBRARIES := \
http_parser \
uv \
v8 \
pty
# debug
ifeq ($(debug),true)
LOCAL_CFLAGS += \
-DDEBUG \
-g \
-O0 \
-Wall \
-Wextra
endif
# common flags
LOCAL_CFLAGS += \
-D__POSIX__ \
-DX_STACKSIZE=65536 \
-D_LARGEFILE_SOURCE \
-D_FILE_OFFSET_BITS=64 \
-DHAVE_FDATASYNC=1 \
-DHAVE_MONOTONIC_CLOCK \
-D_FORTIFY_SOURCE=2 \
-DPLATFORM=\"android\" \
-DARCH=\"arch-arm\" \
-Wno-unused-parameter
# node
LOCAL_CFLAGS += \
-DHAVE_OPENSSL \
-DNODE_CFLAGS=\"\" \
-DNODE_PREFIX=\"$(NODE_PREFIX)\" \
-DNODE_FORK_ISOLATE \
-include sys/select.h
# ev
LOCAL_CFLAGS += \
-DEV_FORK_ENABLE=0 \
-DEV_EMBED_ENABLE=0