change 'source' to 'download'
[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.9.2
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:=7d9fab2c611369bbe075c3924ea77450
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 TITLE:=Kernel driver (normal version)
32 DESCRIPTION:=Proprietary Wireless driver for the Broadcom BCM43xx chipset
33 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(PKG_RELEASE)
34 endef
35
36 define Package/kmod-brcm-wl-mimo
37 $(call Package/kmod-brcm-wl)
38 DEFAULT:=m if ALL
39 TITLE:=Kernel driver (MIMO version)
40 DESCRIPTION:=Proprietary Wireless driver for the Broadcom BCM43xx chipset (MIMO version)
41 endef
42
43 define Package/wlc
44 $(call Package/kmod-brcm-wl-mimo)
45 DEFAULT:=y
46 DEPENDS:=kmod-brcm-wl
47 TITLE:=Setup utility
48 DESCRIPTION:=Utility for initializing the Broadcom wl driver
49 VERSION:=$(WLC_VERSION)-$(PKG_RELEASE)
50 endef
51
52 define Package/wl
53 $(call Package/wlc)
54 TITLE:=Utility for changing the driver's parameters
55 DESCRIPTION:=Utility for changing the Broadcom wl driver's parameters
56 VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
57 endef
58
59 define Package/nas
60 $(call Package/wl)
61 DEPENDS:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mimo +nvram
62 DEFAULT:=m
63 TITLE:=Proprietary WPA/WPA2 authenticator
64 DESCRIPTION:=Proprietary WPA/WPA2 authenticator for the Broadcom wl driver
65 endef
66
67 define Build/Prepare
68 $(call Build/Prepare/Default)
69 $(CP) src/* $(PKG_BUILD_DIR)/
70 endef
71
72 MAKEFLAGS_KMOD = -C "$(LINUX_DIR)" \
73 CROSS_COMPILE="$(TARGET_CROSS)" \
74 ARCH="$(LINUX_KARCH)" \
75 PATH="$(TARGET_PATH)" \
76 SUBDIRS="$(PKG_BUILD_DIR)/kmod"
77
78
79 define Build/Compile
80 # Compile the kernel part
81 $(MAKE) $(MAKEFLAGS_KMOD) \
82 modules
83 $(MAKE) $(MAKEFLAGS_KMOD) MOD_NAME="_mimo" \
84 modules
85
86 # Compile wlc
87 $(MAKE) -C $(PKG_BUILD_DIR)/wlc \
88 $(TARGET_CONFIGURE_OPTS) \
89 CC="$(TARGET_CC)" \
90 CFLAGS="-I$(PKG_BUILD_DIR)/wlc/include $(TARGET_CFLAGS)" \
91 all
92 endef
93
94 define wl_template
95 install -d -m0755 $(1)/etc/modules.d
96 echo "wl$(2)" > $(1)/etc/modules.d/20-wl$(2)
97 install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION)
98 install -m0644 $(PKG_BUILD_DIR)/kmod/wl$(2).o $(1)/lib/modules/$(LINUX_VERSION)/
99 endef
100
101 define Package/kmod-brcm-wl/install
102 $(call wl_template,$(1))
103 endef
104
105 define Package/kmod-brcm-wl-mimo/install
106 $(call wl_template,$(1),_mimo)
107 endef
108
109 define Package/wlc/install
110 $(CP) ./files/* $(1)/
111 install -d -m0755 $(1)/sbin
112 install -m0755 $(PKG_BUILD_DIR)/wlc/wlc $(1)/sbin/
113 endef
114
115 define Package/wl/install
116 install -d -m0755 $(1)/usr/sbin
117 install -m0755 $(PKG_BUILD_DIR)/wl $(1)/usr/sbin/
118 endef
119
120 define Package/nas/install
121 install -d -m0755 $(1)/usr/lib
122 install -m0755 $(PKG_BUILD_DIR)/libbcmcrypto.so $(1)/usr/lib/
123 install -d -m0755 $(1)/usr/sbin
124 install -m0755 $(PKG_BUILD_DIR)/nas $(1)/usr/sbin/
125 ln -sf nas $(1)/usr/sbin/nas4not
126 ln -sf nas $(1)/usr/sbin/nas4wds
127 endef
128
129 $(eval $(call BuildPackage,kmod-brcm-wl))
130 $(eval $(call BuildPackage,kmod-brcm-wl-mimo))
131 $(eval $(call BuildPackage,wlc))
132 $(eval $(call BuildPackage,wl))
133 $(eval $(call BuildPackage,nas))
This page took 0.048094 seconds and 5 git commands to generate.