Makefile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #
  2. # Copyright (C) 2008-2010 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:=button-hotplug
  10. PKG_RELEASE:=3
  11. PKG_LICENSE:=GPL-2.0
  12. include $(INCLUDE_DIR)/package.mk
  13. define KernelPackage/button-hotplug
  14. SUBMENU:=Other modules
  15. TITLE:=Button Hotplug driver
  16. DEPENDS:=+kmod-input-core
  17. FILES:=$(PKG_BUILD_DIR)/button-hotplug.ko
  18. AUTOLOAD:=$(call AutoLoad,30,button-hotplug,1)
  19. KCONFIG:=
  20. endef
  21. define KernelPackage/button-hotplug/description
  22. Kernel module to generate button uevent-s from input subsystem events.
  23. If your device uses GPIO buttons, see gpio-button-hotplug.
  24. endef
  25. EXTRA_KCONFIG:= \
  26. CONFIG_BUTTON_HOTPLUG=m
  27. EXTRA_CFLAGS:= \
  28. $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
  29. $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
  30. MAKE_OPTS:= \
  31. $(KERNEL_MAKE_FLAGS) \
  32. SUBDIRS="$(PKG_BUILD_DIR)" \
  33. EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
  34. $(EXTRA_KCONFIG)
  35. define Build/Compile
  36. $(MAKE) -C "$(LINUX_DIR)" \
  37. $(MAKE_OPTS) \
  38. modules
  39. endef
  40. $(eval $(call KernelPackage,button-hotplug))