blob: f488ed5a4d9072732717b1606ee3e48310e95196 [file] [log] [blame]
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08001LOCAL_PATH:= $(call my-dir)
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08002
Ying Wang5748ee92013-07-23 18:03:37 -07003#######################################
4# init.rc
Ying Wang5748ee92013-07-23 18:03:37 -07005include $(CLEAR_VARS)
6
7LOCAL_MODULE := init.rc
8LOCAL_SRC_FILES := $(LOCAL_MODULE)
9LOCAL_MODULE_CLASS := ETC
10LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
11
12include $(BUILD_PREBUILT)
Evgenii Stepanov0d2dde52015-08-07 17:04:37 -070013
14#######################################
Mark Salyzyn7864e362016-01-28 09:32:53 -080015# init-debug.rc
16include $(CLEAR_VARS)
17
18LOCAL_MODULE := init-debug.rc
19LOCAL_SRC_FILES := $(LOCAL_MODULE)
20LOCAL_MODULE_CLASS := ETC
21LOCAL_MODULE_TAGS := debug
22LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/init
23
24include $(BUILD_PREBUILT)
25
26#######################################
Evgenii Stepanov0d2dde52015-08-07 17:04:37 -070027# asan.options
Ivan Krasin5039d8c2015-09-18 11:59:46 -070028ifneq ($(filter address,$(SANITIZE_TARGET)),)
Andreas Gampe8ccc1ad2016-06-22 20:05:59 -070029
Evgenii Stepanov0d2dde52015-08-07 17:04:37 -070030include $(CLEAR_VARS)
31
32LOCAL_MODULE := asan.options
33LOCAL_MODULE_CLASS := ETC
34LOCAL_SRC_FILES := $(LOCAL_MODULE)
35LOCAL_MODULE_PATH := $(TARGET_OUT)
36
37include $(BUILD_PREBUILT)
Andreas Gampe8ccc1ad2016-06-22 20:05:59 -070038
Andreas Gampedf5496a2017-03-21 19:36:48 -070039# ASAN extration.
40ASAN_EXTRACT_FILES :=
41ifeq ($(SANITIZE_TARGET_SYSTEM),true)
42include $(CLEAR_VARS)
43LOCAL_MODULE:= asan_extract
44LOCAL_MODULE_TAGS := optional
45LOCAL_MODULE_CLASS := EXECUTABLES
46LOCAL_SRC_FILES := asan_extract.sh
47LOCAL_INIT_RC := asan_extract.rc
48# We need bzip2 on device for extraction.
49LOCAL_REQUIRED_MODULES := bzip2
50include $(BUILD_PREBUILT)
51ASAN_EXTRACT_FILES := asan_extract
52endif
53
Evgenii Stepanov0d2dde52015-08-07 17:04:37 -070054endif
55
Ying Wang5748ee92013-07-23 18:03:37 -070056#######################################
57# init.environ.rc
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080058
Ying Wang5748ee92013-07-23 18:03:37 -070059include $(CLEAR_VARS)
60LOCAL_MODULE_CLASS := ETC
61LOCAL_MODULE := init.environ.rc
62LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
Colin Cross44b65d02010-04-20 14:32:50 -070063
Evgenii Stepanov0d2dde52015-08-07 17:04:37 -070064EXPORT_GLOBAL_ASAN_OPTIONS :=
Ivan Krasin5039d8c2015-09-18 11:59:46 -070065ifneq ($(filter address,$(SANITIZE_TARGET)),)
Evgenii Stepanov0d2dde52015-08-07 17:04:37 -070066 EXPORT_GLOBAL_ASAN_OPTIONS := export ASAN_OPTIONS include=/system/asan.options
Andreas Gampedf5496a2017-03-21 19:36:48 -070067 LOCAL_REQUIRED_MODULES := asan.options $(ASAN_OPTIONS_FILES) $(ASAN_EXTRACT_FILES)
Evgenii Stepanov0d2dde52015-08-07 17:04:37 -070068endif
Ryan Campbell0b364732017-02-21 17:27:02 -080069
70EXPORT_GLOBAL_GCOV_OPTIONS :=
71ifeq ($(NATIVE_COVERAGE),true)
72 EXPORT_GLOBAL_GCOV_OPTIONS := export GCOV_PREFIX /data/misc/gcov
73endif
74
Ying Wang5748ee92013-07-23 18:03:37 -070075# Put it here instead of in init.rc module definition,
76# because init.rc is conditionally included.
77#
Daniel Rosenberg595003a2015-07-28 15:14:39 -070078# create some directories (some are mount points) and symlinks
Daniel Rosenberg52b59152015-10-28 13:13:37 -070079LOCAL_POST_INSTALL_CMD := mkdir -p $(addprefix $(TARGET_ROOT_OUT)/, \
Steve Muckle1a3e3062018-01-04 08:42:15 -080080 sbin dev proc sys system data odm oem acct config storage mnt $(BOARD_ROOT_EXTRA_FOLDERS)); \
Elliott Hughesff1ef9f2017-12-06 08:59:02 -080081 ln -sf /system/bin $(TARGET_ROOT_OUT)/bin; \
Daniel Rosenberg595003a2015-07-28 15:14:39 -070082 ln -sf /system/etc $(TARGET_ROOT_OUT)/etc; \
Nick Kralevichc4084c62016-11-19 12:09:33 -080083 ln -sf /data/user_de/0/com.android.shell/files/bugreports $(TARGET_ROOT_OUT)/bugreports; \
Daniel Rosenberg595003a2015-07-28 15:14:39 -070084 ln -sf /sys/kernel/debug $(TARGET_ROOT_OUT)/d; \
85 ln -sf /storage/self/primary $(TARGET_ROOT_OUT)/sdcard
Dan Willemsen07904312016-07-08 18:08:51 -070086ifdef BOARD_USES_VENDORIMAGE
Daniel Rosenberg52b59152015-10-28 13:13:37 -070087 LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_ROOT_OUT)/vendor
Junichi Uekawa07b69962015-11-12 07:49:47 +090088else
89 LOCAL_POST_INSTALL_CMD += ; ln -sf /system/vendor $(TARGET_ROOT_OUT)/vendor
Daniel Rosenberg595003a2015-07-28 15:14:39 -070090endif
Jaekyun Seokdff165d2017-11-28 12:10:10 +090091ifdef BOARD_USES_PRODUCTIMAGE
92 LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_ROOT_OUT)/product
93else
94 LOCAL_POST_INSTALL_CMD += ; ln -sf /system/product $(TARGET_ROOT_OUT)/product
95endif
Bowgo Tsai00749af2017-11-15 18:06:48 +080096
97# For /odm partition.
98LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_ROOT_OUT)/odm
99# For Treble Generic System Image (GSI), system-as-root GSI needs to work on
100# both devices with and without /odm partition. Those symlinks are for devices
101# without /odm partition. For devices with /odm partition, mount odm.img under
102# /odm will hide those symlinks.
103LOCAL_POST_INSTALL_CMD += ; ln -sf /vendor/odm/app $(TARGET_ROOT_OUT)/odm/app
104LOCAL_POST_INSTALL_CMD += ; ln -sf /vendor/odm/bin $(TARGET_ROOT_OUT)/odm/bin
105LOCAL_POST_INSTALL_CMD += ; ln -sf /vendor/odm/etc $(TARGET_ROOT_OUT)/odm/etc
106LOCAL_POST_INSTALL_CMD += ; ln -sf /vendor/odm/firmware $(TARGET_ROOT_OUT)/odm/firmware
107LOCAL_POST_INSTALL_CMD += ; ln -sf /vendor/odm/framework $(TARGET_ROOT_OUT)/odm/framework
108LOCAL_POST_INSTALL_CMD += ; ln -sf /vendor/odm/lib $(TARGET_ROOT_OUT)/odm/lib
109LOCAL_POST_INSTALL_CMD += ; ln -sf /vendor/odm/lib64 $(TARGET_ROOT_OUT)/odm/lib64
110LOCAL_POST_INSTALL_CMD += ; ln -sf /vendor/odm/overlay $(TARGET_ROOT_OUT)/odm/overlay
111LOCAL_POST_INSTALL_CMD += ; ln -sf /vendor/odm/priv-app $(TARGET_ROOT_OUT)/odm/priv-app
112
Patrick Tjinc6535a32016-05-13 14:22:14 -0700113ifdef BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE
114 LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_ROOT_OUT)/cache
115else
116 LOCAL_POST_INSTALL_CMD += ; ln -sf /data/cache $(TARGET_ROOT_OUT)/cache
117endif
Daniel Rosenberg52b59152015-10-28 13:13:37 -0700118ifdef BOARD_ROOT_EXTRA_SYMLINKS
119# BOARD_ROOT_EXTRA_SYMLINKS is a list of <target>:<link_name>.
120 LOCAL_POST_INSTALL_CMD += $(foreach s, $(BOARD_ROOT_EXTRA_SYMLINKS),\
121 $(eval p := $(subst :,$(space),$(s)))\
122 ; mkdir -p $(dir $(TARGET_ROOT_OUT)/$(word 2,$(p))) \
123 ; ln -sf $(word 1,$(p)) $(TARGET_ROOT_OUT)/$(word 2,$(p)))
124endif
Alex Deymoe120b472016-02-29 17:23:36 -0800125# The A/B updater uses a top-level /postinstall directory to mount the new
126# system before reboot.
127ifeq ($(AB_OTA_UPDATER),true)
128 LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_ROOT_OUT)/postinstall
129endif
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800130
Ying Wang5748ee92013-07-23 18:03:37 -0700131include $(BUILD_SYSTEM)/base_rules.mk
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800132
Ying Wang7011a852014-06-14 09:11:02 -0700133# Regenerate init.environ.rc if PRODUCT_BOOTCLASSPATH has changed.
Narayan Kamath1fabc352014-08-05 15:42:34 +0100134bcp_md5 := $(word 1, $(shell echo $(PRODUCT_BOOTCLASSPATH) $(PRODUCT_SYSTEM_SERVER_CLASSPATH) | $(MD5SUM)))
Ying Wang7011a852014-06-14 09:11:02 -0700135bcp_dep := $(intermediates)/$(bcp_md5).bcp.dep
136$(bcp_dep) :
137 $(hide) mkdir -p $(dir $@) && rm -rf $(dir $@)*.bcp.dep && touch $@
138
139$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/init.environ.rc.in $(bcp_dep)
Ying Wang5748ee92013-07-23 18:03:37 -0700140 @echo "Generate: $< -> $@"
141 @mkdir -p $(dir $@)
142 $(hide) sed -e 's?%BOOTCLASSPATH%?$(PRODUCT_BOOTCLASSPATH)?g' $< >$@
Narayan Kamath1fabc352014-08-05 15:42:34 +0100143 $(hide) sed -i -e 's?%SYSTEMSERVERCLASSPATH%?$(PRODUCT_SYSTEM_SERVER_CLASSPATH)?g' $@
Evgenii Stepanov1cbe3d92015-06-12 15:42:20 -0700144 $(hide) sed -i -e 's?%EXPORT_GLOBAL_ASAN_OPTIONS%?$(EXPORT_GLOBAL_ASAN_OPTIONS)?g' $@
Ryan Campbell0b364732017-02-21 17:27:02 -0800145 $(hide) sed -i -e 's?%EXPORT_GLOBAL_GCOV_OPTIONS%?$(EXPORT_GLOBAL_GCOV_OPTIONS)?g' $@
Ying Wang5748ee92013-07-23 18:03:37 -0700146
Ying Wang7011a852014-06-14 09:11:02 -0700147bcp_md5 :=
148bcp_dep :=
Jiyong Park450cff42017-04-05 14:24:14 +0900149
Justin Yundd163012018-01-10 09:38:19 +0900150# If BOARD_VNDK_VERSION is defined, append PLATFORM_VNDK_VERSION to base name.
151define append_vndk_version
Justin Yun210ff942017-12-07 17:31:53 +0900152$(strip \
Justin Yundd163012018-01-10 09:38:19 +0900153 $(if $(BOARD_VNDK_VERSION), \
154 $(basename $(1)).$(PLATFORM_VNDK_VERSION)$(suffix $(1)), \
155 $(1) \
Justin Yun210ff942017-12-07 17:31:53 +0900156 ) \
157)
158endef
159
Justin Yuncbbf1952018-01-16 11:46:21 +0900160# Update namespace configuration file with library lists and VNDK version
161#
162# $(1): Input source file (ld.config.txt)
163# $(2): Output built module
164# $(3): VNDK version suffix
Justin Yun8065a602018-02-14 14:07:59 +0900165# $(4): true if libz must be included in llndk not in vndk-sp
Justin Yuncbbf1952018-01-16 11:46:21 +0900166define update_and_install_ld_config
Justin Yun8065a602018-02-14 14:07:59 +0900167# If $(4) is true, move libz to llndk from vndk-sp.
168$(if $(filter true,$(4)),\
169 $(eval llndk_libraries_list := $(LLNDK_LIBRARIES) libz) \
170 $(eval vndksp_libraries_list := $(filter-out libz,$(VNDK_SAMEPROCESS_LIBRARIES))),\
171 $(eval llndk_libraries_list := $(LLNDK_LIBRARIES)) \
172 $(eval vndksp_libraries_list := $(VNDK_SAMEPROCESS_LIBRARIES)))
173
Justin Yuncbbf1952018-01-16 11:46:21 +0900174llndk_libraries := $(call normalize-path-list,$(addsuffix .so,\
Justin Yun8065a602018-02-14 14:07:59 +0900175 $(filter-out $(VNDK_PRIVATE_LIBRARIES),$(llndk_libraries_list))))
Justin Yuncbbf1952018-01-16 11:46:21 +0900176private_llndk_libraries := $(call normalize-path-list,$(addsuffix .so,\
Justin Yun8065a602018-02-14 14:07:59 +0900177 $(filter $(VNDK_PRIVATE_LIBRARIES),$(llndk_libraries_list))))
Justin Yuncbbf1952018-01-16 11:46:21 +0900178vndk_sameprocess_libraries := $(call normalize-path-list,$(addsuffix .so,\
Justin Yun8065a602018-02-14 14:07:59 +0900179 $(filter-out $(VNDK_PRIVATE_LIBRARIES),$(vndksp_libraries_list))))
Justin Yuncbbf1952018-01-16 11:46:21 +0900180vndk_core_libraries := $(call normalize-path-list,$(addsuffix .so,\
181 $(filter-out $(VNDK_PRIVATE_LIBRARIES),$(VNDK_CORE_LIBRARIES))))
182sanitizer_runtime_libraries := $(call normalize-path-list,$(addsuffix .so,\
183 $(ADDRESS_SANITIZER_RUNTIME_LIBRARY) \
184 $(UBSAN_RUNTIME_LIBRARY) \
185 $(TSAN_RUNTIME_LIBRARY) \
186 $(2ND_ADDRESS_SANITIZER_RUNTIME_LIBRARY) \
187 $(2ND_UBSAN_RUNTIME_LIBRARY) \
188 $(2ND_TSAN_RUNTIME_LIBRARY)))
189# If BOARD_VNDK_VERSION is not defined, VNDK version suffix will not be used.
190vndk_version_suffix := $(if $(strip $(3)),-$(strip $(3)))
191
192$(2): PRIVATE_LLNDK_LIBRARIES := $$(llndk_libraries)
193$(2): PRIVATE_PRIVATE_LLNDK_LIBRARIES := $$(private_llndk_libraries)
194$(2): PRIVATE_VNDK_SAMEPROCESS_LIBRARIES := $$(vndk_sameprocess_libraries)
195$(2): PRIVATE_VNDK_CORE_LIBRARIES := $$(vndk_core_libraries)
196$(2): PRIVATE_SANITIZER_RUNTIME_LIBRARIES := $$(sanitizer_runtime_libraries)
197$(2): PRIVATE_VNDK_VERSION := $$(vndk_version_suffix)
198$(2): $(1)
199 @echo "Generate: $$< -> $$@"
200 @mkdir -p $$(dir $$@)
201 $$(hide) sed -e 's?%LLNDK_LIBRARIES%?$$(PRIVATE_LLNDK_LIBRARIES)?g' $$< >$$@
202 $$(hide) sed -i -e 's?%PRIVATE_LLNDK_LIBRARIES%?$$(PRIVATE_PRIVATE_LLNDK_LIBRARIES)?g' $$@
203 $$(hide) sed -i -e 's?%VNDK_SAMEPROCESS_LIBRARIES%?$$(PRIVATE_VNDK_SAMEPROCESS_LIBRARIES)?g' $$@
204 $$(hide) sed -i -e 's?%VNDK_CORE_LIBRARIES%?$$(PRIVATE_VNDK_CORE_LIBRARIES)?g' $$@
205 $$(hide) sed -i -e 's?%SANITIZER_RUNTIME_LIBRARIES%?$$(PRIVATE_SANITIZER_RUNTIME_LIBRARIES)?g' $$@
206 $$(hide) sed -i -e 's?%VNDK_VER%?$$(PRIVATE_VNDK_VERSION)?g' $$@
207
Justin Yun8065a602018-02-14 14:07:59 +0900208llndk_libraries_list :=
209vndksp_libraries_list :=
Justin Yuncbbf1952018-01-16 11:46:21 +0900210llndk_libraries :=
211private_llndk_libraries :=
212vndk_sameprocess_libraries :=
213vndk_core_libraries :=
214sanitizer_runtime_libraries :=
215vndk_version_suffix :=
216endef # update_and_install_ld_config
217
Ying Wang5748ee92013-07-23 18:03:37 -0700218#######################################
Jiyong Park450cff42017-04-05 14:24:14 +0900219# ld.config.txt
Justin Yuncbbf1952018-01-16 11:46:21 +0900220#
221# For VNDK enforced devices that have defined BOARD_VNDK_VERSION, use
Justin Yun27bdc372018-02-08 08:46:59 +0900222# "ld.config.txt" as a source file. This configuration includes strict VNDK
223# run-time restrictions for vendor process.
Justin Yuncbbf1952018-01-16 11:46:21 +0900224# Other treblized devices, that have not defined BOARD_VNDK_VERSION or that
Justin Yun27bdc372018-02-08 08:46:59 +0900225# have set BOARD_VNDK_RUNTIME_DISABLE to true, use "ld.config.vndk_lite.txt"
Justin Yun8a9a8ee2018-02-02 13:22:02 +0900226# as a source file. This configuration does not have strict VNDK run-time
227# restrictions.
Justin Yuncbbf1952018-01-16 11:46:21 +0900228# If the device is not treblized, use "ld.config.legacy.txt" for legacy
229# namespace configuration.
Jiyong Park450cff42017-04-05 14:24:14 +0900230include $(CLEAR_VARS)
Justin Yuncbbf1952018-01-16 11:46:21 +0900231LOCAL_MODULE := ld.config.txt
232LOCAL_MODULE_CLASS := ETC
233LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)
Jiyong Park450cff42017-04-05 14:24:14 +0900234
Jiyong Parkecc703c2017-08-04 19:08:06 +0900235_enforce_vndk_at_runtime := false
Jiyong Parkecc703c2017-08-04 19:08:06 +0900236ifdef BOARD_VNDK_VERSION
237ifneq ($(BOARD_VNDK_RUNTIME_DISABLE),true)
238 _enforce_vndk_at_runtime := true
239endif
240endif
241
242ifeq ($(_enforce_vndk_at_runtime),true)
Justin Yuncbbf1952018-01-16 11:46:21 +0900243# for VNDK enforced devices
Justin Yundd163012018-01-10 09:38:19 +0900244LOCAL_MODULE_STEM := $(call append_vndk_version,$(LOCAL_MODULE))
Jiyong Parkecc703c2017-08-04 19:08:06 +0900245include $(BUILD_SYSTEM)/base_rules.mk
Justin Yuncbbf1952018-01-16 11:46:21 +0900246$(eval $(call update_and_install_ld_config,\
Justin Yun27bdc372018-02-08 08:46:59 +0900247 $(LOCAL_PATH)/etc/ld.config.txt,\
Justin Yuncbbf1952018-01-16 11:46:21 +0900248 $(LOCAL_BUILT_MODULE),\
249 $(PLATFORM_VNDK_VERSION)))
Jiyong Parkecc703c2017-08-04 19:08:06 +0900250
Justin Yuncbbf1952018-01-16 11:46:21 +0900251else ifeq ($(PRODUCT_TREBLE_LINKER_NAMESPACES)|$(SANITIZE_TARGET),true|)
252# for treblized but VNDK non-enforced devices
253LOCAL_MODULE_STEM := $(call append_vndk_version,$(LOCAL_MODULE))
254include $(BUILD_SYSTEM)/base_rules.mk
255$(eval $(call update_and_install_ld_config,\
Justin Yun27bdc372018-02-08 08:46:59 +0900256 $(LOCAL_PATH)/etc/ld.config.vndk_lite.txt,\
Justin Yuncbbf1952018-01-16 11:46:21 +0900257 $(LOCAL_BUILT_MODULE),\
Justin Yun8065a602018-02-14 14:07:59 +0900258 $(if $(BOARD_VNDK_VERSION),$(PLATFORM_VNDK_VERSION)),\
259 true))
Jiyong Parkecc703c2017-08-04 19:08:06 +0900260
Jiyong Park450cff42017-04-05 14:24:14 +0900261else
Justin Yuncbbf1952018-01-16 11:46:21 +0900262# for legacy non-treblized devices
263LOCAL_SRC_FILES := etc/ld.config.legacy.txt
264LOCAL_MODULE_STEM := $(LOCAL_MODULE)
265include $(BUILD_PREBUILT)
266
267endif # if _enforce_vndk_at_runtime is true
268
269_enforce_vndk_at_runtime :=
270
271#######################################
272# ld.config.noenforce.txt
273#
274# This file is a temporary configuration file only for GSI. Originally GSI has
275# BOARD_VNDK_VERSION defined and has strict VNDK enforcing rule based on
Justin Yun27bdc372018-02-08 08:46:59 +0900276# "ld.config.txt". However for the devices, that have not defined
Justin Yuncbbf1952018-01-16 11:46:21 +0900277# BOARD_VNDK_VERSION, GSI provides this configuration file which is based on
Justin Yun27bdc372018-02-08 08:46:59 +0900278# "ld.config.vndk_lite.txt".
Justin Yuncbbf1952018-01-16 11:46:21 +0900279# Do not install this file for the devices other than GSI.
280include $(CLEAR_VARS)
281LOCAL_MODULE := ld.config.noenforce.txt
Jiyong Park450cff42017-04-05 14:24:14 +0900282LOCAL_MODULE_CLASS := ETC
283LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)
Justin Yuncbbf1952018-01-16 11:46:21 +0900284LOCAL_MODULE_STEM := $(LOCAL_MODULE)
285include $(BUILD_SYSTEM)/base_rules.mk
286$(eval $(call update_and_install_ld_config,\
Justin Yun27bdc372018-02-08 08:46:59 +0900287 $(LOCAL_PATH)/etc/ld.config.vndk_lite.txt,\
Justin Yuncbbf1952018-01-16 11:46:21 +0900288 $(LOCAL_BUILT_MODULE),\
Justin Yun8065a602018-02-14 14:07:59 +0900289 $(PLATFORM_VNDK_VERSION),\
290 true))
Jiyong Parke04e4e72017-08-22 10:25:18 +0900291
292#######################################
293# llndk.libraries.txt
294include $(CLEAR_VARS)
295LOCAL_MODULE := llndk.libraries.txt
296LOCAL_MODULE_CLASS := ETC
297LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)
Justin Yundd163012018-01-10 09:38:19 +0900298LOCAL_MODULE_STEM := $(call append_vndk_version,$(LOCAL_MODULE))
Jiyong Parke04e4e72017-08-22 10:25:18 +0900299include $(BUILD_SYSTEM)/base_rules.mk
Jiyong Parke04e4e72017-08-22 10:25:18 +0900300$(LOCAL_BUILT_MODULE): PRIVATE_LLNDK_LIBRARIES := $(LLNDK_LIBRARIES)
Jiyong Park74857cc2017-10-13 16:36:49 +0900301$(LOCAL_BUILT_MODULE):
Jiyong Parke04e4e72017-08-22 10:25:18 +0900302 @echo "Generate: $@"
303 @mkdir -p $(dir $@)
304 $(hide) echo -n > $@
305 $(hide) $(foreach lib,$(PRIVATE_LLNDK_LIBRARIES), \
306 echo $(lib).so >> $@;)
307
308#######################################
309# vndksp.libraries.txt
310include $(CLEAR_VARS)
311LOCAL_MODULE := vndksp.libraries.txt
312LOCAL_MODULE_CLASS := ETC
313LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)
Justin Yundd163012018-01-10 09:38:19 +0900314LOCAL_MODULE_STEM := $(call append_vndk_version,$(LOCAL_MODULE))
Jiyong Parke04e4e72017-08-22 10:25:18 +0900315include $(BUILD_SYSTEM)/base_rules.mk
Jiyong Parke04e4e72017-08-22 10:25:18 +0900316$(LOCAL_BUILT_MODULE): PRIVATE_VNDK_SAMEPROCESS_LIBRARIES := $(VNDK_SAMEPROCESS_LIBRARIES)
Jiyong Park74857cc2017-10-13 16:36:49 +0900317$(LOCAL_BUILT_MODULE):
Jiyong Parke04e4e72017-08-22 10:25:18 +0900318 @echo "Generate: $@"
319 @mkdir -p $(dir $@)
320 $(hide) echo -n > $@
321 $(hide) $(foreach lib,$(PRIVATE_VNDK_SAMEPROCESS_LIBRARIES), \
322 echo $(lib).so >> $@;)