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 | |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 26 | .PHONY: vndk |
Inseob Kim | 65c91ff | 2019-10-23 15:48:03 +0900 | [diff] [blame^] | 27 | vndk: $(SOONG_VNDK_SNAPSHOT_ZIP) |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 28 | |
Inseob Kim | 65c91ff | 2019-10-23 15:48:03 +0900 | [diff] [blame^] | 29 | $(call dist-for-goals, vndk, $(SOONG_VNDK_SNAPSHOT_ZIP)) |
Jae Shin | 4736dc1 | 2017-11-22 19:25:36 +0900 | [diff] [blame] | 30 | |
Justin Yun | 4dff0c6 | 2018-01-04 10:51:16 +0900 | [diff] [blame] | 31 | else # BOARD_VNDK_RUNTIME_DISABLE is set to 'true' |
| 32 | error_msg := "CANNOT generate VNDK snapshot. BOARD_VNDK_RUNTIME_DISABLE must not be set to 'true'." |
| 33 | endif # BOARD_VNDK_RUNTIME_DISABLE |
| 34 | |
Jae Shin | 0b1792e | 2017-12-21 19:04:13 +0900 | [diff] [blame] | 35 | else # PLATFORM_VNDK_VERSION is NOT set |
Justin Yun | 4dff0c6 | 2018-01-04 10:51:16 +0900 | [diff] [blame] | 36 | error_msg := "CANNOT generate VNDK snapshot. PLATFORM_VNDK_VERSION must be set." |
Jae Shin | 0b1792e | 2017-12-21 19:04:13 +0900 | [diff] [blame] | 37 | endif # PLATFORM_VNDK_VERSION |
| 38 | |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 39 | else # BOARD_VNDK_VERSION is NOT set to 'current' |
Justin Yun | 4dff0c6 | 2018-01-04 10:51:16 +0900 | [diff] [blame] | 40 | error_msg := "CANNOT generate VNDK snapshot. BOARD_VNDK_VERSION must be set to 'current'." |
| 41 | endif # BOARD_VNDK_VERSION |
| 42 | |
| 43 | ifneq (,$(error_msg)) |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 44 | |
| 45 | .PHONY: vndk |
| 46 | vndk: |
Justin Yun | 4dff0c6 | 2018-01-04 10:51:16 +0900 | [diff] [blame] | 47 | $(call echo-error,$(current_makefile),$(error_msg)) |
Jae Shin | e6b7c84 | 2017-10-20 17:46:46 +0900 | [diff] [blame] | 48 | exit 1 |
| 49 | |
Justin Yun | 4dff0c6 | 2018-01-04 10:51:16 +0900 | [diff] [blame] | 50 | endif |