first round of rb532 cleanup
[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.53.0
14 PKG_RELEASE:=1
15 WLC_VERSION:=0.1
16
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
18 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
19 PKG_MD5SUM:=a7d8dde3ce474c361143b83e1d9890b1
20 PKG_CAT:=bzcat
21
22 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/broadcom-wl/Default
27 SECTION:=net
28 CATEGORY:=Kernel drivers
29 DEPENDS:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mimo
30 SUBMENU:=Proprietary BCM43xx WiFi driver
31 SUBMENUDEP:=@LINUX_2_4_BRCM
32 endef
33
34 define Package/kmod-brcm-wl/Default
35 $(call Package/broadcom-wl/Default)
36 SECTION:=kernel
37 DEPENDS:=@LINUX_2_4_BRCM
38 TITLE:=Kernel driver for BCM43xx chipsets
39 DESCRIPTION:=\
40 This package contains the proprietary wireless driver for the Broadcom \\\
41 BCM43xx chipset
42 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(PKG_RELEASE)
43 endef
44
45 define Package/kmod-brcm-wl
46 $(call Package/kmod-brcm-wl/Default)
47 TITLE+= (normal version)
48 DESCRIPTION+= (normal version).
49 endef
50
51 define Package/kmod-brcm-wl-mimo
52 $(call Package/kmod-brcm-wl/Default)
53 TITLE+= (MIMO version)
54 DESCRIPTION+= (MIMO version).
55 endef
56
57 define Package/wlc
58 $(call Package/broadcom-wl/Default)
59 TITLE:=wl driver setup utility
60 DEFAULT:=y
61 DESCRIPTION:=\
62 This package contains an utility for initializing the proprietary Broadcom \\\
63 wl driver.
64 endef
65
66 define Package/wl
67 $(call Package/broadcom-wl/Default)
68 TITLE:=Proprietary Broadcom wl driver config utility
69 DESCRIPTION:=\
70 This package contains the proprietary utility (wl) for configuring the \\\
71 proprietary Broadcom wl driver.
72 endef
73
74 define Package/nas
75 $(call Package/broadcom-wl/Default)
76 DEPENDS+=+nvram
77 DEFAULT:=y
78 TITLE:=Proprietary Broadcom WPA/WPA2 authenticator
79 DESCRIPTION:=\
80 This package contains the proprietary WPA/WPA2 authenticator (nas) for the \\\
81 proprietary Broadcom wl driver.
82 endef
83
84 MAKEFLAGS_KMOD:= -C "$(LINUX_DIR)" \
85 CROSS_COMPILE="$(TARGET_CROSS)" \
86 ARCH="$(LINUX_KARCH)" \
87 PATH="$(TARGET_PATH)" \
88 SUBDIRS="$(PKG_BUILD_DIR)/kmod"
89
90 define Build/Prepare
91 $(call Build/Prepare/Default)
92 $(CP) src/* $(PKG_BUILD_DIR)/
93 endef
94
95 define Build/Compile
96 # Compile the kernel part
97 $(MAKE) $(MAKEFLAGS_KMOD) \
98 modules
99 $(MAKE) $(MAKEFLAGS_KMOD) MOD_NAME="_mimo" \
100 modules
101
102 # Compile wlc
103 $(MAKE) -C $(PKG_BUILD_DIR)/wlc \
104 $(TARGET_CONFIGURE_OPTS) \
105 CFLAGS="-I$(PKG_BUILD_DIR)/wlc/include $(TARGET_CFLAGS)" \
106 all
107 endef
108
109 define wl_template
110 $(INSTALL_DIR) $(1)/etc/modules.d
111 echo "wl$(2)" > $(1)/etc/modules.d/20-wl$(2)
112 $(INSTALL_DIR) $(1)/lib/modules/$(LINUX_VERSION)
113 $(INSTALL_DATA) $(PKG_BUILD_DIR)/kmod/wl$(2).o $(PKG_BUILD_DIR)/kmod/wl$(2).o.patch $(1)/lib/modules/$(LINUX_VERSION)/
114 endef
115
116 define Package/kmod-brcm-wl/install
117 $(call wl_template,$(1))
118 endef
119
120 define Package/kmod-brcm-wl-mimo/install
121 $(call wl_template,$(1),_mimo)
122 endef
123
124 define Package/wlc/install
125 $(CP) ./files/* $(1)/
126 $(INSTALL_DIR) $(1)/sbin
127 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlc/wlc $(1)/sbin/
128 endef
129
130 define Package/wl/install
131 $(INSTALL_DIR) $(1)/usr/sbin
132 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wl $(1)/usr/sbin/
133 endef
134
135 define Package/nas/install
136 $(INSTALL_DIR) $(1)/usr/lib
137 $(INSTALL_BIN) $(PKG_BUILD_DIR)/libbcmcrypto.so $(1)/usr/lib/
138 $(INSTALL_DIR) $(1)/usr/sbin
139 $(INSTALL_BIN) $(PKG_BUILD_DIR)/nas $(1)/usr/sbin/
140 ln -sf nas $(1)/usr/sbin/nas4not
141 ln -sf nas $(1)/usr/sbin/nas4wds
142 endef
143
144 $(eval $(call BuildPackage,kmod-brcm-wl))
145 $(eval $(call BuildPackage,kmod-brcm-wl-mimo))
146 $(eval $(call BuildPackage,wlc))
147 $(eval $(call BuildPackage,wl))
148 $(eval $(call BuildPackage,nas))
This page took 0.043957 seconds and 5 git commands to generate.