Makefile 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ath10k-ct
  3. PKG_RELEASE=1
  4. PKG_LICENSE:=GPLv2
  5. PKG_LICENSE_FILES:=
  6. PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
  7. PKG_SOURCE_PROTO:=git
  8. PKG_SOURCE_DATE:=2017-01-26
  9. PKG_SOURCE_VERSION:=d2bc84ff277936c58231f0c2280242eda4199e63
  10. PKG_MIRROR_HASH:=6b734b987db00b97b06faca686dcebc56fb23b93093afbb35d5cf534987269bf
  11. PKG_MAINTAINER:=Ben Greear <greearb@candelatech.com>
  12. PKG_BUILD_PARALLEL:=1
  13. STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
  14. include $(INCLUDE_DIR)/kernel.mk
  15. include $(INCLUDE_DIR)/package.mk
  16. define KernelPackage/ath10k-ct
  17. SUBMENU:=Wireless Drivers
  18. TITLE:=ath10k-ct driver optimized for CT ath10k firmware
  19. DEPENDS:=+kmod-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT @PCI_SUPPORT +@KERNEL_RELAY +kmod-hwmon-core
  20. FILES:=\
  21. $(PKG_BUILD_DIR)/ath10k/ath10k_pci.ko \
  22. $(PKG_BUILD_DIR)/ath10k/ath10k_core.ko
  23. AUTOLOAD:=$(call AutoLoad,50,mac80211 ath ath10k_core ath10k_pci)
  24. endef
  25. NOSTDINC_FLAGS = \
  26. -I$(PKG_BUILD_DIR) \
  27. -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
  28. -I$(STAGING_DIR)/usr/include/mac80211-backport \
  29. -I$(STAGING_DIR)/usr/include/mac80211/uapi \
  30. -I$(STAGING_DIR)/usr/include/mac80211 \
  31. -include backport/autoconf.h \
  32. -include backport/backport.h
  33. ifdef CONFIG_PACKAGE_MAC80211_MESH
  34. NOSTDINC_FLAGS += -DCONFIG_MAC80211_MESH
  35. endif
  36. CT_MAKEDEFS += CONFIG_ATH10K=m CONFIG_ATH10K_PCI=m
  37. # No AHB support enabled yet. Could conditionally enable it later.
  38. #CT_MAKEDEFS += CONFIG_ATH10K_AHB=y
  39. #NOSTDINC_FLAGS += -DCONFIG_ATH10K_AHB
  40. NOSTDINC_FLAGS += -DSTANDALONE_CT
  41. ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
  42. CT_MAKEDEFS += CONFIG_ATH10K_DEBUGFS=y CONFIG_MAC80211_DEBUGFS=y
  43. NOSTDINC_FLAGS += -DCONFIG_MAC80211_DEBUGFS
  44. NOSTDINC_FLAGS += -DCONFIG_ATH10K_DEBUGFS
  45. endif
  46. ifdef CONFIG_PACKAGE_ATH_DEBUG
  47. NOSTDINC_FLAGS += -DCONFIG_ATH10K_DEBUG
  48. endif
  49. ifdef CONFIG_PACKAGE_ATH_DFS
  50. NOSTDINC_FLAGS += -DCONFIG_ATH10K_DFS_CERTIFIED
  51. endif
  52. define Build/Configure
  53. cp $(STAGING_DIR)/usr/include/mac80211/ath/*.h $(PKG_BUILD_DIR)
  54. endef
  55. ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
  56. CT_MAKEDEFS += V=1
  57. endif
  58. define Build/Compile
  59. +$(MAKE) $(CT_MAKEDEFS) $(PKG_JOBS) -C "$(LINUX_DIR)" \
  60. ARCH="$(LINUX_KARCH)" \
  61. CROSS_COMPILE="$(TARGET_CROSS)" \
  62. SUBDIRS="$(PKG_BUILD_DIR)/ath10k" \
  63. NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
  64. modules
  65. endef
  66. $(eval $(call KernelPackage,ath10k-ct))