X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/d80cb30469c1822c8abc8c4693188dd14180771a..8a7bbf0505829f503fc5e3f0d701237a3aebc896:/package/bcm43xx-mac80211/Makefile diff --git a/package/bcm43xx-mac80211/Makefile b/package/bcm43xx-mac80211/Makefile index d42362043..12520a1f7 100644 --- a/package/bcm43xx-mac80211/Makefile +++ b/package/bcm43xx-mac80211/Makefile @@ -12,42 +12,62 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=bcm43xx-mac80211 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 - 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 +kmod-mac80211 SUBMENU:=Wireless Drivers -# AUTOLOAD:=$(call AutoLoad,30,bcm43xx-mac80211) + TITLE:=Broadcom 43xx wireless support + DEPENDS:=@TARGET_brcm47xx +kmod-mac80211 + KCONFIG:=CONFIG_MAC80211 FILES:=$(PKG_BUILD_DIR)/bcm43xx-mac80211.$(LINUX_KMOD_SUFFIX) +# AUTOLOAD:=$(call AutoLoad,30,bcm43xx-mac80211) +endef + +define KernelPackage/bcm43xx-mac80211/description + Kernel module for Broadcom 43xx wireless support (mac80211) endef +ifneq ($(CONFIG_MAC80211),) + + 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)" \ + 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 - $(MAKE) $(MAKE_CONFIGS) -C "$(LINUX_DIR)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - ARCH="$(LINUX_KARCH)" \ - EXTRA_CFLAGS="$(BUILDFLAGS)" \ - SUBDIRS="$(PKG_BUILD_DIR)" \ - modules +$(call Build/Compile/it) endef $(eval $(call KernelPackage,bcm43xx-mac80211))