2005-12-13 06:00:58 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# usbutils
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-11 16:06:06 +02:00
|
|
|
USBUTILS_VERSION:=0.72
|
|
|
|
USBUTILS_SOURCE:=usbutils-$(USBUTILS_VERSION).tar.gz
|
2005-12-13 06:00:58 +01:00
|
|
|
USBUTILS_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/linux-usb/
|
2007-07-11 16:06:06 +02:00
|
|
|
USBUTILS_DIR:=$(BUILD_DIR)/usbutils-$(USBUTILS_VERSION)
|
2006-10-01 17:17:52 +02:00
|
|
|
USBUTILS_CAT:=$(ZCAT)
|
2005-12-13 06:00:58 +01:00
|
|
|
USBUTILS_BINARY:=lsusb
|
2007-05-07 05:59:35 +02:00
|
|
|
USBUTILS_TARGET_BINARY:=usr/sbin/lsusb
|
2005-12-13 06:00:58 +01:00
|
|
|
|
|
|
|
$(DL_DIR)/$(USBUTILS_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(USBUTILS_SITE),$(USBUTILS_SOURCE))
|
2005-12-13 06:00:58 +01:00
|
|
|
|
2007-01-03 14:44:01 +01:00
|
|
|
usbutils-source: $(DL_DIR)/$(USBUTILS_SOURCE)
|
|
|
|
|
2005-12-13 06:00:58 +01:00
|
|
|
usbutils-unpacked: $(USBUTILS_DIR)/.unpacked
|
|
|
|
$(USBUTILS_DIR)/.unpacked: $(DL_DIR)/$(USBUTILS_SOURCE)
|
|
|
|
$(USBUTILS_CAT) $(DL_DIR)/$(USBUTILS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
touch $(USBUTILS_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(USBUTILS_DIR)/.configured: $(USBUTILS_DIR)/.unpacked
|
|
|
|
(cd $(USBUTILS_DIR); rm -rf config.cache; \
|
2007-01-14 04:52:21 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2005-12-13 06:00:58 +01:00
|
|
|
ac_cv_func_malloc_0_nonnull=yes \
|
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2005-12-13 06:00:58 +01:00
|
|
|
touch $(USBUTILS_DIR)/.configured
|
|
|
|
|
|
|
|
$(USBUTILS_DIR)/$(USBUTILS_BINARY): $(USBUTILS_DIR)/.configured
|
2007-07-09 10:30:38 +02:00
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(USBUTILS_DIR)
|
2005-12-13 06:00:58 +01:00
|
|
|
|
|
|
|
$(TARGET_DIR)/$(USBUTILS_TARGET_BINARY): $(USBUTILS_DIR)/$(USBUTILS_BINARY)
|
2007-01-21 22:32:49 +01:00
|
|
|
$(MAKE) -C $(USBUTILS_DIR) DESTDIR=$(TARGET_DIR) install
|
2005-12-13 06:00:58 +01:00
|
|
|
rm -rf $(TARGET_DIR)/usr/man
|
|
|
|
|
|
|
|
usbutils: uclibc libusb $(TARGET_DIR)/$(USBUTILS_TARGET_BINARY)
|
|
|
|
|
|
|
|
usbutils-clean:
|
|
|
|
rm -f $(TARGET_DIR)/$(USBUTILS_TARGET_BINARY)
|
2007-05-07 05:59:35 +02:00
|
|
|
rm -f $(TARGET_DIR)/usr/share/usb.ids
|
|
|
|
rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share
|
2005-12-13 06:00:58 +01:00
|
|
|
-$(MAKE) -C $(USBUTILS_DIR) clean
|
|
|
|
|
|
|
|
usbutils-dirclean:
|
|
|
|
rm -rf $(USBUTILS_DIR)
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_USBUTILS),y)
|
2005-12-13 06:00:58 +01:00
|
|
|
TARGETS+=usbutils
|
|
|
|
endif
|