Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #
  2. # Copyright (C) 2008-2012 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:=gpio-button-hotplug
  10. PKG_RELEASE:=2
  11. PKG_LICENSE:=GPL-2.0
  12. include $(INCLUDE_DIR)/package.mk
  13. define KernelPackage/gpio-button-hotplug
  14. SUBMENU:=Other modules
  15. TITLE:=Simple GPIO Button Hotplug driver
  16. FILES:=$(PKG_BUILD_DIR)/gpio-button-hotplug.ko
  17. AUTOLOAD:=$(call AutoLoad,30,gpio-button-hotplug,1)
  18. KCONFIG:=
  19. endef
  20. define KernelPackage/gpio-button-hotplug/description
  21. This is a replacement for the following in-kernel drivers:
  22. 1) gpio_keys (KEYBOARD_GPIO)
  23. 2) gpio_keys_polled (KEYBOARD_GPIO_POLLED)
  24. Instead of generating input events (like in-kernel drivers do) it generates
  25. uevent-s and broadcasts them. This allows disabling input subsystem which is
  26. an overkill for OpenWrt simple needs.
  27. endef
  28. MAKE_OPTS:= \
  29. ARCH="$(LINUX_KARCH)" \
  30. CROSS_COMPILE="$(TARGET_CROSS)" \
  31. SUBDIRS="$(PKG_BUILD_DIR)"
  32. define Build/Compile
  33. $(MAKE) -C "$(LINUX_DIR)" \
  34. $(MAKE_OPTS) \
  35. modules
  36. endef
  37. $(eval $(call KernelPackage,gpio-button-hotplug))