2014-12-16 10:34:06 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# libiio
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2017-06-02 18:36:31 +02:00
|
|
|
LIBIIO_VERSION = 0.10
|
2015-03-25 10:00:37 +01:00
|
|
|
LIBIIO_SITE = $(call github,analogdevicesinc,libiio,v$(LIBIIO_VERSION))
|
2014-12-16 10:34:06 +01:00
|
|
|
LIBIIO_INSTALL_STAGING = YES
|
2017-03-30 15:43:34 +02:00
|
|
|
LIBIIO_LICENSE = LGPL-2.1+
|
2016-06-01 20:22:40 +02:00
|
|
|
LIBIIO_LICENSE_FILES = COPYING.txt
|
2014-12-16 10:34:06 +01:00
|
|
|
|
2015-04-19 14:40:00 +02:00
|
|
|
LIBIIO_CONF_OPTS = -DENABLE_IPV6=ON \
|
2014-12-16 10:34:06 +01:00
|
|
|
-DWITH_LOCAL_BACKEND=$(if $(BR2_PACKAGE_LIBIIO_LOCAL_BACKEND),ON,OFF) \
|
2016-07-05 12:27:28 +02:00
|
|
|
-DWITH_NETWORK_BACKEND=$(if $(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),ON,OFF) \
|
2017-02-06 15:55:42 +01:00
|
|
|
-DWITH_MATLAB_BINDINGS_API=OFF \
|
2017-03-13 20:35:02 +01:00
|
|
|
-DMATLAB_BINDINGS=OFF \
|
2017-02-06 15:55:42 +01:00
|
|
|
-DINSTALL_UDEV_RULE=$(if $(BR2_PACKAGE_HAS_UDEV),ON,OFF) \
|
2015-03-25 10:00:37 +01:00
|
|
|
-DWITH_TESTS=$(if $(BR2_PACKAGE_LIBIIO_TESTS),ON,OFF) \
|
|
|
|
-DWITH_DOC=OFF
|
2014-12-16 10:34:06 +01:00
|
|
|
|
2016-07-05 12:27:28 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBIIO_XML_BACKEND),y)
|
2014-12-16 10:34:06 +01:00
|
|
|
LIBIIO_DEPENDENCIES += libxml2
|
2016-07-05 12:27:28 +02:00
|
|
|
LIBIIO_CONF_OPTS += -DWITH_XML_BACKEND=ON
|
2014-12-16 10:34:06 +01:00
|
|
|
else
|
2016-07-05 12:27:28 +02:00
|
|
|
LIBIIO_CONF_OPTS += -DWITH_XML_BACKEND=OFF
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBIIO_USB_BACKEND),y)
|
|
|
|
LIBIIO_DEPENDENCIES += libusb
|
|
|
|
LIBIIO_CONF_OPTS += -DWITH_USB_BACKEND=ON
|
|
|
|
else
|
|
|
|
LIBIIO_CONF_OPTS += -DWITH_USB_BACKEND=OFF
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBIIO_SERIAL_BACKEND),y)
|
|
|
|
LIBIIO_DEPENDENCIES += libserialport
|
|
|
|
LIBIIO_CONF_OPTS += -DWITH_SERIAL_BACKEND=ON
|
|
|
|
else
|
|
|
|
LIBIIO_CONF_OPTS += -DWITH_SERIAL_BACKEND=OFF
|
2014-12-16 10:34:06 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
|
|
|
|
LIBIIO_DEPENDENCIES += host-flex host-bison
|
|
|
|
LIBIIO_CONF_OPTS += -DWITH_IIOD=ON
|
|
|
|
else
|
|
|
|
LIBIIO_CONF_OPTS += -DWITH_IIOD=OFF
|
|
|
|
endif
|
|
|
|
|
2017-02-06 15:55:42 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBIIO_IIOD_USBD),y)
|
|
|
|
LIBIIO_DEPENDENCIES += libaio
|
|
|
|
LIBIIO_CONF_OPTS += -DWITH_IIOD_USBD=ON
|
|
|
|
else
|
|
|
|
LIBIIO_CONF_OPTS += -DWITH_IIOD_USBD=OFF
|
|
|
|
endif
|
|
|
|
|
2017-12-27 13:35:55 +01:00
|
|
|
# Avahi support in libiio requires avahi-client, which needs avahi-daemon and dbus
|
|
|
|
ifeq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yy)
|
2014-12-16 10:34:06 +01:00
|
|
|
LIBIIO_DEPENDENCIES += avahi
|
|
|
|
endif
|
|
|
|
|
2015-03-25 10:00:37 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON),y)
|
2017-10-05 13:33:25 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON),y)
|
2015-03-25 10:00:37 +01:00
|
|
|
LIBIIO_DEPENDENCIES += python
|
2017-10-05 13:33:25 +02:00
|
|
|
else ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
|
|
|
LIBIIO_DEPENDENCIES += python3
|
|
|
|
endif
|
2015-03-25 10:00:37 +01:00
|
|
|
LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=ON
|
|
|
|
else
|
|
|
|
LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=OFF
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_CSHARP),y)
|
|
|
|
define LIBIIO_INSTALL_CSHARP_BINDINGS_TO_TARGET
|
|
|
|
rm $(TARGET_DIR)/usr/lib/cli/libiio-sharp-$(LIBIIO_VERSION)/libiio-sharp.dll.mdb
|
2017-07-05 13:14:19 +02:00
|
|
|
$(HOST_DIR)/bin/gacutil -root $(TARGET_DIR)/usr/lib -i \
|
2015-03-25 10:00:37 +01:00
|
|
|
$(TARGET_DIR)/usr/lib/cli/libiio-sharp-$(LIBIIO_VERSION)/libiio-sharp.dll
|
|
|
|
endef
|
|
|
|
define LIBIIO_INSTALL_CSHARP_BINDINGS_TO_STAGING
|
2017-07-05 13:14:19 +02:00
|
|
|
$(HOST_DIR)/bin/gacutil -root $(STAGING_DIR)/usr/lib -i \
|
2015-03-25 10:00:37 +01:00
|
|
|
$(STAGING_DIR)/usr/lib/cli/libiio-sharp-$(LIBIIO_VERSION)/libiio-sharp.dll
|
|
|
|
endef
|
|
|
|
LIBIIO_POST_INSTALL_TARGET_HOOKS += LIBIIO_INSTALL_CSHARP_BINDINGS_TO_TARGET
|
|
|
|
LIBIIO_POST_INSTALL_STAGING_HOOKS += LIBIIO_INSTALL_CSHARP_BINDINGS_TO_STAGING
|
|
|
|
LIBIIO_DEPENDENCIES += mono
|
|
|
|
LIBIIO_CONF_OPTS += -DCSHARP_BINDINGS=ON
|
|
|
|
else
|
|
|
|
LIBIIO_CONF_OPTS += -DCSHARP_BINDINGS=OFF
|
|
|
|
endif
|
|
|
|
|
2014-12-16 10:34:06 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
|
|
|
|
define LIBIIO_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -D -m 0755 package/libiio/S99iiod \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S99iiod
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(eval $(cmake-package))
|