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. include $(INCLUDE_DIR)/package.mk
  12. define KernelPackage/button-hotplug
  13. SUBMENU:=Other modules
  14. TITLE:=Button Hotplug driver
  15. DEPENDS:=+kmod-input-core
  16. FILES:=$(PKG_BUILD_DIR)/button-hotplug.ko
  17. AUTOLOAD:=$(call AutoLoad,30,button-hotplug,1)
  18. KCONFIG:=
  19. endef
  20. define KernelPackage/button-hotplug/description
  21. Kernel module to generate button uevent-s from input subsystem events.
  22. If your device uses GPIO buttons, see gpio-button-hotplug.
  23. endef
  24. EXTRA_KCONFIG:= \
  25. CONFIG_BUTTON_HOTPLUG=m
  26. EXTRA_CFLAGS:= \
  27. $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
  28. $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
  29. MAKE_OPTS:= \
  30. ARCH="$(LINUX_KARCH)" \
  31. CROSS_COMPILE="$(TARGET_CROSS)" \
  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))