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