1 2#Set LOCAL_USE_VNDK for modules going into vendor or odm partition, except for host modules 3#If LOCAL_SDK_VERSION is set, thats a more restrictive set, so they dont need LOCAL_USE_VNDK 4ifndef LOCAL_IS_HOST_MODULE 5ifndef LOCAL_SDK_VERSION 6 ifneq (,$(filter true,$(LOCAL_VENDOR_MODULE) $(LOCAL_ODM_MODULE) $(LOCAL_OEM_MODULE) $(LOCAL_PROPRIETARY_MODULE))) 7 LOCAL_USE_VNDK:=true 8 # Note: no need to check LOCAL_MODULE_PATH* since LOCAL_[VENDOR|ODM|OEM]_MODULE is already 9 # set correctly before this is included. 10 endif 11endif 12endif 13 14# Verify LOCAL_USE_VNDK usage, and set LOCAL_SDK_VERSION if necessary 15 16ifdef 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 21endif 22ifdef 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 37endif 38 39