bbc8a6ca4890a672e88a63181dcf73acfa24ef12
[openwrt.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 include $(INCLUDE_DIR)/package.mk
16 ifeq ($(DUMP),)
17 include $(LINUX_DIR)/.config
18 endif
19
20 define KernelPackage/mac80211
21 SUBMENU:=Wireless Drivers
22 TITLE:=Linux 802.11 Wireless Networking Stack
23 DEPENDS:=@LINUX_2_6 +kmod-crypto-arc4 +kmod-crypto-aes
24 FILES:= \
25 $(PKG_BUILD_DIR)/mac80211/mac80211.$(LINUX_KMOD_SUFFIX) \
26 $(PKG_BUILD_DIR)/mac80211/rc80211_simple.$(LINUX_KMOD_SUFFIX) \
27 $(PKG_BUILD_DIR)/wireless/cfg80211.$(LINUX_KMOD_SUFFIX)
28 AUTOLOAD:=$(call AutoLoad,20,cfg80211 mac80211 rc80211_simple)
29 endef
30
31 define KernelPackage/mac80211/description
32 Linux 802.11 Wireless Networking Stack
33 endef
34
35 CONFOPTS:=MAC80211 CFG80211
36
37 BUILDFLAGS:= \
38 $(foreach opt,$(CONFOPTS),-DCONFIG_$(opt) ) \
39 $(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS -DCONFIG_NL80211)
40
41 MAKE_OPTS:= \
42 CROSS_COMPILE="$(TARGET_CROSS)" \
43 ARCH="$(LINUX_KARCH)" \
44 EXTRA_CFLAGS="$(BUILDFLAGS)" \
45 $(foreach opt,$(CONFOPTS),CONFIG_$(opt)=m) \
46 CONFIG_NL80211=y \
47 CONFIG_MAC80211_LEDS=$(CONFIG_LEDS_TRIGGERS) \
48 LINUXINCLUDE="-I${CURDIR}/src/include -I$(LINUX_DIR)/include -include linux/autoconf.h" \
49
50 ifneq ($(findstring 2.6.23,$(LINUX_VERSION)),)
51 define Build/Prepare
52 mkdir -p $(PKG_BUILD_DIR)/mac80211
53 $(CP) ./src/mac80211/* $(PKG_BUILD_DIR)/mac80211/
54 mkdir -p $(PKG_BUILD_DIR)/wireless
55 $(CP) ./src/wireless/* $(PKG_BUILD_DIR)/wireless/
56 endef
57
58 define Build/Compile
59 $(MAKE) -C "$(LINUX_DIR)" $(MAKE_OPTS) SUBDIRS="$(PKG_BUILD_DIR)/wireless" modules
60 $(MAKE) -C "$(LINUX_DIR)" $(MAKE_OPTS) SUBDIRS="$(PKG_BUILD_DIR)/mac80211" modules
61 endef
62
63 define Build/InstallDev
64 mkdir -p $(1)/usr/include/mac80211
65 $(CP) ./src/include/* $(1)/usr/include/mac80211/
66 endef
67
68 define Build/UninstallDev
69 rm -rf $(1)/usr/include/mac80211
70 endef
71
72 define KernelPackage/mac80211/install
73 $(INSTALL_DIR) $(1)/lib/wifi
74 $(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
75 endef
76 else
77 override CONFIG_PACKAGE_kmod-mac80211=
78 endif
79
80 $(eval $(call KernelPackage,mac80211))
This page took 0.051302 seconds and 3 git commands to generate.