• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2#Set LOCAL_USE_VNDK for modules going into vendor 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  else
9    ifneq (,$(filter $(TARGET_OUT_VENDOR)%,$(LOCAL_MODULE_PATH) $(LOCAL_MODULE_PATH_32) $(LOCAL_MODULE_PATH_64)))
10      LOCAL_USE_VNDK:=true
11    endif
12  endif
13endif
14endif
15
16# Verify LOCAL_USE_VNDK usage, and set LOCAL_SDK_VERSION if necessary
17
18ifdef LOCAL_IS_HOST_MODULE
19  ifdef LOCAL_USE_VNDK
20    $(shell echo $(LOCAL_MODULE_MAKEFILE): $(LOCAL_MODULE): Do not use LOCAL_USE_VNDK with host modules >&2)
21    $(error done)
22  endif
23endif
24ifdef LOCAL_USE_VNDK
25  ifneq ($(LOCAL_USE_VNDK),true)
26    $(shell echo '$(LOCAL_MODULE_MAKEFILE): $(LOCAL_MODULE): LOCAL_USE_VNDK must be "true" or empty, not "$(LOCAL_USE_VNDK)"' >&2)
27    $(error done)
28  endif
29
30  ifdef LOCAL_SDK_VERSION
31    $(shell echo $(LOCAL_MODULE_MAKEFILE): $(LOCAL_MODULE): LOCAL_USE_VNDK must not be used with LOCAL_SDK_VERSION >&2)
32    $(error done)
33  endif
34
35  # If we're not using the VNDK, drop all restrictions
36  ifndef BOARD_VNDK_VERSION
37    LOCAL_USE_VNDK:=
38  endif
39endif
40
41