Makefile 957 B

123456789101112131415161718192021222324252627282930
  1. KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
  2. M ?= $(shell pwd)
  3. # $(WLAN_PLATFORM_ROOT) has to be a absolute path
  4. ifeq ($(WLAN_PLATFORM_ROOT),)
  5. WLAN_PLATFORM_ROOT = $(shell pwd)
  6. # If it reaches here, compilation is probably without Android.mk,
  7. # so enable all flags (including debug flag CONFIG_CNSS2_DEBUG) by
  8. # default.
  9. KBUILD_OPTIONS := WLAN_PLATFORM_ROOT=$(WLAN_PLATFORM_ROOT)
  10. KBUILD_OPTIONS += CONFIG_CNSS_OUT_OF_TREE=y
  11. KBUILD_OPTIONS += CONFIG_CNSS2=m
  12. KBUILD_OPTIONS += CONFIG_CNSS2_QMI=y
  13. KBUILD_OPTIONS += CONFIG_CNSS2_DEBUG=y
  14. KBUILD_OPTIONS += CONFIG_CNSS_QMI_SVC=m
  15. KBUILD_OPTIONS += CONFIG_CNSS_PLAT_IPC_QMI_SVC=m
  16. KBUILD_OPTIONS += CONFIG_CNSS_GENL=m
  17. KBUILD_OPTIONS += CONFIG_WCNSS_MEM_PRE_ALLOC=m
  18. KBUILD_OPTIONS += CONFIG_CNSS_UTILS=m
  19. endif
  20. all:
  21. $(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)
  22. modules_install:
  23. $(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(M) modules_install
  24. clean:
  25. $(MAKE) -C $(KERNEL_SRC) M=$(M) clean