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