fix mac80211 build
[openwrt/svn-archive/archive.git] / package / 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:=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/mac80211
23 SUBMENU:=Wireless Drivers
24 TITLE:=DeviceScape 802.11 Wireless Networking Stack
25 DEPENDS:=@LINUX_2_6 +kmod-ieee80211
26 DESCRIPTION:=\
27 This package contains the DeviceScape 80211 wireless stack.
28 VERSION:=$(PKG_RELEASE)+$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)
29 FILES:= \
30 $(PKG_BUILD_DIR)/mac80211/mac80211.$(LINUX_KMOD_SUFFIX) \
31 $(PKG_BUILD_DIR)/mac80211/rc80211_lowest.$(LINUX_KMOD_SUFFIX) \
32 $(PKG_BUILD_DIR)/mac80211/rc80211_simple.$(LINUX_KMOD_SUFFIX) \
33 $(PKG_BUILD_DIR)/wireless/cfg80211.$(LINUX_KMOD_SUFFIX)
34 AUTOLOAD:=$(call AutoLoad,20,cfg80211 mac80211 rc80211_lowest rc80211_simple)
35 endef
36
37 define Build/Prepare
38 mkdir -p $(PKG_BUILD_DIR)/mac80211
39 $(CP) ./src/mac80211/* $(PKG_BUILD_DIR)/mac80211/
40 mkdir -p $(PKG_BUILD_DIR)/wireless
41 $(CP) ./src/wireless/* $(PKG_BUILD_DIR)/wireless/
42 endef
43
44 MAKE_OPTS:=-C "$(LINUX_DIR)" \
45 CROSS_COMPILE="$(TARGET_CROSS)" \
46 ARCH="$(LINUX_KARCH)" \
47 EXTRA_CFLAGS="$(BUILDFLAGS) -DCONFIG_MAC80211_LEDS" \
48 CONFIG_MAC80211=m \
49 CONFIG_MAC80211_LEDS=y
50
51 define Build/Compile
52 $(MAKE) $(MAKE_OPTS) SUBDIRS="$(PKG_BUILD_DIR)/wireless" modules
53 $(MAKE) $(MAKE_OPTS) SUBDIRS="$(PKG_BUILD_DIR)/mac80211" modules
54 endef
55
56 #define Build/InstallDev
57 # mkdir -p $(STAGING_DIR)/usr/include/madwifi
58 # $(CP) $(PKG_BUILD_DIR)/include $(STAGING_DIR)/usr/include/madwifi/
59 # mkdir -p $(STAGING_DIR)/usr/include/madwifi/net80211
60 # $(CP) $(PKG_BUILD_DIR)/net80211/*.h $(STAGING_DIR)/usr/include/madwifi/net80211/
61 #endef
62
63 #define Build/UninstallDev
64 # rm -rf $(STAGING_DIR)/usr/include/madwifi
65 #endef
66
67 $(eval $(call KernelPackage,mac80211))