Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Copyright (C) 2012 OpenWrt.org
  2. #
  3. # This is free software, licensed under the GNU General Public License v2.
  4. # See /LICENSE for more information.
  5. include $(TOPDIR)/rules.mk
  6. include $(INCLUDE_DIR)/kernel.mk
  7. PKG_NAME:=ltq-adsl-mei
  8. PKG_RELEASE:=1
  9. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/ltq-adsl-mei-$(BUILD_VARIANT)/
  10. PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
  11. PKG_CHECK_FORMAT_SECURITY:=0
  12. include $(INCLUDE_DIR)/package.mk
  13. define KernelPackage/ltq-adsl-mei-template
  14. SECTION:=sys
  15. CATEGORY:=Kernel modules
  16. SUBMENU:=Network Devices
  17. TITLE:=mei driver for $(1)
  18. URL:=http://www.lantiq.com/
  19. VARIANT:=$(1)
  20. DEPENDS:=@$(2)
  21. FILES:=$(PKG_BUILD_DIR)/ltq_mei_$(1).ko
  22. AUTOLOAD:=$(call AutoLoad,50,ltq_mei_$(1))
  23. endef
  24. KernelPackage/ltq-adsl-danube-mei=$(call KernelPackage/ltq-adsl-mei-template,danube,(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy))
  25. KernelPackage/ltq-adsl-ar9-mei=$(call KernelPackage/ltq-adsl-mei-template,ar9,TARGET_lantiq_xway)
  26. KernelPackage/ltq-adsl-ase-mei=$(call KernelPackage/ltq-adsl-mei-template,ase,TARGET_lantiq_ase)
  27. define Build/Prepare
  28. $(INSTALL_DIR) $(PKG_BUILD_DIR)/
  29. $(CP) ./src/* $(PKG_BUILD_DIR)/
  30. endef
  31. define Build/Configure
  32. endef
  33. define Build/Compile
  34. cd $(LINUX_DIR); \
  35. ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \
  36. $(MAKE) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR)/ V=1 modules
  37. endef
  38. $(eval $(call KernelPackage,ltq-adsl-danube-mei))
  39. $(eval $(call KernelPackage,ltq-adsl-ase-mei))
  40. $(eval $(call KernelPackage,ltq-adsl-ar9-mei))