Makefile 953 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #
  2. # Copyright (C) 2008 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=wrt55agv2-spidevs
  10. PKG_RELEASE:=1
  11. include $(INCLUDE_DIR)/package.mk
  12. define KernelPackage/wrt55agv2-spidevs
  13. SUBMENU:=Other modules
  14. TITLE:=WRT55AG v2 SPI devices support
  15. DEPENDS:=@TARGET_ath25 +kmod-spi-gpio-old +kmod-spi-ks8995
  16. FILES:=$(PKG_BUILD_DIR)/wrt55agv2_spidevs.ko
  17. endef
  18. define KernelPackage/wrt55agv2-spidevs/description
  19. Kernel module for the SPI devices on the WRT55AG v2 board.
  20. endef
  21. MAKE_OPTS:= \
  22. ARCH="$(LINUX_KARCH)" \
  23. CROSS_COMPILE="$(TARGET_CROSS)" \
  24. SUBDIRS="$(PKG_BUILD_DIR)"
  25. define Build/Prepare
  26. mkdir -p $(PKG_BUILD_DIR)
  27. $(CP) ./src/* $(PKG_BUILD_DIR)/
  28. endef
  29. define Build/Compile
  30. $(MAKE) -C "$(LINUX_DIR)" \
  31. $(MAKE_OPTS) \
  32. modules
  33. endef
  34. $(eval $(call KernelPackage,wrt55agv2-spidevs))