summaryrefslogtreecommitdiffstats
path: root/package/bcm43xx-mac80211/Makefile
diff options
context:
space:
mode:
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-08-30 14:19:31 +0000
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-08-30 14:19:31 +0000
commite9974cca57794b61791026750e14d76065ea5d49 (patch)
tree31c2f0edd6435ccd5424c4f06d7a114aeed6aeee /package/bcm43xx-mac80211/Makefile
parentf84043cb6a26b0761008efa98fe9d52fd2dc63c6 (diff)
bcm43xx-mac80211 fixes:
* make build depends on in-kernel mac80211 support * rework kconfig hack git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8544 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/bcm43xx-mac80211/Makefile')
-rw-r--r--package/bcm43xx-mac80211/Makefile62
1 files changed, 39 insertions, 23 deletions
diff --git a/package/bcm43xx-mac80211/Makefile b/package/bcm43xx-mac80211/Makefile
index e3cbc2c23..8566bf4e4 100644
--- a/package/bcm43xx-mac80211/Makefile
+++ b/package/bcm43xx-mac80211/Makefile
@@ -15,43 +15,59 @@ PKG_RELEASE:=1
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
-
-# This horrible, horrible hack is because I can't work out ow to add
-# CONFIG_* definitions to a kernel config from an external module dir.
-# It should come from a proper configuration based on the Kconfig in the src
-# directory.
-MAKE_CONFIGS=CONFIG_BCM43XX_MAC80211=m CONFIG_BCM43XX_MAC80211_PCI=y \
- CONFIG_BCM43XX_MAC80211_DEBUG=y CONFIG_BCM43XX_MAC80211_DMA=y \
- CONFIG_BCM43XX_MAC80211_PIO=y CONFIG_BCM43XX_MAC80211_DMA_AND_PIO_MODE=y
-
-BUILDFLAGS+=$(patsubst CONFIG_%, -DCONFIG_%, $(MAKE_CONFIGS))
+ifeq ($(DUMP),)
+ include $(LINUX_DIR)/.config
+endif
define KernelPackage/bcm43xx-mac80211
+ SUBMENU:=Wireless Drivers
TITLE:=Broadcom 43xx wireless support
DESCRIPTION:=Kernel module for Broadcom 43xx wireless support (mac80211)
VERSION:=$(PKG_RELEASE)+$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)
DEPENDS:=@LINUX_2_6_BRCM47XX +kmod-mac80211
- SUBMENU:=Wireless Drivers
- ifneq ($(KERNEL_PATCHVER),2.6.21)
+ KCONFIG:=CONFIG_MAC80211
+ FILES:=$(PKG_BUILD_DIR)/bcm43xx-mac80211.$(LINUX_KMOD_SUFFIX)
# AUTOLOAD:=$(call AutoLoad,30,bcm43xx-mac80211)
- FILES:=$(PKG_BUILD_DIR)/bcm43xx-mac80211.$(LINUX_KMOD_SUFFIX)
- endif
endef
-define Build/Prepare
- mkdir -p $(PKG_BUILD_DIR)
- $(CP) ./src/bcm43xx/* $(PKG_BUILD_DIR)/
-endef
+ifneq ($(CONFIG_MAC80211),)
-ifneq ($(KERNEL_PATCHVER),2.6.21)
- define Build/Compile
- $(MAKE) $(MAKE_CONFIGS) -C "$(LINUX_DIR)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ PKG_EXTRA_KCONFIG:= \
+ CONFIG_BCM43XX_MAC80211=m \
+ CONFIG_BCM43XX_MAC80211_PCI=y \
+ CONFIG_BCM43XX_MAC80211_DEBUG=y \
+ CONFIG_BCM43XX_MAC80211_DMA=y \
+ CONFIG_BCM43XX_MAC80211_PIO=y \
+ CONFIG_BCM43XX_MAC80211_DMA_AND_PIO_MODE=y \
+
+ PKG_EXTRA_CFLAGS:= \
+ -I$(STAGING_DIR)/usr/include/mac80211 \
+ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(PKG_EXTRA_KCONFIG)))) \
+ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(PKG_EXTRA_KCONFIG)))) \
+
+ define Build/Compile/it
+ $(MAKE) -C "$(LINUX_DIR)" \
ARCH="$(LINUX_KARCH)" \
- EXTRA_CFLAGS="$(BUILDFLAGS)" \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)" \
+ $(PKG_EXTRA_KCONFIG) \
+ EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS)" \
+ V="$(V)" \
modules
endef
+
endif
+define Build/Prepare
+ mkdir -p $(PKG_BUILD_DIR)
+ $(CP) ./src/bcm43xx/* $(PKG_BUILD_DIR)/
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+$(call Build/Compile/it)
+endef
+
$(eval $(call KernelPackage,bcm43xx-mac80211))