[ar71xx] fix dir-825-b1 default network config after r21905
[openwrt.git] / package / broadcom-wl / Makefile
1 #
2 # Copyright (C) 2006-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=broadcom-wl
12 PKG_VERSION:=5.10.56.27.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
17 PKG_MD5SUM:=dfaee8bdafaa4bb5ccbcdfe541c29e7d
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/broadcom-wl/Default
22 SECTION:=kernel
23 CATEGORY:=Kernel modules
24 DEPENDS:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mini
25 SUBMENU:=Proprietary BCM43xx WiFi driver
26 SUBMENUDEP:=@TARGET_brcm47xx
27 endef
28
29 define KernelPackage/brcm-wl/Default
30 $(call Package/broadcom-wl/Default)
31 SECTION:=kernel
32 DEPENDS:=@TARGET_brcm47xx +wireless-tools
33 TITLE:=Kernel driver for BCM43xx chipsets
34 FILES:=$(PKG_BUILD_DIR)/driver$(1)/wl.$(LINUX_KMOD_SUFFIX)
35 AUTOLOAD:=$(call AutoLoad,30,wl)
36 endef
37
38 define KernelPackage/brcm-wl/Default/description
39 This package contains the proprietary wireless driver for the Broadcom
40 BCM43xx chipset.
41 endef
42
43 define KernelPackage/brcm-wl
44 $(call KernelPackage/brcm-wl/Default,)
45 TITLE+= (normal version)
46 endef
47
48 define KernelPackage/brcm-wl/description
49 $(call KernelPackage/brcm-wl/Default/description)
50 endef
51
52 define KernelPackage/brcm-wl-mini
53 $(call KernelPackage/brcm-wl/Default,-mini)
54 TITLE+= (Legacy version)
55 endef
56
57 define KernelPackage/brcm-wl-mini/description
58 $(call KernelPackage/brcm-wl/Default/description)
59 endef
60
61 define Package/wlc
62 $(call Package/broadcom-wl/Default)
63 TITLE:=wl driver setup utility
64 endef
65
66 define Package/wlc/description
67 This package contains an utility for initializing the proprietary Broadcom
68 wl driver.
69 endef
70
71 define Package/wl
72 $(call Package/broadcom-wl/Default)
73 TITLE:=Proprietary Broadcom wl driver config utility
74 endef
75
76 define Package/wl/description
77 This package contains the proprietary utility (wl) for configuring the
78 proprietary Broadcom wl driver.
79 endef
80
81 define Package/nas
82 $(call Package/broadcom-wl/Default)
83 TITLE:=Proprietary Broadcom WPA/WPA2 authenticator
84 endef
85
86 define Package/nas/description
87 This package contains the proprietary WPA/WPA2 authenticator (nas) for the
88 proprietary Broadcom wl driver.
89 endef
90
91 MAKE_KMOD := $(MAKE) -C "$(LINUX_DIR)" \
92 CROSS_COMPILE="$(TARGET_CROSS)" \
93 ARCH="$(LINUX_KARCH)" \
94 PATH="$(TARGET_PATH)" \
95 SUBDIRS="$(PKG_BUILD_DIR)/kmod" \
96
97 define Build/Prepare
98 $(call Build/Prepare/Default)
99 $(CP) $(PKG_BUILD_DIR)/driver $(PKG_BUILD_DIR)/driver-mini
100 endef
101
102 define Build/Compile
103 # Compile the kernel part
104 $(MAKE_KMOD) \
105 SUBDIRS="$(PKG_BUILD_DIR)/driver" \
106 MODFLAGS="-DMODULE -mlong-calls" \
107 modules
108
109 $(MAKE_KMOD) \
110 SUBDIRS="$(PKG_BUILD_DIR)/driver-mini" \
111 MODFLAGS="-DMODULE -mlong-calls" \
112 BUILD_TYPE="wl_apsta_mini" \
113 modules
114
115 # Compile libshared
116 $(MAKE) -C $(PKG_BUILD_DIR)/shared \
117 $(TARGET_CONFIGURE_OPTS) \
118 CFLAGS="$(TARGET_CFLAGS) -I. -I$(PKG_BUILD_DIR)/driver/include" \
119 all
120
121 $(TARGET_CC) -o $(PKG_BUILD_DIR)/wlc \
122 -I$(PKG_BUILD_DIR)/shared -I$(PKG_BUILD_DIR)/driver/include \
123 ./src/wlc.c $(PKG_BUILD_DIR)/shared/libshared.a
124
125 $(TARGET_CC) -o $(PKG_BUILD_DIR)/nas \
126 $(PKG_BUILD_DIR)/nas_exe.o \
127 $(PKG_BUILD_DIR)/shared/libshared.a
128
129 $(TARGET_CC) -o $(PKG_BUILD_DIR)/wl $(PKG_BUILD_DIR)/wl_exe.o
130 endef
131
132 define Build/InstallDev
133 $(INSTALL_DIR) $(1)/usr/lib
134 $(CP) $(PKG_BUILD_DIR)/shared/libshared.a $(1)/usr/lib/
135 endef
136
137 define Package/wlc/install
138 $(CP) ./files/* $(1)/
139 $(INSTALL_DIR) $(1)/sbin
140 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlc $(1)/sbin/
141 endef
142
143 define Package/wl/install
144 $(INSTALL_DIR) $(1)/usr/sbin
145 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wl $(1)/usr/sbin/
146 endef
147
148 define Package/nas/install
149 $(INSTALL_DIR) $(1)/usr/sbin
150 $(INSTALL_BIN) $(PKG_BUILD_DIR)/nas $(1)/usr/sbin/
151 ln -sf nas $(1)/usr/sbin/nas4not
152 ln -sf nas $(1)/usr/sbin/nas4wds
153 endef
154
155 $(eval $(call KernelPackage,brcm-wl))
156 $(eval $(call KernelPackage,brcm-wl-mini))
157 $(eval $(call BuildPackage,wlc))
158 $(eval $(call BuildPackage,wl))
159 $(eval $(call BuildPackage,nas))
This page took 0.047791 seconds and 5 git commands to generate.