python-cryptography: bump to version 1.7.2
[buildroot-gz.git] / package / libiio / libiio.mk
blob897761099906567c938ae9aad12b12f2f2819c64
1 ################################################################################
3 # libiio
5 ################################################################################
7 LIBIIO_VERSION = 0.9
8 LIBIIO_SITE = $(call github,analogdevicesinc,libiio,v$(LIBIIO_VERSION))
9 LIBIIO_INSTALL_STAGING = YES
10 LIBIIO_LICENSE = LGPLv2.1+
11 LIBIIO_LICENSE_FILES = COPYING.txt
13 LIBIIO_CONF_OPTS = -DENABLE_IPV6=ON \
14 -DWITH_LOCAL_BACKEND=$(if $(BR2_PACKAGE_LIBIIO_LOCAL_BACKEND),ON,OFF) \
15 -DWITH_NETWORK_BACKEND=$(if $(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),ON,OFF) \
16 -DWITH_MATLAB_BINDINGS_API=OFF \
17 -DINSTALL_UDEV_RULE=$(if $(BR2_PACKAGE_HAS_UDEV),ON,OFF) \
18 -DWITH_TESTS=$(if $(BR2_PACKAGE_LIBIIO_TESTS),ON,OFF) \
19 -DWITH_DOC=OFF
21 ifeq ($(BR2_PACKAGE_LIBIIO_XML_BACKEND),y)
22 LIBIIO_DEPENDENCIES += libxml2
23 LIBIIO_CONF_OPTS += -DWITH_XML_BACKEND=ON
24 else
25 LIBIIO_CONF_OPTS += -DWITH_XML_BACKEND=OFF
26 endif
28 ifeq ($(BR2_PACKAGE_LIBIIO_USB_BACKEND),y)
29 LIBIIO_DEPENDENCIES += libusb
30 LIBIIO_CONF_OPTS += -DWITH_USB_BACKEND=ON
31 else
32 LIBIIO_CONF_OPTS += -DWITH_USB_BACKEND=OFF
33 endif
35 ifeq ($(BR2_PACKAGE_LIBIIO_SERIAL_BACKEND),y)
36 LIBIIO_DEPENDENCIES += libserialport
37 LIBIIO_CONF_OPTS += -DWITH_SERIAL_BACKEND=ON
38 else
39 LIBIIO_CONF_OPTS += -DWITH_SERIAL_BACKEND=OFF
40 endif
42 ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
43 LIBIIO_DEPENDENCIES += host-flex host-bison
44 LIBIIO_CONF_OPTS += -DWITH_IIOD=ON
45 else
46 LIBIIO_CONF_OPTS += -DWITH_IIOD=OFF
47 endif
49 ifeq ($(BR2_PACKAGE_LIBIIO_IIOD_USBD),y)
50 LIBIIO_DEPENDENCIES += libaio
51 LIBIIO_CONF_OPTS += -DWITH_IIOD_USBD=ON
52 else
53 LIBIIO_CONF_OPTS += -DWITH_IIOD_USBD=OFF
54 endif
56 # Avahi support in libiio requires avahi-client, which needs avahi-daemon
57 ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_AVAHI_DAEMON),yy)
58 LIBIIO_DEPENDENCIES += avahi
59 endif
61 ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON),y)
62 LIBIIO_DEPENDENCIES += python
63 LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=ON
64 else
65 LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=OFF
66 endif
68 ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_CSHARP),y)
69 define LIBIIO_INSTALL_CSHARP_BINDINGS_TO_TARGET
70 rm $(TARGET_DIR)/usr/lib/cli/libiio-sharp-$(LIBIIO_VERSION)/libiio-sharp.dll.mdb
71 $(HOST_DIR)/usr/bin/gacutil -root $(TARGET_DIR)/usr/lib -i \
72 $(TARGET_DIR)/usr/lib/cli/libiio-sharp-$(LIBIIO_VERSION)/libiio-sharp.dll
73 endef
74 define LIBIIO_INSTALL_CSHARP_BINDINGS_TO_STAGING
75 $(HOST_DIR)/usr/bin/gacutil -root $(STAGING_DIR)/usr/lib -i \
76 $(STAGING_DIR)/usr/lib/cli/libiio-sharp-$(LIBIIO_VERSION)/libiio-sharp.dll
77 endef
78 LIBIIO_POST_INSTALL_TARGET_HOOKS += LIBIIO_INSTALL_CSHARP_BINDINGS_TO_TARGET
79 LIBIIO_POST_INSTALL_STAGING_HOOKS += LIBIIO_INSTALL_CSHARP_BINDINGS_TO_STAGING
80 LIBIIO_DEPENDENCIES += mono
81 LIBIIO_CONF_OPTS += -DCSHARP_BINDINGS=ON
82 else
83 LIBIIO_CONF_OPTS += -DCSHARP_BINDINGS=OFF
84 endif
86 ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
87 define LIBIIO_INSTALL_INIT_SYSV
88 $(INSTALL) -D -m 0755 package/libiio/S99iiod \
89 $(TARGET_DIR)/etc/init.d/S99iiod
90 endef
91 endif
93 $(eval $(cmake-package))