[packages] massive change: replace occurences of -I$(STAGING_DIR)/{include,usr/includ...
[packages.git] / utils / usb-modeswitch / Makefile
1 #
2 # Copyright (C) 2008-2009 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
10 PKG_NAME:=usb_modeswitch
11 PKG_VERSION:=0.9.5
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://www.draisberghof.de/usb_modeswitch
16 PKG_CAT:=bzcat
17 PKG_MD5SUM:=d84961e86f0c3578f83448a3fb01ef52
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/usb-modeswitch
22   SECTION:=utils
23   CATEGORY:=Utilities
24   DEPENDS:=+libusb
25   TITLE:=USB ModeSwitch
26 endef
27
28 define Package/usb-modeswitch/description
29   A mode switching tool for controlling
30   "flip flop" (multiple device) USB gear.
31 endef
32
33 define Build/Compile
34         "$(TARGET_CC)" $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) \
35                 -lusb \
36                 -o $(PKG_BUILD_DIR)/usb_modeswitch-OpenWrt \
37                                 $(PKG_BUILD_DIR)/usb_modeswitch.c
38 endef
39
40 define Package/usb-modeswitch/install   
41         $(INSTALL_DIR) $(1)/usr/bin
42         $(INSTALL_BIN) $(PKG_BUILD_DIR)/usb_modeswitch-OpenWrt $(1)/usr/bin/usb_modeswitch
43 endef
44
45 $(eval $(call BuildPackage,usb-modeswitch))