1 ################################################################################
5 ################################################################################
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 -DMATLAB_BINDINGS
=OFF \
18 -DINSTALL_UDEV_RULE
=$(if
$(BR2_PACKAGE_HAS_UDEV
),ON
,OFF
) \
19 -DWITH_TESTS
=$(if
$(BR2_PACKAGE_LIBIIO_TESTS
),ON
,OFF
) \
22 ifeq ($(BR2_PACKAGE_LIBIIO_XML_BACKEND
),y
)
23 LIBIIO_DEPENDENCIES
+= libxml2
24 LIBIIO_CONF_OPTS
+= -DWITH_XML_BACKEND
=ON
26 LIBIIO_CONF_OPTS
+= -DWITH_XML_BACKEND
=OFF
29 ifeq ($(BR2_PACKAGE_LIBIIO_USB_BACKEND
),y
)
30 LIBIIO_DEPENDENCIES
+= libusb
31 LIBIIO_CONF_OPTS
+= -DWITH_USB_BACKEND
=ON
33 LIBIIO_CONF_OPTS
+= -DWITH_USB_BACKEND
=OFF
36 ifeq ($(BR2_PACKAGE_LIBIIO_SERIAL_BACKEND
),y
)
37 LIBIIO_DEPENDENCIES
+= libserialport
38 LIBIIO_CONF_OPTS
+= -DWITH_SERIAL_BACKEND
=ON
40 LIBIIO_CONF_OPTS
+= -DWITH_SERIAL_BACKEND
=OFF
43 ifeq ($(BR2_PACKAGE_LIBIIO_IIOD
),y
)
44 LIBIIO_DEPENDENCIES
+= host-flex host-bison
45 LIBIIO_CONF_OPTS
+= -DWITH_IIOD
=ON
47 LIBIIO_CONF_OPTS
+= -DWITH_IIOD
=OFF
50 ifeq ($(BR2_PACKAGE_LIBIIO_IIOD_USBD
),y
)
51 LIBIIO_DEPENDENCIES
+= libaio
52 LIBIIO_CONF_OPTS
+= -DWITH_IIOD_USBD
=ON
54 LIBIIO_CONF_OPTS
+= -DWITH_IIOD_USBD
=OFF
57 # Avahi support in libiio requires avahi-client, which needs avahi-daemon
58 ifeq ($(BR2_PACKAGE_AVAHI
)$(BR2_PACKAGE_AVAHI_DAEMON
),yy
)
59 LIBIIO_DEPENDENCIES
+= avahi
62 ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON
),y
)
63 LIBIIO_DEPENDENCIES
+= python
64 LIBIIO_CONF_OPTS
+= -DPYTHON_BINDINGS
=ON
66 LIBIIO_CONF_OPTS
+= -DPYTHON_BINDINGS
=OFF
69 ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_CSHARP
),y
)
70 define LIBIIO_INSTALL_CSHARP_BINDINGS_TO_TARGET
71 rm $(TARGET_DIR
)/usr
/lib
/cli
/libiio-sharp-
$(LIBIIO_VERSION
)/libiio-sharp.dll.mdb
72 $(HOST_DIR
)/usr
/bin
/gacutil
-root
$(TARGET_DIR
)/usr
/lib
-i \
73 $(TARGET_DIR
)/usr
/lib
/cli
/libiio-sharp-
$(LIBIIO_VERSION
)/libiio-sharp.dll
75 define LIBIIO_INSTALL_CSHARP_BINDINGS_TO_STAGING
76 $(HOST_DIR
)/usr
/bin
/gacutil
-root
$(STAGING_DIR
)/usr
/lib
-i \
77 $(STAGING_DIR
)/usr
/lib
/cli
/libiio-sharp-
$(LIBIIO_VERSION
)/libiio-sharp.dll
79 LIBIIO_POST_INSTALL_TARGET_HOOKS
+= LIBIIO_INSTALL_CSHARP_BINDINGS_TO_TARGET
80 LIBIIO_POST_INSTALL_STAGING_HOOKS
+= LIBIIO_INSTALL_CSHARP_BINDINGS_TO_STAGING
81 LIBIIO_DEPENDENCIES
+= mono
82 LIBIIO_CONF_OPTS
+= -DCSHARP_BINDINGS
=ON
84 LIBIIO_CONF_OPTS
+= -DCSHARP_BINDINGS
=OFF
87 ifeq ($(BR2_PACKAGE_LIBIIO_IIOD
),y
)
88 define LIBIIO_INSTALL_INIT_SYSV
89 $(INSTALL
) -D
-m
0755 package
/libiio
/S99iiod \
90 $(TARGET_DIR
)/etc
/init.d
/S99iiod
94 $(eval
$(cmake-package
))