Android.mk 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # Android Makefile for WLAN platform modules
  2. # LOCAL_PATH is a relative path to root build directory.
  3. LOCAL_PATH := $(call my-dir)
  4. DLKM_DIR := $(TOP)/device/qcom/common/dlkm
  5. # WLAN_PLATFORM_ROOT needs to be a absolute since it will be used
  6. # for header files. $(TOP) cannot be used here since it will be
  7. # resolved as "." which won't work for Kbuild.
  8. KBUILD_OPTIONS := WLAN_PLATFORM_ROOT=$(abspath $(LOCAL_PATH))
  9. # WLAN_PLATFORM_KBUILD_OPTIONS should be defined from upper level
  10. # Product or Board related Makefiles like wlan.mk.
  11. KBUILD_OPTIONS += $(foreach wlan_platform_kbuild_option, \
  12. $(WLAN_PLATFORM_KBUILD_OPTIONS), \
  13. $(wlan_platform_kbuild_option))
  14. # Sourcing all files is for better incremental compilation.
  15. CNSS_SRC_FILES := \
  16. $(wildcard $(LOCAL_PATH)/*) \
  17. $(wildcard $(LOCAL_PATH)/*/*) \
  18. KBUILD_OPTIONS += KBUILD_EXTRA_SYMBOLS=$(PWD)/$(call intermediates-dir-for,DLKM,sec-module-symvers)/Module.symvers
  19. # Module.symvers needs to be generated as a intermediate module so that
  20. # other modules which depend on WLAN platform modules can set local
  21. # dependencies to it.
  22. ########################### Module.symvers ############################
  23. include $(CLEAR_VARS)
  24. LOCAL_SRC_FILES := $(CNSS_SRC_FILES)
  25. LOCAL_MODULE := wlan-platform-module-symvers
  26. LOCAL_MODULE_STEM := Module.symvers
  27. LOCAL_MODULE_KBUILD_NAME := Module.symvers
  28. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  29. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  30. # Below are for Android build system to recognize each module name, so
  31. # they can be installed properly. Since Kbuild is used to compile these
  32. # modules, invoking any of them will cause other modules to be compiled
  33. # as well if corresponding flags are added in KBUILD_OPTIONS from upper
  34. # level Makefiles like wlan.mk.
  35. ################################ cnss2 ################################
  36. include $(CLEAR_VARS)
  37. LOCAL_REQUIRED_MODULES := sec-module-symvers
  38. LOCAL_ADDITIONAL_DEPENDENCIES += $(call intermediates-dir-for,DLKM,sec-module-symvers)/Module.symvers
  39. LOCAL_SRC_FILES := $(CNSS_SRC_FILES)
  40. LOCAL_MODULE := cnss2.ko
  41. LOCAL_MODULE_KBUILD_NAME := cnss2/cnss2.ko
  42. LOCAL_MODULE_TAGS := optional
  43. LOCAL_MODULE_DEBUG_ENABLE := true
  44. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  45. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  46. ######################## cnss_plat_ipc_qmi_svc ########################
  47. include $(CLEAR_VARS)
  48. LOCAL_SRC_FILES := $(CNSS_SRC_FILES)
  49. LOCAL_MODULE := cnss_plat_ipc_qmi_svc.ko
  50. LOCAL_MODULE_KBUILD_NAME := cnss_utils/cnss_plat_ipc_qmi_svc.ko
  51. LOCAL_MODULE_TAGS := optional
  52. LOCAL_MODULE_DEBUG_ENABLE := true
  53. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  54. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  55. ######################## wlan_firmware_service ########################
  56. include $(CLEAR_VARS)
  57. LOCAL_SRC_FILES := $(CNSS_SRC_FILES)
  58. LOCAL_MODULE := wlan_firmware_service.ko
  59. LOCAL_MODULE_KBUILD_NAME := cnss_utils/wlan_firmware_service.ko
  60. LOCAL_MODULE_TAGS := optional
  61. LOCAL_MODULE_DEBUG_ENABLE := true
  62. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  63. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  64. ############################### cnss_nl ###############################
  65. include $(CLEAR_VARS)
  66. LOCAL_SRC_FILES := $(CNSS_SRC_FILES)
  67. LOCAL_MODULE := cnss_nl.ko
  68. LOCAL_MODULE_KBUILD_NAME := cnss_genl/cnss_nl.ko
  69. LOCAL_MODULE_TAGS := optional
  70. LOCAL_MODULE_DEBUG_ENABLE := true
  71. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  72. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  73. ############################ cnss_prealloc ############################
  74. include $(CLEAR_VARS)
  75. LOCAL_SRC_FILES := $(CNSS_SRC_FILES)
  76. LOCAL_MODULE := cnss_prealloc.ko
  77. LOCAL_MODULE_KBUILD_NAME := cnss_prealloc/cnss_prealloc.ko
  78. LOCAL_MODULE_TAGS := optional
  79. LOCAL_MODULE_DEBUG_ENABLE := true
  80. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  81. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  82. ############################ cnss_utils ###############################
  83. include $(CLEAR_VARS)
  84. LOCAL_SRC_FILES := $(CNSS_SRC_FILES)
  85. LOCAL_MODULE := cnss_utils.ko
  86. LOCAL_MODULE_KBUILD_NAME := cnss_utils/cnss_utils.ko
  87. LOCAL_MODULE_TAGS := optional
  88. LOCAL_MODULE_DEBUG_ENABLE := true
  89. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  90. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  91. ################################ icnss2 ################################
  92. include $(CLEAR_VARS)
  93. LOCAL_SRC_FILES := $(CNSS_SRC_FILES)
  94. LOCAL_MODULE := icnss2.ko
  95. LOCAL_MODULE_KBUILD_NAME := icnss2/icnss2.ko
  96. LOCAL_MODULE_TAGS := optional
  97. LOCAL_MODULE_DEBUG_ENABLE := true
  98. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  99. include $(DLKM_DIR)/Build_external_kernelmodule.mk