Android.mk 1.1 KB

1234567891011121314151617181920212223242526272829
  1. # Use this by setting
  2. # LOCAL_HEADER_LIBRARIES := audio_kernel_headers
  3. LOCAL_PATH := $(call my-dir)
  4. MYLOCAL_PATH := $(LOCAL_PATH)
  5. UAPI_OUT := $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/include
  6. AUDIO_KERNEL_HEADERS := $(call all-named-files-under,*.h,linux) $(call all-named-files-under,*.h,sound)
  7. HEADER_INSTALL_DIR := kernel/msm-$(TARGET_KERNEL_VERSION)/scripts
  8. BUILD_ROOT_RELATIVE := ../../../../../../../
  9. include $(CLEAR_VARS)
  10. LOCAL_MODULE := audio_kernel_headers
  11. LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_PREBUILT_INT_KERNEL)
  12. GEN := $(addprefix $(UAPI_OUT)/,$(AUDIO_KERNEL_HEADERS))
  13. $(GEN): $(KERNEL_USR)
  14. $(GEN): PRIVATE_PATH := $(MYLOCAL_PATH)
  15. $(GEN): PRIVATE_CUSTOM_TOOL = $(shell cd $(PRODUCT_OUT)/obj/KERNEL_OBJ; $(BUILD_ROOT_RELATIVE)$(HEADER_INSTALL_DIR)/headers_install.sh $(BUILD_ROOT_RELATIVE)$(dir $@) $(BUILD_ROOT_RELATIVE)$(subst $(UAPI_OUT),$(MYLOCAL_PATH),$(dir $@)) $(notdir $@))
  16. $(GEN): $(addprefix $(MYLOCAL_PATH)/,$(AUDIO_KERNEL_HEADERS))
  17. $(transform-generated-source)
  18. LOCAL_GENERATED_SOURCES := $(GEN)
  19. LOCAL_EXPORT_C_INCLUDE_DIRS := $(UAPI_OUT)
  20. include $(BUILD_HEADER_LIBRARY)