Makefile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
  2. # The Make variable $(M) must point to the directory that contains the module
  3. # source code (which includes this Makefile). It can either be an absolute or a
  4. # relative path. If it is a relative path, then it must be relative to the
  5. # kernel source directory (KERNEL_SRC). An absolute path can be obtained very
  6. # easily through $(shell pwd). Generating a path relative to KERNEL_SRC is
  7. # difficult and we accept some outside help by letting the caller override the
  8. # variable $(M). Allowing a relative path for $(M) enables us to have the build
  9. # system put output/object files (.o, .ko.) into a directory different from the
  10. # module source directory.
  11. M ?= $(shell pwd)
  12. ifeq ($(WLAN_ROOT),)
  13. KBUILD_OPTIONS += \
  14. WLAN_ROOT=$(KERNEL_SRC)/$(M) \
  15. WLAN_PLATFORM_ROOT=$(KERNEL_SRC)/$(M)/../platform \
  16. WLAN_COMMON_ROOT=cmn \
  17. WLAN_COMMON_INC=$(KERNEL_SRC)/$(M)/cmn \
  18. WLAN_FW_API=$(KERNEL_SRC)/$(M)/../fw-api \
  19. CONFIG_QCA_CLD_WLAN=m \
  20. CONFIG_CNSS_KIWI_V2=y \
  21. CONFIG_CNSS_OUT_OF_TREE=y \
  22. CONFIG_CNSS2=m \
  23. CONFIG_CNSS2_QMI=y \
  24. CONFIG_CNSS_QMI_SVC=m \
  25. CONFIG_CNSS_PLAT_IPC_QMI_SVC=m \
  26. CONFIG_CNSS_GENL=m \
  27. CONFIG_WCNSS_MEM_PRE_ALLOC=m \
  28. CONFIG_CNSS_UTILS=m \
  29. CONFIG_CNSS_HW_SECURE_DISABLE=y \
  30. CONFIG_BUS_AUTO_SUSPEND=y \
  31. WLAN_PROFILE=kiwi_v2 \
  32. DYNAMIC_SINGLE_CHIP=kiwi_v2 \
  33. MODNAME=qca_cld3_kiwi_v2 \
  34. DEVNAME=kiwi_v2 \
  35. BOARD_PLATFORM=pineapple \
  36. WLAN_CTRL_NAME=wlan
  37. endif
  38. KBUILD_OPTIONS += KBUILD_EXTRA_SYMBOLS=$(OUT_DIR)/../sm8650-modules/qcom/opensource/wlan/platform/Module.symvers
  39. all:
  40. $(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)
  41. modules_install:
  42. $(MAKE) INSTALL_MOD_STRIP=1 M=$(M) -C $(KERNEL_SRC) modules_install
  43. clean:
  44. $(MAKE) -C $(KERNEL_SRC) M=$(M) clean $(KBUILD_OPTIONS)