948666dfde
Last official release is 2 years ago. Current master branch provides fixes and improvements: - fix crash with usbfs mmap with usb controler has no DMA support and kernel < 5.6 [1]. - better SDR dongle configuration This patch: - bump librtlsdr to d794155ba65796a76cd0a436f9709f4601509320 (2020/03/18) - adapt 0001-disable_shared_library_target_in_build.patch (http://lists.osmocom.org/pipermail/osmocom-sdr/2020-May/002075.html) - add option to enable/disable zerocopy buffer on non arm platform [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/usb/core?h=v5.8-rc3&id=a0e710a7def471b8eb779ff551fc27701da49599 Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
49 lines
1.6 KiB
Makefile
49 lines
1.6 KiB
Makefile
################################################################################
|
|
#
|
|
# librtlsdr
|
|
#
|
|
################################################################################
|
|
|
|
LIBRTLSDR_VERSION = d794155ba65796a76cd0a436f9709f4601509320
|
|
LIBRTLSDR_SITE = $(call github,steve-m,librtlsdr,$(LIBRTLSDR_VERSION))
|
|
LIBRTLSDR_LICENSE = GPL-2.0+
|
|
LIBRTLSDR_LICENSE_FILES = COPYING
|
|
LIBRTLSDR_INSTALL_STAGING = YES
|
|
LIBRTLSDR_DEPENDENCIES = libusb
|
|
|
|
# BUILD_SHARED_LIBS is handled in pkg-cmake.mk as it is a generic cmake variable
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
LIBRTLSDR_CONF_OPTS += -DBUILD_STATIC_LIBS=ON
|
|
else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
|
|
LIBRTLSDR_CONF_OPTS += -DBUILD_STATIC_LIBS=ON
|
|
else ifeq ($(BR2_SHARED_LIBS),y)
|
|
LIBRTLSDR_CONF_OPTS += -DBUILD_STATIC_LIBS=OFF
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
|
|
LIBRTLSDR_CONF_OPTS += -DINSTALL_UDEV_RULES=ON
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBRTLSDR_DETACH_DRIVER),y)
|
|
LIBRTLSDR_CONF_OPTS += -DDETACH_KERNEL_DRIVER=1
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBRTLSDR_ZEROCOPY),y)
|
|
LIBRTLSDR_CONF_OPTS += -DENABLE_ZEROCOPY=ON
|
|
else
|
|
LIBRTLSDR_CONF_OPTS += -DENABLE_ZEROCOPY=OFF
|
|
endif
|
|
|
|
# In case of static-lib-only builds, CMake's FindThreads.cmake code tries to
|
|
# get the right flags, checking first for -lpthreads, then -lpthread, and lastly
|
|
# for -pthread.
|
|
# The 2 first link checks fail because of undefined symbols: __libc_setup_tls.
|
|
# In the later check, CMake successfully compiles and links the test program,
|
|
# but it also tries to run it, which is wrong when cross-compiling.
|
|
#
|
|
# The following CMake variable only disables the TRY_RUN call in the -pthread
|
|
# test.
|
|
LIBRTLSDR_CONF_OPTS += -DTHREADS_PTHREAD_ARG=OFF
|
|
|
|
$(eval $(cmake-package))
|