blob: 66133a302efa28e140b7d241c1bd0db820106ba7 [file] [log] [blame]
Lev Rumyantsev0ea3b6f2020-06-25 13:13:53 -07001#
2# Copyright 2020 The Android Open-Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17#
18# This makefile exports
19#
20# NATIVE_BRIDGE_PRODUCT_PACKAGES: Add this to PRODUCT_PACKAGES for your project to facilitate
21# native bridge support.
22#
23# NATIVE_BRIDGE_MODIFIED_GUEST_LIBS: List of modified guest libraries that require host counterpart.
24#
25
26NATIVE_BRIDGE_PRODUCT_PACKAGES := \
27 libnative_bridge_vdso.native_bridge \
28 native_bridge_guest_app_process.native_bridge \
29 native_bridge_guest_linker.native_bridge
30
31# Original guest libraries.
32NATIVE_BRIDGE_ORIG_GUEST_LIBS := \
33 libcompiler_rt \
34 libcrypto \
35 libcutils \
36 libdl.bootstrap \
37 libdl_android.bootstrap \
38 liblog \
39 libm.bootstrap \
40 libsqlite \
41 libssl \
42 libstdc++ \
43 libsync \
44 libutils \
45 libz
46
47# TODO(b/141167717): hack to make libandroidicu compatible with APEX.
48#
49# If library is APEX-enabled:
50#
51# Then "libraryname" is not installed in the /system/lib since it's
52# supposed to be installed into APEX.
53#
54# However, "libraryname.bootstrap" goes into /system/lib/bootstrap.
55#
56# Native bridge isn't compatible with APEX yet thus "libraryname.native_bridge"
57# is not installed anywhere at all.
58#
59# However, "libraryname.bootstrap.native_bridge" gets installed into
60# /system/lib/$GUEST_ARCH/ - as we need for native bridge.
61#
62# Note: this doesn't affect native libraries at all.
63NATIVE_BRIDGE_ORIG_GUEST_LIBS += \
64 libandroidicu.bootstrap
65
66# TODO(b/137072946): enable to build renderscript!
67#
68#NATIVE_BRIDGE_PRODUCT_PACKAGES += \
69# libclcore.bc \
70# libclcore_neon.bc
71#
72#NATIVE_BRIDGE_ORIG_GUEST_LIBS += \
73# libRS \
74# libRSDriver \
75# libRSSupport \
76
77# These native libraries are needed to pass CtsJniTestCases, we do not use them in any way and
78# once/if build system allows us to build dummy arm libraries they can be replaced with empty ones.
79#NATIVE_BRIDGE_ORIG_GUEST_LIBS += \
80# libart \
81# libvorbisidec
82
83
84NATIVE_BRIDGE_MODIFIED_GUEST_LIBS := \
85 libaaudio \
86 libamidi \
87 libandroid \
88 libandroid_runtime \
89 libbinder_ndk \
90 libc \
91 libcamera2ndk \
92 libEGL \
93 libGLESv1_CM \
94 libGLESv2 \
95 libGLESv3 \
96 libicui18n \
97 libicuuc \
98 libjnigraphics \
99 libmediandk \
100 libnativehelper \
101 libnativewindow \
102 libneuralnetworks \
103 libOpenMAXAL \
104 libOpenSLES \
105 libvulkan \
106 libwebviewchromium_plat_support
107
108# Original guest libraries are built for native_bridge
109NATIVE_BRIDGE_PRODUCT_PACKAGES += \
110 $(addsuffix .native_bridge,$(NATIVE_BRIDGE_ORIG_GUEST_LIBS))
111
112# Modified guest libraries are built for native_bridge and
113# have special build target prefix
114NATIVE_BRIDGE_PRODUCT_PACKAGES += \
115 $(addprefix libnative_bridge_guest_,$(addsuffix .native_bridge,$(NATIVE_BRIDGE_MODIFIED_GUEST_LIBS)))
116
117NATIVE_BRIDGE_ORIG_GUEST_LIBS :=