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
15 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/$(PKG_NAME
)
17 include $(INCLUDE_DIR
)/package.mk
19 include $(LINUX_DIR
)/.config
22 define KernelPackage
/mac80211
23 SUBMENU
:=Wireless Drivers
24 TITLE
:=Linux
802.11 Wireless Networking Stack
27 This package contains the DeviceScape
80211 wireless stack.
28 VERSION
:=$(PKG_RELEASE
)+$(LINUX_VERSION
)-$(BOARD
)-$(LINUX_RELEASE
)
29 ifneq ($(KERNEL_PATCHVER
),2.6.21)
31 $(PKG_BUILD_DIR
)/mac80211
/mac80211.
$(LINUX_KMOD_SUFFIX
) \
32 $(PKG_BUILD_DIR
)/mac80211
/rc80211_lowest.
$(LINUX_KMOD_SUFFIX
) \
33 $(PKG_BUILD_DIR
)/mac80211
/rc80211_simple.
$(LINUX_KMOD_SUFFIX
) \
34 $(PKG_BUILD_DIR
)/wireless
/cfg80211.
$(LINUX_KMOD_SUFFIX
)
35 AUTOLOAD
:=$(call AutoLoad
,20,cfg80211 mac80211 rc80211_simple
)
40 mkdir
-p
$(PKG_BUILD_DIR
)/mac80211
41 $(CP
) .
/src
/mac80211
/* $(PKG_BUILD_DIR
)/mac80211
/
42 mkdir
-p
$(PKG_BUILD_DIR
)/wireless
43 $(CP
) .
/src
/wireless
/* $(PKG_BUILD_DIR
)/wireless
/
46 MAKE_OPTS
:=-C
"$(LINUX_DIR)" \
47 CROSS_COMPILE
="$(TARGET_CROSS)" \
48 ARCH
="$(LINUX_KARCH)" \
49 EXTRA_CFLAGS
="$(BUILDFLAGS) -DCONFIG_MAC80211_LEDS" \
51 CONFIG_MAC80211_LEDS
=y
53 ifneq ($(KERNEL_PATCHVER
),2.6.21)
55 $(MAKE
) $(MAKE_OPTS
) SUBDIRS
="$(PKG_BUILD_DIR)/wireless" modules
56 $(MAKE
) $(MAKE_OPTS
) SUBDIRS
="$(PKG_BUILD_DIR)/mac80211" modules
60 $(eval
$(call KernelPackage
,mac80211
))