Makefile 848 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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:=avila-wdt
  10. PKG_RELEASE:=1
  11. include $(INCLUDE_DIR)/package.mk
  12. define KernelPackage/avila-wdt
  13. SUBMENU:=Other modules
  14. TITLE:=GPIO hardware watchdog driver for modified Avila boards
  15. DEPENDS:=@GPIO_SUPPORT @TARGET_ixp4xx
  16. FILES:=$(PKG_BUILD_DIR)/avila-wdt.ko
  17. AUTOLOAD:=$(call AutoLoad,10,avila-wdt)
  18. endef
  19. MAKE_OPTS:= \
  20. ARCH="$(LINUX_KARCH)" \
  21. CROSS_COMPILE="$(TARGET_CROSS)" \
  22. SUBDIRS="$(PKG_BUILD_DIR)"
  23. define Build/Prepare
  24. mkdir -p $(PKG_BUILD_DIR)
  25. $(CP) ./src/* $(PKG_BUILD_DIR)/
  26. endef
  27. define Build/Compile
  28. $(MAKE) -C "$(LINUX_DIR)" \
  29. $(MAKE_OPTS) \
  30. modules
  31. endef
  32. $(eval $(call KernelPackage,avila-wdt))