Makefile 1.4 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. #
  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. PKG_LICENSE:=GPL-2.0+
  13. include $(INCLUDE_DIR)/package.mk
  14. define KernelPackage/ltq-ptm-template
  15. SECTION:=sys
  16. CATEGORY:=Kernel modules
  17. SUBMENU:=Network Devices
  18. TITLE:=ptm driver for $(1)
  19. URL:=http://www.lantiq.com/
  20. VARIANT:=$(1)
  21. DEPENDS:=@TARGET_lantiq_$(2)
  22. ifeq ($(1),vr9)
  23. DEPENDS+= +kmod-ltq-vdsl-vr9-mei
  24. else
  25. DEPENDS+= +kmod-ltq-adsl-$(1)-mei
  26. endif
  27. ifeq ($(1),ase)
  28. DEPENDS+=@BROKEN
  29. endif
  30. FILES:=$(PKG_BUILD_DIR)/ltq_ptm_$(1).ko
  31. endef
  32. KernelPackage/ltq-ptm-danube=$(call KernelPackage/ltq-ptm-template,danube,xway)
  33. KernelPackage/ltq-ptm-ar9=$(call KernelPackage/ltq-ptm-template,ar9,xway)
  34. KernelPackage/ltq-ptm-ase=$(call KernelPackage/ltq-ptm-template,ase,ase)
  35. KernelPackage/ltq-ptm-vr9=$(call KernelPackage/ltq-ptm-template,vr9,xrx200)
  36. define Build/Configure
  37. endef
  38. define Build/Compile
  39. cd $(LINUX_DIR); \
  40. ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \
  41. $(MAKE) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR) V=1 modules
  42. endef
  43. $(eval $(call KernelPackage,ltq-ptm-danube))
  44. $(eval $(call KernelPackage,ltq-ptm-ase))
  45. $(eval $(call KernelPackage,ltq-ptm-ar9))
  46. $(eval $(call KernelPackage,ltq-ptm-vr9))