Make mac80211 compile even if CONFIG_LEDS_TRIGGERS is not defined in the kernel
[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 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:=Linux 802.11 Wireless Networking Stack
25 DEPENDS:=@LINUX_2_6
26 DESCRIPTION:=\
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)
30 FILES:= \
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)
36 endif
37 endef
38
39 define Build/Prepare
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/
44 endef
45
46 MAKE_OPTS:=-C "$(LINUX_DIR)" \
47 CROSS_COMPILE="$(TARGET_CROSS)" \
48 ARCH="$(LINUX_KARCH)" \
49 EXTRA_CFLAGS="$(BUILDFLAGS) -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS" \
50 CONFIG_MAC80211=m \
51 CONFIG_MAC80211_LEDS=y
52
53 ifneq ($(KERNEL_PATCHVER),2.6.21)
54 define Build/Compile
55 $(MAKE) $(MAKE_OPTS) SUBDIRS="$(PKG_BUILD_DIR)/wireless" modules
56 $(MAKE) $(MAKE_OPTS) SUBDIRS="$(PKG_BUILD_DIR)/mac80211" modules
57 endef
58 endif
59
60 $(eval $(call KernelPackage,mac80211))
This page took 0.048627 seconds and 5 git commands to generate.