9ade13ec6578b2c756b8839daa1f1710427af997
[openwrt-10.03/.git] / package / hostap-driver / 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$
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=hostap-driver
13 PKG_VERSION:=0.4.9
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/
18 PKG_MD5SUM:=c7534dc040ab90218257a78488ecd378
19
20 include $(INCLUDE_DIR)/package.mk
21 ifeq ($(DUMP),)
22   -include $(LINUX_DIR)/.config
23 endif
24
25 define KernelPackage/hostap/Default/2.4
26   VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
27 endef
28 define KernelPackage/hostap/Default/2.6
29   VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)
30 endef
31 define KernelPackage/hostap/Default
32 $(call KernelPackage/hostap/Default/$(KERNEL))
33   SUBMENU:=Wireless Drivers
34   URL:=http://hostap.epitest.fi/
35 endef
36
37 define KernelPackage/hostap/Default/description
38  Host AP is a driver for 802.11b wireless cards based on Intersil 
39  Prism2/2.5/3 chipset. It supports so called Host AP mode that allows the 
40  card to act as an IEEE 802.11 access point.
41 endef
42
43 define KernelPackage/hostap
44 $(call KernelPackage/hostap/Default)
45   DEPENDS:=@PCI_SUPPORT||PCMCIA_SUPPORT +kmod-ieee80211 +kmod-crypto
46   TITLE:=Host AP support for Prism2/2.5/3
47   KCONFIG:=CONFIG_HOSTAP
48 endef
49 define KernelPackage/hostap/2.4
50   DEPENDS:=+kmod-crypto
51   FILES:= \
52         $(PKG_BUILD_DIR)/driver/modules/hostap.$(LINUX_KMOD_SUFFIX) \
53         $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_ccmp.$(LINUX_KMOD_SUFFIX) \
54         $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_tkip.$(LINUX_KMOD_SUFFIX) \
55         $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_wep.$(LINUX_KMOD_SUFFIX)
56   AUTOLOAD:=$(call AutoLoad,60,hostap hostap_crypt_wep hostap_crypt_tkip hostap_crypt_ccmp)
57 endef
58 define KernelPackage/hostap/2.6
59   FILES:= \
60         $(LINUX_DIR)/drivers/net/wireless/hostap/hostap.$(LINUX_KMOD_SUFFIX)
61   AUTOLOAD:=$(call AutoLoad,60,hostap)
62 endef
63
64 define KernelPackage/hostap/description
65 $(call KernelPackage/hostap/Default/description)
66  This package contains the base Host AP driver code that is shared by 
67  different hardware models. You will also need to enable support for 
68  PLX/PCI/CS version of the driver to actually use the driver.
69 endef
70
71 define KernelPackage/hostap-pci
72 $(call KernelPackage/hostap/Default)
73   DEPENDS:=kmod-hostap
74   TITLE:=Host AP driver for PCI adaptors
75   KCONFIG:=CONFIG_HOSTAP_PCI
76   AUTOLOAD:=$(call AutoLoad,60,hostap_pci)
77 endef
78 define KernelPackage/hostap-pci/2.4
79   FILES:= \
80         $(PKG_BUILD_DIR)/driver/modules/hostap_pci.$(LINUX_KMOD_SUFFIX)
81 endef
82 define KernelPackage/hostap-pci/2.6
83   FILES:= \
84         $(LINUX_DIR)/drivers/net/wireless/hostap/hostap_pci.$(LINUX_KMOD_SUFFIX)
85 endef
86
87 define KernelPackage/hostap-pci/description
88 $(call KernelPackage/hostap/Default/description)
89  This package contains the Host AP driver for Prism2.5 PCI adaptors.
90 endef
91
92 define KernelPackage/hostap-plx
93 $(call KernelPackage/hostap/Default)
94   DEPENDS:=kmod-hostap
95   KCONFIG:=CONFIG_HOSTAP_PLX
96   TITLE:=Host AP driver for PLX9052 based PCI adaptors
97   AUTOLOAD:=$(call AutoLoad,60,hostap_plx)
98 endef
99 define KernelPackage/hostap-plx/2.4
100   FILES:= \
101         $(PKG_BUILD_DIR)/driver/modules/hostap_plx.$(LINUX_KMOD_SUFFIX)
102 endef
103 define KernelPackage/hostap-plx/2.6
104   FILES:= \
105         $(LINUX_DIR)/drivers/net/wireless/hostap/hostap_plx.$(LINUX_KMOD_SUFFIX)
106 endef
107
108 define KernelPackage/hostap-plx/description
109 $(call KernelPackage/hostap/Default/description)
110  This package contains the Host AP driver for Prism2/2.5/3 in PLX9052 
111  based PCI adaptors.
112 endef
113
114
115 ifeq ($(KERNEL),2.4)
116   define Build/Compile
117         $(MAKE) -C $(LINUX_DIR)/ \
118                 ARCH="$(LINUX_KARCH)" \
119                 CROSS_COMPILE="$(TARGET_CROSS)" \
120                 SUBDIRS="$(PKG_BUILD_DIR)/driver/modules" \
121                 modules
122   endef
123 else
124   define Build/Prepare
125         mkdir -p $(PKG_BUILD_DIR)
126   endef
127   
128   define Build/Configure
129   endef
130   
131   define Build/Compile
132   endef
133 endif
134
135
136 $(eval $(call KernelPackage,hostap))
137 $(eval $(call KernelPackage,hostap-pci))
138 $(eval $(call KernelPackage,hostap-plx))