button-hotplug does not build for 2.4 kernels
[openwrt.git] / package / button-hotplug / Makefile
1 #
2 # Copyright (C) 2008 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:=1
13
14 include $(INCLUDE_DIR)/package.mk
15
16 define KernelPackage/button-hotplug
17 SUBMENU:=Other modules
18 TITLE:=Button Hotplug driver
19 DEPENDS:=@LINUX_2_6
20 FILES:=$(PKG_BUILD_DIR)/button-hotplug.$(LINUX_KMOD_SUFFIX)
21 KCONFIG:=
22 endef
23
24 define KernelPackage/button-hotplug/description
25 Kernel module to generate button hotplug events
26 endef
27
28 EXTRA_KCONFIG:= \
29 CONFIG_BUTTON_HOTPLUG=m
30
31 EXTRA_CFLAGS:= \
32 $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
33 $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
34
35 MAKE_OPTS:= \
36 ARCH="$(LINUX_KARCH)" \
37 CROSS_COMPILE="$(TARGET_CROSS)" \
38 SUBDIRS="$(PKG_BUILD_DIR)" \
39 EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
40 LINUXINCLUDE="-I$(LINUX_DIR)/include -include linux/autoconf.h" \
41 $(EXTRA_KCONFIG)
42
43 define Build/Prepare
44 mkdir -p $(PKG_BUILD_DIR)
45 $(CP) ./src/* $(PKG_BUILD_DIR)/
46 endef
47
48 define Build/Compile
49 $(MAKE) -C "$(LINUX_DIR)" \
50 $(MAKE_OPTS) \
51 modules
52 endef
53
54 $(eval $(call KernelPackage,button-hotplug))
This page took 0.036195 seconds and 5 git commands to generate.