Allow package/switch to compile against 2.6.25
[openwrt.git] / package / wrt55agv2-spidevs / 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:=wrt55agv2-spidevs
12 PKG_RELEASE:=1
13
14 include $(INCLUDE_DIR)/package.mk
15
16 define KernelPackage/wrt55agv2-spidevs
17 SUBMENU:=Other modules
18 TITLE:=WRT55AG v2 SPI devices support
19 DEPENDS:=@LINUX_2_6 @TARGET_atheros +kmod-spi-gpio +kmod-spi-ks8995
20 FILES:=$(PKG_BUILD_DIR)/wrt55agv2_spidevs.$(LINUX_KMOD_SUFFIX)
21 endef
22
23 define KernelPackage/wrt55agv2-spidevs/description
24 Kernel module for the SPI devices on the WRT55AG v2 board.
25 endef
26
27 EXTRA_KCONFIG:= \
28 CONFIG_WRT55AGV2_SPIDEVS=m
29
30 EXTRA_CFLAGS:= \
31 $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
32 $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
33
34 MAKE_OPTS:= \
35 ARCH="$(LINUX_KARCH)" \
36 CROSS_COMPILE="$(TARGET_CROSS)" \
37 SUBDIRS="$(PKG_BUILD_DIR)" \
38 EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
39 LINUXINCLUDE="-I$(LINUX_DIR)/include -include linux/autoconf.h" \
40 $(EXTRA_KCONFIG)
41
42 define Build/Prepare
43 mkdir -p $(PKG_BUILD_DIR)
44 $(CP) ./src/* $(PKG_BUILD_DIR)/
45 endef
46
47 define Build/Compile
48 $(MAKE) -C "$(LINUX_DIR)" \
49 $(MAKE_OPTS) \
50 modules
51 endef
52
53 $(eval $(call KernelPackage,wrt55agv2-spidevs))
This page took 0.041495 seconds and 5 git commands to generate.