Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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-hcd
  8. PKG_RELEASE:=1
  9. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/ltq-hcd-$(BUILD_VARIANT)
  10. PKG_USE_MIPS16:=0
  11. PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
  12. include $(INCLUDE_DIR)/package.mk
  13. define KernelPackage/ltq-hcd-template
  14. SECTION:=sys
  15. CATEGORY:=Kernel modules
  16. SUBMENU:=USB Support
  17. TITLE:=USB driver for $(1)
  18. URL:=http://www.lantiq.com/
  19. VARIANT:=$(1)
  20. DEPENDS:=@TARGET_lantiq_$(2) +kmod-usb-core
  21. FILES:=$(PKG_BUILD_DIR)/ltq_hcd_$(1).ko
  22. AUTOLOAD:=$(call AutoProbe,ltq_hcd_$(1),1)
  23. endef
  24. KernelPackage/ltq-hcd-ase=$(call KernelPackage/ltq-hcd-template,ase,ase)
  25. KernelPackage/ltq-hcd-danube=$(call KernelPackage/ltq-hcd-template,danube,xway)
  26. KernelPackage/ltq-hcd-ar9=$(call KernelPackage/ltq-hcd-template,ar9,xway)
  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-hcd-ase))
  39. $(eval $(call KernelPackage,ltq-hcd-danube))
  40. $(eval $(call KernelPackage,ltq-hcd-ar9))