mirror of
https://github.com/RPCS3/hidapi.git
synced 2026-01-31 01:25:21 +01:00
Rationale: on Android one must use UsbManager, to access any USB device. As a result, libraries like libusb can only use file descriptors that are provided by UsbManager. libusb has an API to use such file descriptors: hid_libusb_wrap_sys_device. Having hid_libusb_wrap_sys_device currently is the only way to make hidapi work on Android without root access and without custom Android builds. Relevant info: https://github.com/libusb/libusb/pull/830/files
35 lines
834 B
Makefile
35 lines
834 B
Makefile
AM_CPPFLAGS = -I$(top_srcdir)/hidapi $(CFLAGS_LIBUSB)
|
|
|
|
if OS_LINUX
|
|
lib_LTLIBRARIES = libhidapi-libusb.la
|
|
libhidapi_libusb_la_SOURCES = hid.c
|
|
libhidapi_libusb_la_LDFLAGS = $(LTLDFLAGS) $(PTHREAD_CFLAGS)
|
|
libhidapi_libusb_la_LIBADD = $(LIBS_LIBUSB)
|
|
endif
|
|
|
|
if OS_FREEBSD
|
|
lib_LTLIBRARIES = libhidapi.la
|
|
libhidapi_la_SOURCES = hid.c
|
|
libhidapi_la_LDFLAGS = $(LTLDFLAGS)
|
|
libhidapi_la_LIBADD = $(LIBS_LIBUSB)
|
|
endif
|
|
|
|
if OS_KFREEBSD
|
|
lib_LTLIBRARIES = libhidapi.la
|
|
libhidapi_la_SOURCES = hid.c
|
|
libhidapi_la_LDFLAGS = $(LTLDFLAGS)
|
|
libhidapi_la_LIBADD = $(LIBS_LIBUSB)
|
|
endif
|
|
|
|
if OS_HAIKU
|
|
lib_LTLIBRARIES = libhidapi.la
|
|
libhidapi_la_SOURCES = hid.c
|
|
libhidapi_la_LDFLAGS = $(LTLDFLAGS)
|
|
libhidapi_la_LIBADD = $(LIBS_LIBUSB)
|
|
endif
|
|
|
|
hdrdir = $(includedir)/hidapi
|
|
hdr_HEADERS = $(top_srcdir)/hidapi/hidapi.h hidapi_libusb.h
|
|
|
|
EXTRA_DIST = Makefile-manual
|