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 -DINSTALL_UDEV_RULE
=$(if
$(BR2_PACKAGE_HAS_UDEV
),ON
,OFF
) \
18 -DWITH_TESTS
=$(if
$(BR2_PACKAGE_LIBIIO_TESTS
),ON
,OFF
) \
21 ifeq ($(BR2_PACKAGE_LIBIIO_XML_BACKEND
),y
)
22 LIBIIO_DEPENDENCIES
+= libxml2
23 LIBIIO_CONF_OPTS
+= -DWITH_XML_BACKEND
=ON
25 LIBIIO_CONF_OPTS
+= -DWITH_XML_BACKEND
=OFF
28 ifeq ($(BR2_PACKAGE_LIBIIO_USB_BACKEND
),y
)
29 LIBIIO_DEPENDENCIES
+= libusb
30 LIBIIO_CONF_OPTS
+= -DWITH_USB_BACKEND
=ON
32 LIBIIO_CONF_OPTS
+= -DWITH_USB_BACKEND
=OFF
35 ifeq ($(BR2_PACKAGE_LIBIIO_SERIAL_BACKEND
),y
)
36 LIBIIO_DEPENDENCIES
+= libserialport
37 LIBIIO_CONF_OPTS
+= -DWITH_SERIAL_BACKEND
=ON
39 LIBIIO_CONF_OPTS
+= -DWITH_SERIAL_BACKEND
=OFF
42 ifeq ($(BR2_PACKAGE_LIBIIO_IIOD
),y
)
43 LIBIIO_DEPENDENCIES
+= host-flex host-bison
44 LIBIIO_CONF_OPTS
+= -DWITH_IIOD
=ON
46 LIBIIO_CONF_OPTS
+= -DWITH_IIOD
=OFF
49 ifeq ($(BR2_PACKAGE_LIBIIO_IIOD_USBD
),y
)
50 LIBIIO_DEPENDENCIES
+= libaio
51 LIBIIO_CONF_OPTS
+= -DWITH_IIOD_USBD
=ON
53 LIBIIO_CONF_OPTS
+= -DWITH_IIOD_USBD
=OFF
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
61 ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON
),y
)
62 LIBIIO_DEPENDENCIES
+= python
63 LIBIIO_CONF_OPTS
+= -DPYTHON_BINDINGS
=ON
65 LIBIIO_CONF_OPTS
+= -DPYTHON_BINDINGS
=OFF
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
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
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
83 LIBIIO_CONF_OPTS
+= -DCSHARP_BINDINGS
=OFF
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
93 $(eval
$(cmake-package
))