new (last?) attempt at standardizing Makefiles
[openwrt.git] / package / hostap / 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 PKG_CAT:=zcat
20
21 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/kmod-hostap/Default
27 SECTION:=kernel
28 CATEGORY:=Kernel drivers
29 DESCRIPTION:=\
30 Host AP is a driver for 802.11b wireless cards based on Intersil \\\
31 Prism2/2.5/3 chipset. It supports so called Host AP mode that allows the \\\
32 card to act as an IEEE 802.11 access point.
33 URL:=http://hostap.epitest.fi/
34 ifeq ($(KERNEL),2.6)
35 VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)
36 else
37 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
38 endif
39 endef
40
41 define Package/kmod-hostap
42 $(call Package/kmod-hostap/Default)
43 DEPENDS:=@PCI_SUPPORT||PCMCIA_SUPPORT
44 TITLE:=Host AP support for Prism2/2.5/3
45 DESCRIPTION+=\\\
46 \\\
47 This package contains the base Host AP driver code that is shared by \\\
48 different hardware models. You will also need to enable support for \\\
49 PLX/PCI/CS version of the driver to actually use the driver.
50 endef
51
52 define Package/kmod-hostap-pci
53 $(call Package/kmod-hostap/Default)
54 DEPENDS:=kmod-hostap
55 TITLE:=Host AP driver for PCI adaptors
56 DESCRIPTION+=\\\
57 \\\
58 This package contains the Host AP driver for Prism2.5 PCI adaptors.
59 endef
60
61 define Package/kmod-hostap-plx
62 $(call Package/kmod-hostap/Default)
63 DEPENDS:=kmod-hostap
64 TITLE:=Host AP driver for PLX9052 based PCI adaptors
65 DESCRIPTION+=\\\
66 \\\
67 This package contains the Host AP driver for Prism2/2.5/3 in PLX9052 \\\
68 based PCI adaptors.
69 endef
70
71 ifeq ($(KERNEL),2.4)
72 define Build/Compile
73 $(MAKE) -C $(LINUX_DIR)/ \
74 ARCH="$(LINUX_KARCH)" \
75 CROSS_COMPILE="$(TARGET_CROSS)" \
76 SUBDIRS="$(PKG_BUILD_DIR)/driver/modules" \
77 modules
78 endef
79
80 define Package/kmod-hostap/install
81 install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION)
82 $(CP) \
83 $(PKG_BUILD_DIR)/driver/modules/hostap.$(LINUX_KMOD_SUFFIX) \
84 $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_ccmp.$(LINUX_KMOD_SUFFIX) \
85 $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_tkip.$(LINUX_KMOD_SUFFIX) \
86 $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_wep.$(LINUX_KMOD_SUFFIX) \
87 $(1)/lib/modules/$(LINUX_VERSION)/
88 endef
89
90 define Package/kmod-hostap-pci/install
91 install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION)
92 $(CP) \
93 $(PKG_BUILD_DIR)/driver/modules/hostap_pci.$(LINUX_KMOD_SUFFIX) \
94 $(1)/lib/modules/$(LINUX_VERSION)/
95 endef
96
97 define Package/kmod-hostap-plx/install
98 install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION)
99 $(CP) \
100 $(PKG_BUILD_DIR)/driver/modules/hostap_plx.$(LINUX_KMOD_SUFFIX) \
101 $(1)/lib/modules/$(LINUX_VERSION)/
102 endef
103 endif
104
105 ifeq ($(KERNEL),2.6)
106 define Build/Compile
107 endef
108
109 ifeq ($(CONFIG_HOSTAP),m)
110 define Package/kmod-hostap/install
111 install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION)
112 $(CP) \
113 $(MODULES_DIR)/kernel/drivers/net/wireless/hostap/hostap.$(LINUX_KMOD_SUFFIX) \
114 $(1)/lib/modules/$(LINUX_VERSION)/
115 endef
116 endif
117
118 ifeq ($(CONFIG_HOSTAP_PCI),m)
119 define Package/kmod-hostap-pci/install
120 install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION)
121 $(CP) \
122 $(MODULES_DIR)/kernel/drivers/net/wireless/hostap/hostap_pci.$(LINUX_KMOD_SUFFIX) \
123 $(1)/lib/modules/$(LINUX_VERSION)/
124 endef
125 endif
126
127 ifeq ($(CONFIG_HOSTAP_PLX),m)
128 define Package/kmod-hostap-plx/install
129 install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION)
130 $(CP) \
131 $(MODULES_DIR)/kernel/drivers/net/wireless/hostap/hostap_plx.$(LINUX_KMOD_SUFFIX) \
132 $(1)/lib/modules/$(LINUX_VERSION)/
133 endef
134 endif
135 endif
136
137 $(eval $(call BuildPackage,kmod-hostap))
138 $(eval $(call BuildPackage,kmod-hostap-pci))
139 $(eval $(call BuildPackage,kmod-hostap-plx))
This page took 0.046718 seconds and 5 git commands to generate.