bcm43xx-mac80211 fixes:
[openwrt/svn-archive/archive.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 ifeq ($(DUMP),)
19 include $(LINUX_DIR)/.config
20 endif
21
22 define KernelPackage/bcm43xx-mac80211
23 SUBMENU:=Wireless Drivers
24 TITLE:=Broadcom 43xx wireless support
25 DESCRIPTION:=Kernel module for Broadcom 43xx wireless support (mac80211)
26 VERSION:=$(PKG_RELEASE)+$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)
27 DEPENDS:=@LINUX_2_6_BRCM47XX +kmod-mac80211
28 KCONFIG:=CONFIG_MAC80211
29 FILES:=$(PKG_BUILD_DIR)/bcm43xx-mac80211.$(LINUX_KMOD_SUFFIX)
30 # AUTOLOAD:=$(call AutoLoad,30,bcm43xx-mac80211)
31 endef
32
33 ifneq ($(CONFIG_MAC80211),)
34
35 PKG_EXTRA_KCONFIG:= \
36 CONFIG_BCM43XX_MAC80211=m \
37 CONFIG_BCM43XX_MAC80211_PCI=y \
38 CONFIG_BCM43XX_MAC80211_DEBUG=y \
39 CONFIG_BCM43XX_MAC80211_DMA=y \
40 CONFIG_BCM43XX_MAC80211_PIO=y \
41 CONFIG_BCM43XX_MAC80211_DMA_AND_PIO_MODE=y \
42
43 PKG_EXTRA_CFLAGS:= \
44 -I$(STAGING_DIR)/usr/include/mac80211 \
45 $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(PKG_EXTRA_KCONFIG)))) \
46 $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(PKG_EXTRA_KCONFIG)))) \
47
48 define Build/Compile/it
49 $(MAKE) -C "$(LINUX_DIR)" \
50 ARCH="$(LINUX_KARCH)" \
51 CROSS_COMPILE="$(TARGET_CROSS)" \
52 SUBDIRS="$(PKG_BUILD_DIR)" \
53 $(PKG_EXTRA_KCONFIG) \
54 EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS)" \
55 V="$(V)" \
56 modules
57 endef
58
59 endif
60
61 define Build/Prepare
62 mkdir -p $(PKG_BUILD_DIR)
63 $(CP) ./src/bcm43xx/* $(PKG_BUILD_DIR)/
64 endef
65
66 define Build/Configure
67 endef
68
69 define Build/Compile
70 $(call Build/Compile/it)
71 endef
72
73 $(eval $(call KernelPackage,bcm43xx-mac80211))