2 # Copyright (C) 2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
11 PKG_NAME
:=button-hotplug
14 include $(INCLUDE_DIR
)/package.mk
16 define KernelPackage
/button-hotplug
17 SUBMENU
:=Other modules
18 TITLE
:=Button Hotplug driver
19 FILES
:=$(PKG_BUILD_DIR
)/button-hotplug.
$(LINUX_KMOD_SUFFIX
)
23 define KernelPackage
/button-hotplug
/description
24 Kernel module to generate button hotplug events
28 CONFIG_BUTTON_HOTPLUG
=m
31 $(patsubst CONFIG_
%, -DCONFIG_
%=1, $(patsubst %=m
,%,$(filter %=m
,$(EXTRA_KCONFIG
)))) \
32 $(patsubst CONFIG_
%, -DCONFIG_
%=1, $(patsubst %=y
,%,$(filter %=y
,$(EXTRA_KCONFIG
)))) \
35 ARCH
="$(LINUX_KARCH)" \
36 CROSS_COMPILE
="$(TARGET_CROSS)" \
37 SUBDIRS
="$(PKG_BUILD_DIR)" \
38 EXTRA_CFLAGS
="$(EXTRA_CFLAGS)" \
42 mkdir
-p
$(PKG_BUILD_DIR
)
43 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
47 $(MAKE
) -C
"$(LINUX_DIR)" \
52 $(eval
$(call KernelPackage
,button-hotplug
))