Makefile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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-atm
  8. PKG_RELEASE:=1
  9. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/ltq-atm-$(BUILD_VARIANT)
  10. PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
  11. include $(INCLUDE_DIR)/package.mk
  12. define KernelPackage/ltq-atm-template
  13. SECTION:=sys
  14. CATEGORY:=Kernel modules
  15. SUBMENU:=Network Devices
  16. TITLE:=atm driver for $(1)
  17. URL:=http://www.lantiq.com/
  18. VARIANT:=$(1)
  19. DEPENDS:=@$(2) +kmod-atm +br2684ctl
  20. FILES:=$(PKG_BUILD_DIR)/ltq_atm_$(1).ko
  21. AUTOLOAD:=$(call AutoProbe,ltq_atm_$(1))
  22. endef
  23. KernelPackage/ltq-atm-danube=$(call KernelPackage/ltq-atm-template,danube,(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy))
  24. KernelPackage/ltq-atm-ar9=$(call KernelPackage/ltq-atm-template,ar9,TARGET_lantiq_xway)
  25. KernelPackage/ltq-atm-ase=$(call KernelPackage/ltq-atm-template,ase,TARGET_lantiq_ase)
  26. define KernelPackage/ltq-atm-vr9
  27. $(call KernelPackage/ltq-atm-template,vr9,TARGET_lantiq_xrx200)
  28. AUTOLOAD:=
  29. endef
  30. define Build/Prepare
  31. $(INSTALL_DIR) $(PKG_BUILD_DIR)
  32. $(CP) ./src/* $(PKG_BUILD_DIR)
  33. endef
  34. define Build/Configure
  35. endef
  36. define Build/Compile
  37. cd $(LINUX_DIR); \
  38. ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \
  39. $(MAKE) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR) V=1 modules
  40. endef
  41. $(eval $(call KernelPackage,ltq-atm-danube))
  42. $(eval $(call KernelPackage,ltq-atm-ase))
  43. $(eval $(call KernelPackage,ltq-atm-ar9))
  44. $(eval $(call KernelPackage,ltq-atm-vr9))