f7428188d37a6729dc8fe3b98973ff7e5abe1ebd
[openwrt.git] / package / broadcom-wl / Makefile
1 #
2 # Copyright (C) 2006 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 2480 2005-11-14 02:07:33Z nbd $
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=broadcom-wl
13 PKG_VERSION:=4.80.17.0
14 PKG_RELEASE:=1
15 WLC_VERSION:=0.1
16
17 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
19 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
20 PKG_MD5SUM:=3183ddb60e3e882b41df1776c89b614c
21 PKG_CAT:=bzcat
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/kmod-brcm-wl
26 SECTION:=drivers
27 CATEGORY:=Drivers
28 DEPENDS:=@LINUX_2_4_BRCM
29 DEFAULT:=y
30 SUBMENU:=Proprietary BCM43xx WiFi driver
31 SUBMENUDEP:=@LINUX_2_4_BRCM
32 TITLE:=Kernel driver (normal version)
33 DESCRIPTION:=Proprietary Wireless driver for the Broadcom BCM43xx chipset
34 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(PKG_RELEASE)
35 endef
36
37 define Package/kmod-brcm-wl-mimo
38 $(call Package/kmod-brcm-wl)
39 DEFAULT:=m if ALL
40 TITLE:=Kernel driver (MIMO version)
41 DESCRIPTION:=Proprietary Wireless driver for the Broadcom BCM43xx chipset (MIMO version)
42 endef
43
44 define Package/wlc
45 $(call Package/kmod-brcm-wl-mimo)
46 DEFAULT:=y
47 DEPENDS:=kmod-brcm-wl
48 TITLE:=Setup utility
49 DESCRIPTION:=Utility for initializing the Broadcom wl driver
50 VERSION:=$(WLC_VERSION)-$(PKG_RELEASE)
51 endef
52
53 define Package/wl
54 $(call Package/wlc)
55 TITLE:=Utility for changing the driver's parameters
56 DESCRIPTION:=Utility for changing the Broadcom wl driver's parameters
57 VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
58 endef
59
60 define Package/nas
61 $(call Package/wl)
62 DEPENDS:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mimo +nvram
63 DEFAULT:=m
64 TITLE:=Proprietary WPA/WPA2 authenticator
65 DESCRIPTION:=Proprietary WPA/WPA2 authenticator for the Broadcom wl driver
66 endef
67
68 define Build/Prepare
69 $(call Build/Prepare/Default)
70 $(CP) src/* $(PKG_BUILD_DIR)/
71 endef
72
73 MAKEFLAGS_KMOD = -C "$(LINUX_DIR)" \
74 CROSS_COMPILE="$(TARGET_CROSS)" \
75 ARCH="$(LINUX_KARCH)" \
76 PATH="$(TARGET_PATH)" \
77 SUBDIRS="$(PKG_BUILD_DIR)/kmod"
78
79
80 define Build/Compile
81 # Compile the kernel part
82 $(MAKE) $(MAKEFLAGS_KMOD) \
83 modules
84 $(MAKE) $(MAKEFLAGS_KMOD) MOD_NAME="_mimo" \
85 modules
86
87 # Compile wlc
88 $(MAKE) -C $(PKG_BUILD_DIR)/wlc \
89 $(TARGET_CONFIGURE_OPTS) \
90 CC="$(TARGET_CC)" \
91 CFLAGS="-I$(PKG_BUILD_DIR)/wlc/include $(TARGET_CFLAGS)" \
92 all
93 endef
94
95 define wl_template
96 install -d -m0755 $(1)/etc/modules.d
97 echo "wl$(2)" > $(1)/etc/modules.d/20-wl$(2)
98 install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION)
99 install -m0644 $(PKG_BUILD_DIR)/kmod/wl$(2).o $(PKG_BUILD_DIR)/kmod/wl$(2).o.patch $(1)/lib/modules/$(LINUX_VERSION)/
100 endef
101
102 define Package/kmod-brcm-wl/install
103 $(call wl_template,$(1))
104 endef
105
106 define Package/kmod-brcm-wl-mimo/install
107 $(call wl_template,$(1),_mimo)
108 endef
109
110 define Package/wlc/install
111 $(CP) ./files/* $(1)/
112 install -d -m0755 $(1)/sbin
113 install -m0755 $(PKG_BUILD_DIR)/wlc/wlc $(1)/sbin/
114 endef
115
116 define Package/wl/install
117 install -d -m0755 $(1)/usr/sbin
118 install -m0755 $(PKG_BUILD_DIR)/wl $(1)/usr/sbin/
119 endef
120
121 define Package/nas/install
122 install -d -m0755 $(1)/usr/lib
123 install -m0755 $(PKG_BUILD_DIR)/libbcmcrypto.so $(1)/usr/lib/
124 install -d -m0755 $(1)/usr/sbin
125 install -m0755 $(PKG_BUILD_DIR)/nas $(1)/usr/sbin/
126 ln -sf nas $(1)/usr/sbin/nas4not
127 ln -sf nas $(1)/usr/sbin/nas4wds
128 endef
129
130 $(eval $(call BuildPackage,kmod-brcm-wl))
131 $(eval $(call BuildPackage,kmod-brcm-wl-mimo))
132 $(eval $(call BuildPackage,wlc))
133 $(eval $(call BuildPackage,wl))
134 $(eval $(call BuildPackage,nas))
This page took 0.048816 seconds and 3 git commands to generate.