xref: /OK3568_Linux_fs/buildroot/package/libusb/libusb.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# libusb
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunLIBUSB_VERSION_MAJOR = 1.0
8*4882a593SmuzhiyunLIBUSB_VERSION = $(LIBUSB_VERSION_MAJOR).24
9*4882a593SmuzhiyunLIBUSB_SOURCE = libusb-$(LIBUSB_VERSION).tar.bz2
10*4882a593SmuzhiyunLIBUSB_SITE = https://github.com/libusb/libusb/releases/download/v$(LIBUSB_VERSION)
11*4882a593SmuzhiyunLIBUSB_LICENSE = LGPL-2.1+
12*4882a593SmuzhiyunLIBUSB_LICENSE_FILES = COPYING
13*4882a593SmuzhiyunLIBUSB_CPE_ID_VENDOR = libusb
14*4882a593SmuzhiyunLIBUSB_DEPENDENCIES = host-pkgconf
15*4882a593SmuzhiyunLIBUSB_INSTALL_STAGING = YES
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun# Avoid the discovery of udev for the host variant
18*4882a593SmuzhiyunHOST_LIBUSB_CONF_OPTS = --disable-udev
19*4882a593SmuzhiyunHOST_LIBUSB_DEPENDENCIES = host-pkgconf
20*4882a593Smuzhiyun
21*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_HAS_UDEV),y)
22*4882a593SmuzhiyunLIBUSB_DEPENDENCIES += udev
23*4882a593Smuzhiyunelse
24*4882a593SmuzhiyunLIBUSB_CONF_OPTS += --disable-udev
25*4882a593Smuzhiyunendif
26*4882a593Smuzhiyun
27*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBUSB_EXAMPLES),y)
28*4882a593SmuzhiyunLIBUSB_CONF_OPTS += --enable-examples-build
29*4882a593Smuzhiyundefine LIBUSB_INSTALL_TARGET_EXAMPLES
30*4882a593Smuzhiyun	$(foreach example,listdevs xusb fxload hotplugtest testlibusb dpfp dpfp_threaded sam3u_benchmark,
31*4882a593Smuzhiyun		$(INSTALL) -D -m0755 $(@D)/examples/$(example) $(TARGET_DIR)/usr/bin/$(example)
32*4882a593Smuzhiyun	)
33*4882a593Smuzhiyunendef
34*4882a593SmuzhiyunLIBUSB_POST_INSTALL_TARGET_HOOKS += LIBUSB_INSTALL_TARGET_EXAMPLES
35*4882a593Smuzhiyunendif
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun$(eval $(autotools-package))
38*4882a593Smuzhiyun$(eval $(host-autotools-package))
39