Vijay Venkatraman | 43a7f0c | 2016-12-20 17:50:21 +0000 | [diff] [blame] | 1 | |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 2 | #Set LOCAL_USE_VNDK for modules going into vendor or odm partition, except for host modules |
Vijay Venkatraman | 43a7f0c | 2016-12-20 17:50:21 +0000 | [diff] [blame] | 3 | #If LOCAL_SDK_VERSION is set, thats a more restrictive set, so they dont need LOCAL_USE_VNDK |
| 4 | ifndef LOCAL_IS_HOST_MODULE |
| 5 | ifndef LOCAL_SDK_VERSION |
Yifan Hong | 3ca6818 | 2017-06-20 15:06:39 -0700 | [diff] [blame] | 6 | ifneq (,$(filter true,$(LOCAL_VENDOR_MODULE) $(LOCAL_ODM_MODULE) $(LOCAL_OEM_MODULE) $(LOCAL_PROPRIETARY_MODULE))) |
Vijay Venkatraman | 43a7f0c | 2016-12-20 17:50:21 +0000 | [diff] [blame] | 7 | LOCAL_USE_VNDK:=true |
Jiyong Park | 003ea36 | 2017-11-15 18:22:14 +0900 | [diff] [blame] | 8 | # Note: no need to check LOCAL_MODULE_PATH* since LOCAL_[VENDOR|ODM|OEM]_MODULE is already |
| 9 | # set correctly before this is included. |
Vijay Venkatraman | 43a7f0c | 2016-12-20 17:50:21 +0000 | [diff] [blame] | 10 | endif |
| 11 | endif |
| 12 | endif |
| 13 | |
Dan Willemsen | bab0fa6 | 2016-11-18 14:05:39 -0800 | [diff] [blame] | 14 | # Verify LOCAL_USE_VNDK usage, and set LOCAL_SDK_VERSION if necessary |
| 15 | |
| 16 | ifdef LOCAL_IS_HOST_MODULE |
| 17 | ifdef LOCAL_USE_VNDK |
| 18 | $(shell echo $(LOCAL_MODULE_MAKEFILE): $(LOCAL_MODULE): Do not use LOCAL_USE_VNDK with host modules >&2) |
| 19 | $(error done) |
| 20 | endif |
| 21 | endif |
| 22 | ifdef LOCAL_USE_VNDK |
| 23 | ifneq ($(LOCAL_USE_VNDK),true) |
| 24 | $(shell echo '$(LOCAL_MODULE_MAKEFILE): $(LOCAL_MODULE): LOCAL_USE_VNDK must be "true" or empty, not "$(LOCAL_USE_VNDK)"' >&2) |
| 25 | $(error done) |
| 26 | endif |
| 27 | |
| 28 | ifdef LOCAL_SDK_VERSION |
| 29 | $(shell echo $(LOCAL_MODULE_MAKEFILE): $(LOCAL_MODULE): LOCAL_USE_VNDK must not be used with LOCAL_SDK_VERSION >&2) |
| 30 | $(error done) |
| 31 | endif |
| 32 | |
| 33 | # If we're not using the VNDK, drop all restrictions |
| 34 | ifndef BOARD_VNDK_VERSION |
| 35 | LOCAL_USE_VNDK:= |
| 36 | endif |
| 37 | endif |
| 38 | |