[packages] testusb: new package, can be used to perform various tests with use of...
[openwrt/svn-archive/archive.git] / utils / testusb / Makefile
1 #
2 # Copyright (C) 2007 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
11 PKG_NAME:=testusb
12 PKG_RELEASE:=1
13
14 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
15 PKG_BUILD_DEPENDS := libpthread
16
17 include $(INCLUDE_DIR)/package.mk
18
19 define Package/testusb
20 SECTION:=utils
21 CATEGORY:=Utilities
22 DEPENDS:=@LINUX_2_6 @DEVEL +libpthread
23 TITLE:=USB testing utility
24 URL:=http://www.linux-usb.org/usbtest/testusb.c
25 endef
26
27 define Package/testusb/description
28 This tool can be used to perform various tests with use of the usbtest driver.
29 endef
30
31 define Build/Prepare
32 mkdir -p $(PKG_BUILD_DIR)
33 $(CP) ./src/* $(PKG_BUILD_DIR)/
34 endef
35
36 define Build/Compile
37 $(TARGET_CC) $(TARGET_CFLAGS) -Os -lpthread $(PKG_BUILD_DIR)/testusb.c -o $(PKG_BUILD_DIR)/$(PKG_NAME)
38 endef
39
40 define Package/testusb/install
41 $(INSTALL_DIR) $(1)/usr/sbin
42 $(INSTALL_BIN) $(PKG_BUILD_DIR)/testusb $(1)/usr/sbin/
43 endef
44
45 $(eval $(call BuildPackage,testusb))