1
0

Makefile 1.1 KB

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