2005-12-13 06:00:18 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# libusb
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-11 16:06:06 +02:00
|
|
|
LIBUSB_VERSION:=0.1.12
|
|
|
|
LIBUSB_SOURCE:=libusb-$(LIBUSB_VERSION).tar.gz
|
2005-12-13 06:00:18 +01:00
|
|
|
LIBUSB_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libusb/
|
2007-07-11 16:06:06 +02:00
|
|
|
LIBUSB_DIR:=$(BUILD_DIR)/libusb-$(LIBUSB_VERSION)
|
2006-10-01 17:17:52 +02:00
|
|
|
LIBUSB_CAT:=$(ZCAT)
|
2007-05-07 06:00:11 +02:00
|
|
|
LIBUSB_BINARY:=usr/lib/libusb.so
|
2005-12-13 06:00:18 +01:00
|
|
|
|
|
|
|
$(DL_DIR)/$(LIBUSB_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(LIBUSB_SITE)/$(LIBUSB_SOURCE)
|
|
|
|
|
2007-01-03 14:44:01 +01:00
|
|
|
libusb-source: $(DL_DIR)/$(LIBUSB_SOURCE)
|
|
|
|
|
2005-12-13 06:00:18 +01:00
|
|
|
libusb-unpacked: $(LIBUSB_DIR)/.unpacked
|
|
|
|
$(LIBUSB_DIR)/.unpacked: $(DL_DIR)/$(LIBUSB_SOURCE)
|
|
|
|
$(LIBUSB_CAT) $(DL_DIR)/$(LIBUSB_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
touch $(LIBUSB_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(LIBUSB_DIR)/.configured: $(LIBUSB_DIR)/.unpacked
|
|
|
|
(cd $(LIBUSB_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:18 +01:00
|
|
|
ac_cv_header_regex_h=no \
|
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
2007-05-07 06:00:11 +02:00
|
|
|
--prefix=/ \
|
2005-12-13 06:00:18 +01:00
|
|
|
--disable-debug \
|
|
|
|
--disable-build-docs \
|
|
|
|
);
|
|
|
|
touch $(LIBUSB_DIR)/.configured
|
|
|
|
|
2007-07-16 11:45:39 +02:00
|
|
|
$(STAGING_DIR)/lib/libusb.so: $(LIBUSB_DIR)/.configured
|
2007-07-09 10:30:38 +02:00
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(LIBUSB_DIR)
|
2007-05-07 06:00:11 +02:00
|
|
|
$(MAKE) -C $(LIBUSB_DIR) DESTDIR=$(STAGING_DIR) install
|
2005-12-13 06:00:18 +01:00
|
|
|
|
2007-07-16 11:45:39 +02:00
|
|
|
$(TARGET_DIR)/$(LIBUSB_BINARY): $(STAGING_DIR)/lib/libusb.so
|
2007-05-07 06:00:11 +02:00
|
|
|
-mkdir -p $(TARGET_DIR)/usr/lib
|
|
|
|
cp -a $(STAGING_DIR)/lib/libusb* $(TARGET_DIR)/usr/lib
|
|
|
|
rm -f $(TARGET_DIR)/usr/lib/*.a $(TARGET_DIR)/usr/lib/*.la
|
2005-12-13 06:00:18 +01:00
|
|
|
|
2007-05-07 06:00:11 +02:00
|
|
|
libusb: uclibc $(TARGET_DIR)/$(LIBUSB_BINARY)
|
2005-12-13 06:00:18 +01:00
|
|
|
|
|
|
|
libusb-clean:
|
2007-05-07 06:00:11 +02:00
|
|
|
rm -f $(STAGING_DIR)/bin/libusb-config
|
|
|
|
rm -f $(STAGING_DIR)/includes/usb*.h
|
|
|
|
rm -f $(STAGING_DIR)/lib/libusb*
|
|
|
|
rm -rf $(STAGING_DIR)/lib/pkgconfig
|
|
|
|
rm -f $(TARGET_DIR)/usr/lib/libusb*
|
2005-12-13 06:00:18 +01:00
|
|
|
-$(MAKE) -C $(LIBUSB_DIR) clean
|
|
|
|
|
|
|
|
libusb-dirclean:
|
|
|
|
rm -rf $(LIBUSB_DIR)
|
2007-07-16 11:45:39 +02:00
|
|
|
|
|
|
|
.PHONY: libusb
|
|
|
|
|
2005-12-13 06:00:18 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_LIBUSB)),y)
|
|
|
|
TARGETS+=libusb
|
|
|
|
endif
|