Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. #
  6. include $(TOPDIR)/rules.mk
  7. include $(INCLUDE_DIR)/kernel.mk
  8. PKG_NAME:=ltq-ptm
  9. PKG_RELEASE:=1
  10. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/ltq-ptm-$(BUILD_VARIANT)
  11. PKG_MAINTAINER:=John Crispin <john@phrozen.org>
  12. include $(INCLUDE_DIR)/package.mk
  13. define KernelPackage/ltq-ptm-template
  14. SECTION:=sys
  15. CATEGORY:=Kernel modules
  16. SUBMENU:=Network Devices
  17. TITLE:=ptm driver for $(1)
  18. URL:=http://www.lantiq.com/
  19. VARIANT:=$(1)
  20. DEPENDS:=@TARGET_lantiq_$(2)
  21. FILES:=$(PKG_BUILD_DIR)/ltq_ptm_$(1).ko
  22. endef
  23. KernelPackage/ltq-ptm-danube=$(call KernelPackage/ltq-ptm-template,danube,xway)
  24. KernelPackage/ltq-ptm-ar9=$(call KernelPackage/ltq-ptm-template,ar9,xway)
  25. KernelPackage/ltq-ptm-ase=$(call KernelPackage/ltq-ptm-template,ase,ase)
  26. KernelPackage/ltq-ptm-vr9=$(call KernelPackage/ltq-ptm-template,vr9,xrx200)
  27. define Build/Configure
  28. endef
  29. define Build/Compile
  30. cd $(LINUX_DIR); \
  31. ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \
  32. $(MAKE) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR) V=1 modules
  33. endef
  34. $(eval $(call KernelPackage,ltq-ptm-danube))
  35. $(eval $(call KernelPackage,ltq-ptm-ase))
  36. $(eval $(call KernelPackage,ltq-ptm-ar9))
  37. $(eval $(call KernelPackage,ltq-ptm-vr9))