blob: b56361f44b30e65b97108394c491fbb0f6a5542d [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
Victor Khimenkoefafd7e2020-08-21 00:46:18 +020066NATIVE_BRIDGE_PRODUCT_PACKAGES += \
67 libclcore.bc \
68 libclcore_neon.bc
69
70NATIVE_BRIDGE_ORIG_GUEST_LIBS += \
71 libRS \
72 libRSDriver \
73 libnative_bridge_guest_libRSSupport
Lev Rumyantsev0ea3b6f2020-06-25 13:13:53 -070074
75# These native libraries are needed to pass CtsJniTestCases, we do not use them in any way and
76# once/if build system allows us to build dummy arm libraries they can be replaced with empty ones.
77#NATIVE_BRIDGE_ORIG_GUEST_LIBS += \
78# libart \
79# libvorbisidec
80
Victor Khimenkoefafd7e2020-08-21 00:46:18 +020081# These libraries need special support on the native bridge implementation side.
Lev Rumyantsev0ea3b6f2020-06-25 13:13:53 -070082NATIVE_BRIDGE_MODIFIED_GUEST_LIBS := \
83 libaaudio \
84 libamidi \
85 libandroid \
86 libandroid_runtime \
87 libbinder_ndk \
88 libc \
89 libcamera2ndk \
90 libEGL \
91 libGLESv1_CM \
92 libGLESv2 \
93 libGLESv3 \
94 libicui18n \
95 libicuuc \
96 libjnigraphics \
97 libmediandk \
98 libnativehelper \
99 libnativewindow \
100 libneuralnetworks \
101 libOpenMAXAL \
102 libOpenSLES \
103 libvulkan \
104 libwebviewchromium_plat_support
105
106# Original guest libraries are built for native_bridge
107NATIVE_BRIDGE_PRODUCT_PACKAGES += \
108 $(addsuffix .native_bridge,$(NATIVE_BRIDGE_ORIG_GUEST_LIBS))
109
110# Modified guest libraries are built for native_bridge and
111# have special build target prefix
112NATIVE_BRIDGE_PRODUCT_PACKAGES += \
113 $(addprefix libnative_bridge_guest_,$(addsuffix .native_bridge,$(NATIVE_BRIDGE_MODIFIED_GUEST_LIBS)))
114
115NATIVE_BRIDGE_ORIG_GUEST_LIBS :=