Makefile 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #
  2. # Copyright (C) 2014-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=mwlwifi
  9. PKG_VERSION:=10.3.4.0.git-2017-06-06
  10. PKG_RELEASE=1
  11. PKG_LICENSE:=ISC
  12. PKG_LICENSE_FILES:=
  13. PKG_SOURCE_URL:=https://github.com/kaloz/mwlwifi
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_VERSION:=36bc32767ed89e07c5c83036861d2fa4eb1f8629
  16. PKG_MIRROR_HASH:=d5757303e87c3f800040c289d806b602acde81bffccaa3290f99799bf3651f01
  17. PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/kernel.mk
  20. include $(INCLUDE_DIR)/package.mk
  21. define KernelPackage/mwlwifi
  22. SUBMENU:=Wireless Drivers
  23. TITLE:=Marvell 88W8864 wireless driver
  24. DEPENDS:=+kmod-mac80211 +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +@DRIVER_11W_SUPPORT @PCI_SUPPORT @TARGET_mvebu
  25. FILES:=$(PKG_BUILD_DIR)/mwlwifi.ko
  26. AUTOLOAD:=$(call AutoLoad,50,mac80211 mwlwifi)
  27. endef
  28. NOSTDINC_FLAGS = \
  29. -I$(PKG_BUILD_DIR) \
  30. -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
  31. -I$(STAGING_DIR)/usr/include/mac80211-backport \
  32. -I$(STAGING_DIR)/usr/include/mac80211/uapi \
  33. -I$(STAGING_DIR)/usr/include/mac80211 \
  34. -include backport/backport.h
  35. define Build/Compile
  36. +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
  37. ARCH="$(LINUX_KARCH)" \
  38. CROSS_COMPILE="$(TARGET_CROSS)" \
  39. SUBDIRS="$(PKG_BUILD_DIR)" \
  40. NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
  41. modules
  42. endef
  43. define KernelPackage/mwlwifi/install
  44. $(INSTALL_DIR) $(1)/lib/firmware
  45. $(INSTALL_DIR) $(1)/lib/firmware/mwlwifi
  46. $(CP) $(PKG_BUILD_DIR)/bin/firmware/88W8864.bin $(1)/lib/firmware/mwlwifi/
  47. $(CP) $(PKG_BUILD_DIR)/bin/firmware/88W8897.bin $(1)/lib/firmware/mwlwifi/
  48. $(CP) $(PKG_BUILD_DIR)/bin/firmware/88W8964.bin $(1)/lib/firmware/mwlwifi/
  49. $(CP) $(PKG_BUILD_DIR)/bin/firmware/Marvell_license.txt $(1)/lib/firmware/mwlwifi/
  50. endef
  51. $(eval $(call KernelPackage,mwlwifi))