New: mac80211-based bcm43xx driver from the wireless-dev tree
[openwrt/staging/florian.git] / package / bcm43xx-mac80211 / Makefile
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: Makefile 7440 2007-06-02 02:22:01Z nbd $
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=bcm43xx-mac80211
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
16
17 include $(INCLUDE_DIR)/package.mk
18
19 # This horrible, horrible hack is because I can't work out ow to add
20 # CONFIG_* definitions to a kernel config from an external module dir.
21 # It should come from a proper configuration based on the Kconfig in the src
22 # directory.
23 MAKE_CONFIGS=CONFIG_BCM43XX_MAC80211=m CONFIG_BCM43XX_MAC80211_PCI=y \
24 CONFIG_BCM43XX_MAC80211_DEBUG=y CONFIG_BCM43XX_MAC80211_DMA=y \
25 CONFIG_BCM43XX_MAC80211_PIO=y CONFIG_BCM43XX_MAC80211_DMA_AND_PIO_MODE=y
26
27 BUILDFLAGS+=$(patsubst CONFIG_%, -DCONFIG_%, $(MAKE_CONFIGS))
28
29 define KernelPackage/bcm43xx-mac80211
30 TITLE:=Broadcom 43xx wireless support
31 DESCRIPTION:=Kernel module for Broadcom 43xx wireless support (mac80211)
32 VERSION:=$(PKG_RELEASE)+$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)
33 DEPENDS:=@LINUX_2_6 +kmod-mac80211
34 SUBMENU:=Wireless Drivers
35 # AUTOLOAD:=$(call AutoLoad,30,bcm43xx-mac80211)
36 FILES:=$(PKG_BUILD_DIR)/bcm43xx-mac80211.$(LINUX_KMOD_SUFFIX)
37 endef
38
39 define Build/Prepare
40 mkdir -p $(PKG_BUILD_DIR)
41 $(CP) ./src/bcm43xx/* $(PKG_BUILD_DIR)/
42 endef
43
44 define Build/Compile
45 $(MAKE) $(MAKE_CONFIGS) -C "$(LINUX_DIR)" \
46 CROSS_COMPILE="$(TARGET_CROSS)" \
47 ARCH="$(LINUX_KARCH)" \
48 EXTRA_CFLAGS="$(BUILDFLAGS)" \
49 SUBDIRS="$(PKG_BUILD_DIR)" \
50 modules
51 endef
52
53 $(eval $(call KernelPackage,bcm43xx-mac80211))