forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Android.mk
72 lines (57 loc) · 2.36 KB
/
Android.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
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
LOCAL_PATH := $(call my-dir)
# Don't strip debug builds
ifeq ($(APP_OPTIM),debug)
cmd-strip :=
endif
include $(CLEAR_VARS)
# Include . in the header search path for all source files in this module.
LOCAL_C_INCLUDES := $(LOCAL_PATH)
# Include ./../../ in the header search path for modules that depend on
# reactnativejni. This will allow external modules to require this module's
# headers using #include <react/jni/<header>.h>, assuming:
# . == jni
# ./../ == react
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../..
LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture
LOCAL_LDLIBS += -landroid
# The dynamic libraries (.so files) that this module depends on.
LOCAL_SHARED_LIBRARIES := libfolly_json libfb libjsc libglog_init libyoga
# The static libraries (.a files) that this module depends on.
LOCAL_STATIC_LIBRARIES := libreactnative
# Name of this module.
#
# Other modules can depend on this one by adding libreactnativejni to their
# LOCAL_SHARED_LIBRARIES variable.
LOCAL_MODULE := reactnativejni
# Compile all local c++ files.
LOCAL_SRC_FILES := $(wildcard *.cpp)
# Build the files in this directory as a shared library
include $(BUILD_SHARED_LIBRARY)
# Compile the c++ dependencies required for ReactAndroid
#
# How does the import-module function work?
# For each $(call import-module,<module-dir>), you search the directories in
# NDK_MODULE_PATH. (This variable is defined in Application.mk). If you find a
# <module-dir>/Android.mk you in a directory <dir>, you run:
# include <dir>/<module-dir>/Android.mk
#
# What does it mean to include an Android.mk file?
# Whenever you encounter an include <dir>/<module-dir>/Android.mk, you
# tell andorid-ndk to compile the module in <dir>/<module-dir> according
# to the specification inside <dir>/<module-dir>/Android.mk.
$(call import-module,folly)
$(call import-module,fb)
$(call import-module,jsc)
$(call import-module,fbgloginit)
$(call import-module,yogajni)
$(call import-module,cxxreact)
$(call import-module,jsi)
$(call import-module,jsiexecutor)
# TODO(ramanpreet):
# Why doesn't this import-module call generate a jscexecutor.so file?
# $(call import-module,jscexecutor)
include $(REACT_SRC_DIR)/jscexecutor/Android.mk