Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 1 | # Copyright (C) 2017 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | current_makefile := $(lastword $(MAKEFILE_LIST)) |
| 16 | |
| 17 | # BOARD_VNDK_VERSION must be set to 'current' in order to generate a VNDK snapshot. |
| 18 | ifeq ($(BOARD_VNDK_VERSION),current) |
| 19 | |
Jae Shin | 0b1792e | 2017-12-21 19:04:13 +0900 | [diff] [blame] | 20 | # PLATFORM_VNDK_VERSION must be set. |
| 21 | ifneq (,$(PLATFORM_VNDK_VERSION)) |
| 22 | |
Justin Yun | 4dff0c6 | 2018-01-04 10:51:16 +0900 | [diff] [blame] | 23 | # BOARD_VNDK_RUNTIME_DISABLE must not be set to 'true'. |
| 24 | ifneq ($(BOARD_VNDK_RUNTIME_DISABLE),true) |
| 25 | |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 26 | # Returns list of src:dest paths of the intermediate objs |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 27 | # |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 28 | # Args: |
Jae Shin | 77c07dd | 2017-12-22 11:24:00 +0900 | [diff] [blame] | 29 | # $(1): list of module and filename pairs (e.g., ld.config.txt:ld.config.27.txt ...) |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 30 | # $(2): if not empty, evaluates for TARGET_2ND_ARCH |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 31 | define paths-of-intermediates |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 32 | $(strip \ |
Jae Shin | 77c07dd | 2017-12-22 11:24:00 +0900 | [diff] [blame] | 33 | $(foreach pair,$(1), \ |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 34 | $(eval module := $(call word-colon,1,$(pair))$(if $(2),$(TARGET_2ND_ARCH_MODULE_SUFFIX))) \ |
| 35 | $(eval built := $(ALL_MODULES.$(module).BUILT_INSTALLED)) \ |
| 36 | $(eval filename := $(call word-colon,2,$(pair))) \ |
| 37 | $(if $(wordlist 2,100,$(built)), \ |
| 38 | $(error Unable to handle multiple built files ($(module)): $(built))) \ |
| 39 | $(if $(built),$(call word-colon,1,$(built)):$(filename)) \ |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 40 | ) \ |
| 41 | ) |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 42 | endef |
| 43 | |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 44 | # Returns src:dest list of notice files |
Jae Shin | 410a1af | 2017-12-15 19:35:16 +0900 | [diff] [blame] | 45 | # |
| 46 | # Args: |
| 47 | # $(1): list of lib names (e.g., libfoo.vendor) |
Jae Shin | 410a1af | 2017-12-15 19:35:16 +0900 | [diff] [blame] | 48 | define paths-of-notice-files |
| 49 | $(strip \ |
Jae Shin | 410a1af | 2017-12-15 19:35:16 +0900 | [diff] [blame] | 50 | $(foreach lib,$(1), \ |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 51 | $(eval notice := $(sort \ |
| 52 | $(ALL_MODULES.$(lib).NOTICES) \ |
| 53 | $(if $(TARGET_2ND_ARCH), |
| 54 | $(ALL_MODULES.$(lib)$(TARGET_2ND_ARCH_MODULE_SUFFIX).NOTICES)))) \ |
| 55 | $(if $(wordlist 2,100,$(notice)), \ |
| 56 | $(error Unable to handle multiple notice files ($(lib)): $(notice))) \ |
| 57 | $(if $(notice),$(notice):$(subst .vendor,,$(lib)).so.txt))) |
Jae Shin | 410a1af | 2017-12-15 19:35:16 +0900 | [diff] [blame] | 58 | endef |
| 59 | |
Jae Shin | 4b6ba7e | 2018-07-26 12:04:31 +0900 | [diff] [blame] | 60 | vndk_core_libs := $(addsuffix .vendor,$(VNDK_CORE_LIBRARIES)) |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 61 | vndk_sp_libs := $(addsuffix .vendor,$(VNDK_SAMEPROCESS_LIBRARIES)) |
| 62 | vndk_private_libs := $(addsuffix .vendor,$(VNDK_PRIVATE_LIBRARIES)) |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 63 | |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 64 | vndk_snapshot_libs := \ |
| 65 | $(vndk_core_libs) \ |
| 66 | $(vndk_sp_libs) |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 67 | |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 68 | vndk_prebuilt_txts := \ |
| 69 | ld.config.txt \ |
| 70 | vndksp.libraries.txt \ |
| 71 | llndk.libraries.txt |
| 72 | |
| 73 | vndk_snapshot_top := $(call intermediates-dir-for,PACKAGING,vndk-snapshot) |
| 74 | vndk_snapshot_out := $(vndk_snapshot_top)/vndk-snapshot |
| 75 | vndk_snapshot_configs_out := $(vndk_snapshot_top)/configs |
| 76 | |
| 77 | ####################################### |
| 78 | # vndkcore.libraries.txt |
| 79 | vndkcore.libraries.txt := $(vndk_snapshot_configs_out)/vndkcore.libraries.txt |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 80 | $(vndkcore.libraries.txt): PRIVATE_LIBS := $(vndk_core_libs) |
| 81 | $(vndkcore.libraries.txt): |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 82 | @echo 'Generating: $@' |
| 83 | @rm -f $@ |
| 84 | @mkdir -p $(dir $@) |
| 85 | $(hide) echo -n > $@ |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 86 | $(hide) $(foreach lib,$(PRIVATE_LIBS),echo $(patsubst %.vendor,%,$(lib)).so >> $@;) |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 87 | |
| 88 | |
| 89 | ####################################### |
| 90 | # vndkprivate.libraries.txt |
| 91 | vndkprivate.libraries.txt := $(vndk_snapshot_configs_out)/vndkprivate.libraries.txt |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 92 | $(vndkprivate.libraries.txt): PRIVATE_LIBS := $(vndk_private_libs) |
| 93 | $(vndkprivate.libraries.txt): |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 94 | @echo 'Generating: $@' |
| 95 | @rm -f $@ |
| 96 | @mkdir -p $(dir $@) |
| 97 | $(hide) echo -n > $@ |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 98 | $(hide) $(foreach lib,$(PRIVATE_LIBS),echo $(patsubst %.vendor,%,$(lib)).so >> $@;) |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 99 | |
| 100 | |
Jae Shin | 410a1af | 2017-12-15 19:35:16 +0900 | [diff] [blame] | 101 | ####################################### |
| 102 | # module_paths.txt |
| 103 | module_paths.txt := $(vndk_snapshot_configs_out)/module_paths.txt |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 104 | $(module_paths.txt): PRIVATE_LIBS := $(vndk_snapshot_libs) |
| 105 | $(module_paths.txt): |
Jae Shin | 410a1af | 2017-12-15 19:35:16 +0900 | [diff] [blame] | 106 | @echo 'Generating: $@' |
| 107 | @rm -f $@ |
| 108 | @mkdir -p $(dir $@) |
| 109 | $(hide) echo -n > $@ |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 110 | $(hide) $(foreach lib,$(PRIVATE_LIBS),echo $(patsubst %.vendor,%,$(lib)).so $(ALL_MODULES.$(lib).PATH) >> $@;) |
Jae Shin | 410a1af | 2017-12-15 19:35:16 +0900 | [diff] [blame] | 111 | |
| 112 | |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 113 | vndk_snapshot_configs := \ |
| 114 | $(vndkcore.libraries.txt) \ |
Jae Shin | 410a1af | 2017-12-15 19:35:16 +0900 | [diff] [blame] | 115 | $(vndkprivate.libraries.txt) \ |
| 116 | $(module_paths.txt) |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 117 | |
| 118 | ####################################### |
| 119 | # vndk_snapshot_zip |
Jae Shin | 893fca6 | 2017-12-28 16:00:10 +0900 | [diff] [blame] | 120 | vndk_snapshot_variant := $(vndk_snapshot_out)/$(TARGET_ARCH) |
Jae Shin | f20605c | 2018-05-30 21:01:29 +0900 | [diff] [blame] | 121 | binder := |
Jae Shin | f1e9d4f | 2018-07-24 16:12:42 +0900 | [diff] [blame] | 122 | ifneq ($(TARGET_IS_64_BIT), true) |
| 123 | ifneq ($(TARGET_USES_64_BIT_BINDER), true) |
| 124 | binder := binder32 |
| 125 | endif |
Jae Shin | f20605c | 2018-05-30 21:01:29 +0900 | [diff] [blame] | 126 | endif |
| 127 | vndk_lib_dir := $(subst $(space),/,$(strip $(vndk_snapshot_variant) $(binder) arch-$(TARGET_ARCH)-$(TARGET_ARCH_VARIANT))) |
| 128 | vndk_lib_dir_2nd := $(subst $(space),/,$(strip $(vndk_snapshot_variant) $(binder) arch-$(TARGET_2ND_ARCH)-$(TARGET_2ND_ARCH_VARIANT))) |
| 129 | vndk_snapshot_zip := $(PRODUCT_OUT)/android-vndk-$(TARGET_PRODUCT).zip |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 130 | |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 131 | $(vndk_snapshot_zip): PRIVATE_VNDK_SNAPSHOT_OUT := $(vndk_snapshot_out) |
| 132 | |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 133 | deps := $(call paths-of-intermediates,$(foreach lib,$(vndk_core_libs),$(lib):$(subst .vendor,,$(lib)).so)) |
Jae Shin | 893fca6 | 2017-12-28 16:00:10 +0900 | [diff] [blame] | 134 | $(vndk_snapshot_zip): PRIVATE_VNDK_CORE_OUT := $(vndk_lib_dir)/shared/vndk-core |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 135 | $(vndk_snapshot_zip): PRIVATE_VNDK_CORE_INTERMEDIATES := $(deps) |
| 136 | $(vndk_snapshot_zip): $(foreach d,$(deps),$(call word-colon,1,$(d))) |
| 137 | deps := |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 138 | |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 139 | deps := $(call paths-of-intermediates,$(foreach lib,$(vndk_sp_libs),$(lib):$(subst .vendor,,$(lib)).so)) |
Jae Shin | 893fca6 | 2017-12-28 16:00:10 +0900 | [diff] [blame] | 140 | $(vndk_snapshot_zip): PRIVATE_VNDK_SP_OUT := $(vndk_lib_dir)/shared/vndk-sp |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 141 | $(vndk_snapshot_zip): PRIVATE_VNDK_SP_INTERMEDIATES := $(deps) |
| 142 | $(vndk_snapshot_zip): $(foreach d,$(deps),$(call word-colon,1,$(d))) |
| 143 | deps := |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 144 | |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 145 | deps := $(call paths-of-intermediates,$(foreach txt,$(vndk_prebuilt_txts), \ |
| 146 | $(txt):$(patsubst %.txt,%.$(PLATFORM_VNDK_VERSION).txt,$(txt)))) \ |
| 147 | $(foreach config,$(vndk_snapshot_configs),$(config):$(notdir $(config))) |
Jae Shin | 893fca6 | 2017-12-28 16:00:10 +0900 | [diff] [blame] | 148 | $(vndk_snapshot_zip): PRIVATE_CONFIGS_OUT := $(vndk_snapshot_variant)/configs |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 149 | $(vndk_snapshot_zip): PRIVATE_CONFIGS_INTERMEDIATES := $(deps) |
| 150 | $(vndk_snapshot_zip): $(foreach d,$(deps),$(call word-colon,1,$(d))) |
| 151 | deps := |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 152 | |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 153 | notices := $(call paths-of-notice-files,$(vndk_core_libs) $(vndk_sp_libs)) |
Jae Shin | 893fca6 | 2017-12-28 16:00:10 +0900 | [diff] [blame] | 154 | $(vndk_snapshot_zip): PRIVATE_NOTICE_FILES_OUT := $(vndk_snapshot_variant)/NOTICE_FILES |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 155 | $(vndk_snapshot_zip): PRIVATE_NOTICE_FILES_INTERMEDIATES := $(notices) |
| 156 | $(vndk_snapshot_zip): $(foreach n,$(notices),$(call word-colon,1,$(n))) |
| 157 | notices := |
Jae Shin | 410a1af | 2017-12-15 19:35:16 +0900 | [diff] [blame] | 158 | |
Jae Shin | 893fca6 | 2017-12-28 16:00:10 +0900 | [diff] [blame] | 159 | ifdef TARGET_2ND_ARCH |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 160 | deps := $(call paths-of-intermediates,$(foreach lib,$(vndk_core_libs),$(lib):$(subst .vendor,,$(lib)).so),true) |
Jae Shin | 893fca6 | 2017-12-28 16:00:10 +0900 | [diff] [blame] | 161 | $(vndk_snapshot_zip): PRIVATE_VNDK_CORE_OUT_2ND := $(vndk_lib_dir_2nd)/shared/vndk-core |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 162 | $(vndk_snapshot_zip): PRIVATE_VNDK_CORE_INTERMEDIATES_2ND := $(deps) |
| 163 | $(vndk_snapshot_zip): $(foreach d,$(deps),$(call word-colon,1,$(d))) |
| 164 | deps := |
Jae Shin | 893fca6 | 2017-12-28 16:00:10 +0900 | [diff] [blame] | 165 | |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 166 | deps := $(call paths-of-intermediates,$(foreach lib,$(vndk_sp_libs),$(lib):$(subst .vendor,,$(lib)).so),true) |
Jae Shin | 893fca6 | 2017-12-28 16:00:10 +0900 | [diff] [blame] | 167 | $(vndk_snapshot_zip): PRIVATE_VNDK_SP_OUT_2ND := $(vndk_lib_dir_2nd)/shared/vndk-sp |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 168 | $(vndk_snapshot_zip): PRIVATE_VNDK_SP_INTERMEDIATES_2ND := $(deps) |
| 169 | $(vndk_snapshot_zip): $(foreach d,$(deps),$(call word-colon,1,$(d))) |
| 170 | deps := |
Jae Shin | 893fca6 | 2017-12-28 16:00:10 +0900 | [diff] [blame] | 171 | endif |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 172 | |
| 173 | # Args |
| 174 | # $(1): destination directory |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 175 | # $(2): list of files (src:dest) to copy |
| 176 | $(vndk_snapshot_zip): private-copy-intermediates = \ |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 177 | $(if $(2),$(strip \ |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 178 | @mkdir -p $(1) && \ |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 179 | $(foreach file,$(2), \ |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 180 | cp $(call word-colon,1,$(file)) $(call append-path,$(1),$(call word-colon,2,$(file))) && \ |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 181 | ) \ |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 182 | true \ |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 183 | )) |
| 184 | |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 185 | |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 186 | $(vndk_snapshot_zip): $(SOONG_ZIP) |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 187 | @echo 'Generating VNDK snapshot: $@' |
| 188 | @rm -f $@ |
| 189 | @rm -rf $(PRIVATE_VNDK_SNAPSHOT_OUT) |
| 190 | @mkdir -p $(PRIVATE_VNDK_SNAPSHOT_OUT) |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 191 | $(call private-copy-intermediates, \ |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 192 | $(PRIVATE_VNDK_CORE_OUT),$(PRIVATE_VNDK_CORE_INTERMEDIATES)) |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 193 | $(call private-copy-intermediates, \ |
Jae Shin | c13c0ea | 2017-12-04 13:16:21 +0900 | [diff] [blame] | 194 | $(PRIVATE_VNDK_SP_OUT),$(PRIVATE_VNDK_SP_INTERMEDIATES)) |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 195 | $(call private-copy-intermediates, \ |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 196 | $(PRIVATE_CONFIGS_OUT),$(PRIVATE_CONFIGS_INTERMEDIATES)) |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 197 | $(call private-copy-intermediates, \ |
Jae Shin | 410a1af | 2017-12-15 19:35:16 +0900 | [diff] [blame] | 198 | $(PRIVATE_NOTICE_FILES_OUT),$(PRIVATE_NOTICE_FILES_INTERMEDIATES)) |
Jae Shin | 893fca6 | 2017-12-28 16:00:10 +0900 | [diff] [blame] | 199 | ifdef TARGET_2ND_ARCH |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 200 | $(call private-copy-intermediates, \ |
Jae Shin | 893fca6 | 2017-12-28 16:00:10 +0900 | [diff] [blame] | 201 | $(PRIVATE_VNDK_CORE_OUT_2ND),$(PRIVATE_VNDK_CORE_INTERMEDIATES_2ND)) |
Dan Willemsen | 6493118 | 2018-06-17 21:47:18 -0700 | [diff] [blame] | 202 | $(call private-copy-intermediates, \ |
Jae Shin | 893fca6 | 2017-12-28 16:00:10 +0900 | [diff] [blame] | 203 | $(PRIVATE_VNDK_SP_OUT_2ND),$(PRIVATE_VNDK_SP_INTERMEDIATES_2ND)) |
| 204 | endif |
Jae Shin | c13c0ea | 2017-12-04 13:16:21 +0900 | [diff] [blame] | 205 | $(hide) $(SOONG_ZIP) -o $@ -C $(PRIVATE_VNDK_SNAPSHOT_OUT) -D $(PRIVATE_VNDK_SNAPSHOT_OUT) |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 206 | |
| 207 | .PHONY: vndk |
| 208 | vndk: $(vndk_snapshot_zip) |
| 209 | |
| 210 | $(call dist-for-goals, vndk, $(vndk_snapshot_zip)) |
| 211 | |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 212 | # clear global vars |
| 213 | clang-ubsan-vndk-core := |
| 214 | paths-of-intermediates := |
Jae Shin | 410a1af | 2017-12-15 19:35:16 +0900 | [diff] [blame] | 215 | paths-of-notice-files := |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 216 | vndk_core_libs := |
| 217 | vndk_sp_libs := |
| 218 | vndk_snapshot_libs := |
| 219 | vndk_prebuilt_txts := |
| 220 | vndk_snapshot_configs := |
| 221 | vndk_snapshot_top := |
| 222 | vndk_snapshot_out := |
| 223 | vndk_snapshot_configs_out := |
Jae Shin | 893fca6 | 2017-12-28 16:00:10 +0900 | [diff] [blame] | 224 | vndk_snapshot_variant := |
Jae Shin | f20605c | 2018-05-30 21:01:29 +0900 | [diff] [blame] | 225 | binder := |
Jae Shin | 893fca6 | 2017-12-28 16:00:10 +0900 | [diff] [blame] | 226 | vndk_lib_dir := |
| 227 | vndk_lib_dir_2nd := |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 228 | |
Justin Yun | 4dff0c6 | 2018-01-04 10:51:16 +0900 | [diff] [blame] | 229 | else # BOARD_VNDK_RUNTIME_DISABLE is set to 'true' |
| 230 | error_msg := "CANNOT generate VNDK snapshot. BOARD_VNDK_RUNTIME_DISABLE must not be set to 'true'." |
| 231 | endif # BOARD_VNDK_RUNTIME_DISABLE |
| 232 | |
Jae Shin | 0b1792e | 2017-12-21 19:04:13 +0900 | [diff] [blame] | 233 | else # PLATFORM_VNDK_VERSION is NOT set |
Justin Yun | 4dff0c6 | 2018-01-04 10:51:16 +0900 | [diff] [blame] | 234 | error_msg := "CANNOT generate VNDK snapshot. PLATFORM_VNDK_VERSION must be set." |
Jae Shin | 0b1792e | 2017-12-21 19:04:13 +0900 | [diff] [blame] | 235 | endif # PLATFORM_VNDK_VERSION |
| 236 | |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 237 | else # BOARD_VNDK_VERSION is NOT set to 'current' |
Justin Yun | 4dff0c6 | 2018-01-04 10:51:16 +0900 | [diff] [blame] | 238 | error_msg := "CANNOT generate VNDK snapshot. BOARD_VNDK_VERSION must be set to 'current'." |
| 239 | endif # BOARD_VNDK_VERSION |
| 240 | |
| 241 | ifneq (,$(error_msg)) |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 242 | |
| 243 | .PHONY: vndk |
| 244 | vndk: |
Justin Yun | 4dff0c6 | 2018-01-04 10:51:16 +0900 | [diff] [blame] | 245 | $(call echo-error,$(current_makefile),$(error_msg)) |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 246 | exit 1 |
| 247 | |
Justin Yun | 4dff0c6 | 2018-01-04 10:51:16 +0900 | [diff] [blame] | 248 | endif |