Makefile 2.3 KB

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