netdevices.mk: add hwmon to IGB and IXGBE drivers
[openwrt/staging/wigyori.git] / package / kernel / spi-gpio-custom / 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:=spi-gpio-custom
12 PKG_RELEASE:=1
13
14 include $(INCLUDE_DIR)/package.mk
15
16 define KernelPackage/spi-gpio-custom
17 SUBMENU:=SPI Support
18 TITLE:=Custom GPIO-based SPI device
19 DEPENDS:=@GPIO_SUPPORT +kmod-spi-bitbang +kmod-spi-gpio +kmod-spi-dev
20 FILES:=$(PKG_BUILD_DIR)/spi-gpio-custom.ko
21 KCONFIG:=
22 endef
23
24 define KernelPackage/spi-gpio-custom/description
25 Kernel module for register a custom spi-gpio platform device.
26 endef
27
28 EXTRA_KCONFIG:= \
29 CONFIG_SPI_GPIO_CUSTOM=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 $(KERNEL_MAKE_FLAGS) \
37 SUBDIRS="$(PKG_BUILD_DIR)" \
38 EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
39 $(EXTRA_KCONFIG)
40
41 define Build/Compile
42 $(MAKE) -C "$(LINUX_DIR)" \
43 $(MAKE_OPTS) \
44 modules
45 endef
46
47 $(eval $(call KernelPackage,spi-gpio-custom))