make nas depend on nvram
[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 SUBMENU:=Proprietary BCM43xx WiFi driver
25 TITLE:=Kernel driver (normal version)
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 TITLE:=Kernel driver (MIMO version)
34 DESCRIPTION:=Proprietary Wireless driver for the Broadcom BCM43xx chipset (MIMO version)
35 endef
36
37 define Package/wlc
38 $(call Package/kmod-brcm-wl-mimo)
39 DEFAULT:=y
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 DEPENDS:=nvram
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 $(CP) ./files/* $(1)/
104 install -d -m0755 $(1)/sbin
105 install -m0755 $(PKG_BUILD_DIR)/wlc/wlc $(1)/sbin/
106 endef
107
108 define Package/wl/install
109 install -d -m0755 $(1)/usr/sbin
110 install -m0755 $(PKG_BUILD_DIR)/wl $(1)/usr/sbin/
111 endef
112
113 define Package/nas/install
114 install -d -m0755 $(1)/usr/lib
115 install -m0755 $(PKG_BUILD_DIR)/libbcmcrypto.so $(1)/usr/lib/
116 install -d -m0755 $(1)/usr/sbin
117 install -m0755 $(PKG_BUILD_DIR)/nas $(1)/usr/sbin/
118 ln -sf nas $(1)/usr/sbin/nas4not
119 ln -sf nas $(1)/usr/sbin/nas4wds
120 endef
121
122 $(eval $(call BuildPackage,kmod-brcm-wl))
123 $(eval $(call BuildPackage,kmod-brcm-wl-mimo))
124 $(eval $(call BuildPackage,wlc))
125 $(eval $(call BuildPackage,wl))
126 $(eval $(call BuildPackage,nas))
This page took 0.047717 seconds and 5 git commands to generate.