2 # Copyright (C) 2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 # $Id: Makefile 7440 2007-06-02 02:22:01Z nbd $
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
12 PKG_NAME
:=bcm43xx-mac80211
15 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/$(PKG_NAME
)
17 include $(INCLUDE_DIR
)/package.mk
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
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
27 BUILDFLAGS
+=$(patsubst CONFIG_
%, -DCONFIG_
%, $(MAKE_CONFIGS
))
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 ifneq ($(KERNEL_PATCHVER
),2.6.21)
36 # AUTOLOAD:=$(call AutoLoad,30,bcm43xx-mac80211)
37 FILES
:=$(PKG_BUILD_DIR
)/bcm43xx-mac80211.
$(LINUX_KMOD_SUFFIX
)
42 mkdir
-p
$(PKG_BUILD_DIR
)
43 $(CP
) .
/src
/bcm43xx
/* $(PKG_BUILD_DIR
)/
46 ifneq ($(KERNEL_PATCHVER
),2.6.21)
48 $(MAKE
) $(MAKE_CONFIGS
) -C
"$(LINUX_DIR)" \
49 CROSS_COMPILE
="$(TARGET_CROSS)" \
50 ARCH
="$(LINUX_KARCH)" \
51 EXTRA_CFLAGS
="$(BUILDFLAGS)" \
52 SUBDIRS
="$(PKG_BUILD_DIR)" \
57 $(eval
$(call KernelPackage
,bcm43xx-mac80211
))