button-hotplug: describe module a bit better & mention gpio-button-hotplug
[openwrt/svn-archive/archive.git] / package / kernel / button-hotplug / Makefile
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
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=button-hotplug
12 PKG_RELEASE:=3
13
14 include $(INCLUDE_DIR)/package.mk
15
16 define KernelPackage/button-hotplug
17 SUBMENU:=Other modules
18 TITLE:=Button Hotplug driver
19 DEPENDS:=+kmod-input-core
20 FILES:=$(PKG_BUILD_DIR)/button-hotplug.ko
21 AUTOLOAD:=$(call AutoLoad,30,button-hotplug,1)
22 KCONFIG:=
23 endef
24
25 define KernelPackage/button-hotplug/description
26 Kernel module to generate button uevent-s from input subsystem events.
27 If your device uses GPIO buttons, see gpio-button-hotplug.
28 endef
29
30 EXTRA_KCONFIG:= \
31 CONFIG_BUTTON_HOTPLUG=m
32
33 EXTRA_CFLAGS:= \
34 $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
35 $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
36
37 MAKE_OPTS:= \
38 ARCH="$(LINUX_KARCH)" \
39 CROSS_COMPILE="$(TARGET_CROSS)" \
40 SUBDIRS="$(PKG_BUILD_DIR)" \
41 EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
42 $(EXTRA_KCONFIG)
43
44 define Build/Prepare
45 mkdir -p $(PKG_BUILD_DIR)
46 $(CP) ./src/* $(PKG_BUILD_DIR)/
47 endef
48
49 define Build/Compile
50 $(MAKE) -C "$(LINUX_DIR)" \
51 $(MAKE_OPTS) \
52 modules
53 endef
54
55 $(eval $(call KernelPackage,button-hotplug))