[cosmetic] adjust release numbers for upcoming 8.09.1
[openwrt/svn-archive/archive.git] / package / broadcom-wl / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=broadcom-wl
12 PKG_VERSION:=4.150.10.5.3
13 PKG_RELEASE:=3.1
14 WLC_VERSION:=0.1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
18 PKG_MD5SUM:=cc615fd49719eea8bce5b2a8813783f3
19
20 WL_WEXT=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/broadcom-wl/Default
25 SECTION:=kernel
26 CATEGORY:=Kernel modules
27 DEPENDS:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mimo
28 SUBMENU:=Proprietary BCM43xx WiFi driver
29 SUBMENUDEP:=@TARGET_brcm_2_4
30 endef
31
32 define KernelPackage/brcm-wl/Default
33 $(call Package/broadcom-wl/Default)
34 SECTION:=kernel
35 DEPENDS:=@TARGET_brcm_2_4 +wireless-tools
36 TITLE:=Kernel driver for BCM43xx chipsets
37 FILES:=$(PKG_BUILD_DIR)/driver/wl$(1).o
38 AUTOLOAD:=$(call AutoLoad,30,wl$(1))
39 endef
40
41 define KernelPackage/brcm-wl/Default/description
42 This package contains the proprietary wireless driver for the Broadcom
43 BCM43xx chipset.
44 endef
45
46 define KernelPackage/brcm-wl
47 $(call KernelPackage/brcm-wl/Default,)
48 TITLE+= (normal version)
49 endef
50
51 define KernelPackage/brcm-wl/description
52 $(call KernelPackage/brcm-wl/Default/description)
53 endef
54
55 define KernelPackage/brcm-wl-mimo
56 $(call KernelPackage/brcm-wl/Default,_mimo)
57 TITLE+= (MIMO version)
58 endef
59
60 define KernelPackage/brcm-wl-mimo/description
61 $(call KernelPackage/brcm-wl/Default/description)
62 endef
63
64 define KernelPackage/wlcompat/Default
65 $(call KernelPackage/brcm-wl/Default,)
66 TITLE:=Kernel driver for BCM43xx chipsets
67 FILES:=$(PKG_BUILD_DIR)/wlcompat/wlcompat$(1).o
68 endef
69
70 define KernelPackage/wlcompat
71 $(call KernelPackage/wlcompat/Default,)
72 AUTOLOAD:=$(call AutoLoad,50,wlcompat)
73 endef
74
75 define KernelPackage/wlcompat/description
76 This package contains a wrapper module, that provides Wireless Extension
77 support for the proprietary Broadcom wl module.
78 endef
79
80 define KernelPackage/wlcompat-debug
81 $(call KernelPackage/wlcompat/Default,-debug)
82 TITLE+= (debug)
83 AUTOLOAD:=
84 endef
85
86 define KernelPackage/wlcompat-debug/description
87 $(call KernelPackage/wlcompat/description)
88 This is the debugging version.
89 endef
90
91 define Package/wlc
92 $(call Package/broadcom-wl/Default)
93 TITLE:=wl driver setup utility
94 endef
95
96 define Package/wlc/description
97 This package contains an utility for initializing the proprietary Broadcom
98 wl driver.
99 endef
100
101 define Package/wl
102 $(call Package/broadcom-wl/Default)
103 DEPENDS+= +nvram
104 TITLE:=Proprietary Broadcom wl driver config utility
105 endef
106
107 define Package/wl/description
108 This package contains the proprietary utility (wl) for configuring the
109 proprietary Broadcom wl driver.
110 endef
111
112 define Package/nas
113 $(call Package/broadcom-wl/Default)
114 DEPENDS+= +nvram
115 TITLE:=Proprietary Broadcom WPA/WPA2 authenticator
116 endef
117
118 define Package/nas/description
119 This package contains the proprietary WPA/WPA2 authenticator (nas) for the
120 proprietary Broadcom wl driver.
121 endef
122
123 MAKE_KMOD := $(MAKE) -C "$(LINUX_DIR)" \
124 CROSS_COMPILE="$(TARGET_CROSS)" \
125 ARCH="$(LINUX_KARCH)" \
126 PATH="$(TARGET_PATH)" \
127 SUBDIRS="$(PKG_BUILD_DIR)/kmod"
128
129 define Build/Prepare
130 $(call Build/Prepare/Default)
131 $(CP) src/* $(PKG_BUILD_DIR)/
132 endef
133
134 define Build/Compile
135 # Compile the kernel part
136 $(MAKE_KMOD) \
137 SUBDIRS="$(PKG_BUILD_DIR)/driver" \
138 modules
139 $(MAKE_KMOD) \
140 SUBDIRS="$(PKG_BUILD_DIR)/driver" \
141 MOD_NAME="_mimo" \
142 modules
143 $(MAKE_KMOD) \
144 SUBDIRS="$(PKG_BUILD_DIR)/wlcompat" \
145 $(if $(WL_WEXT),WL_WEXT=1) \
146 modules
147 $(MAKE_KMOD) \
148 SUBDIRS="$(PKG_BUILD_DIR)/wlcompat" \
149 DEBUG=1 \
150 $(if $(WL_WEXT),WL_WEXT=1) \
151 modules
152
153 # Compile wlc
154 $(MAKE) -C $(PKG_BUILD_DIR)/wlc \
155 $(TARGET_CONFIGURE_OPTS) \
156 CFLAGS="$(TARGET_CFLAGS)" \
157 all
158 # Compile libshared
159 $(MAKE) -C $(PKG_BUILD_DIR)/router/shared \
160 $(TARGET_CONFIGURE_OPTS) \
161 CFLAGS="$(TARGET_CFLAGS) -I. -I$(PKG_BUILD_DIR)/include -Dlinux=1" \
162 all
163 $(TARGET_CC) -o $(PKG_BUILD_DIR)/nas $(PKG_BUILD_DIR)/nas_exe.o -L$(STAGING_DIR)/usr/lib -lnvram $(PKG_BUILD_DIR)/router/shared/libshared.a
164 $(TARGET_CC) -o $(PKG_BUILD_DIR)/wl $(PKG_BUILD_DIR)/wl_exe.o
165 endef
166
167 define Build/InstallDev
168 $(INSTALL_DIR) $(1)/usr/lib
169 $(CP) $(PKG_BUILD_DIR)/router/shared/libshared.a $(1)/usr/lib/
170 endef
171
172 define Package/wlc/install
173 $(CP) ./files/* $(1)/
174 $(INSTALL_DIR) $(1)/sbin
175 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlc/wlc $(1)/sbin/
176 endef
177
178 define Package/wl/install
179 $(INSTALL_DIR) $(1)/usr/sbin
180 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wl $(1)/usr/sbin/
181 endef
182
183 define Package/nas/install
184 $(INSTALL_DIR) $(1)/usr/sbin
185 $(INSTALL_BIN) $(PKG_BUILD_DIR)/nas $(1)/usr/sbin/
186 ln -sf nas $(1)/usr/sbin/nas4not
187 ln -sf nas $(1)/usr/sbin/nas4wds
188 endef
189
190 $(eval $(call KernelPackage,brcm-wl))
191 $(eval $(call KernelPackage,brcm-wl-mimo))
192 $(eval $(call KernelPackage,wlcompat))
193 $(eval $(call KernelPackage,wlcompat-debug))
194 $(eval $(call BuildPackage,wlc))
195 $(eval $(call BuildPackage,wl))
196 $(eval $(call BuildPackage,nas))