b797c85c51ec86fb1f48313a6bb6dd9f0450578c
[openwrt/svn-archive/archive.git] / package / zd1211 / 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:=zd1211
13 PKG_VERSION:=r83
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-driver-$(PKG_VERSION).tgz
17 PKG_SOURCE_URL:=http://zd1211.ath.cx/download/
18 PKG_MD5SUM:=a5751f0e6f1f368689077fa7758a4932
19
20 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-driver-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 #FIXME: add proper dependency handling on kmod-usb-core packages
25 define KernelPackage/zd1211
26 SUBMENU:=Wireless Drivers
27 DEPENDS:=@LINUX_2_6&&!LINUX_2_6_UML
28 TITLE:=Driver for Zydas 1211 based USB devices
29 DESCRIPTION:=\
30 This package contains a Linux driver for the ZyDAS ZD1211 802.11b/g \\\
31 USB-WLAN-Chip.\\\
32 Initially contributed by ZyDAS, this driver is actively maintained by the \\\
33 open source community.
34 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
35 FILES:=$(PKG_BUILD_DIR)/zd1211.$(LINUX_KMOD_SUFFIX)
36 AUTOLOAD:=$(call AutoLoad,60,zd1211)
37 endef
38
39 define Package/zd1211-utils
40 SECTION:=utils
41 CATEGORY:=Utilities
42 TITLE:=zd1211 user-space utilities
43 DESCRIPTION:=zd1211 user-space utilities : apdbg, zd1211-sta
44 endef
45
46 define Build/Compile
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 ARCH="$(LINUX_KARCH)" \
49 CROSS_COMPILE="$(TARGET_CROSS)" \
50 CC="$(TARGET_CC)" \
51 CPP="$(TARGET_CC)" \
52 LD="$(TARGET_CROSS)ld" \
53 KERNELVERSION="$(KERNEL)" \
54 KERNEL_SOURCE="$(LINUX_DIR)" \
55 KDIR="$(LINUX_DIR)" \
56 all
57 $(TARGET_CC) $(PKG_BUILD_DIR)/apdbg.c -o $(PKG_BUILD_DIR)/apdbg
58 endef
59
60 define Package/zd1211-utils/install
61 $(INSTALL_DIR) $(1)/usr/sbin
62 $(CP) $(PKG_BUILD_DIR)/apdbg $(1)/usr/sbin/
63 $(CP) $(PKG_BUILD_DIR)/sta $(1)/usr/sbin/$(PKG_NAME)-sta
64 endef
65
66 $(eval $(call Package,zd1211-utils))
67 $(eval $(call KernelPackage,zd1211))