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_TESTS
=$(if
$(BR2_PACKAGE_LIBIIO_TESTS
),ON
,OFF
) \
19 ifeq ($(BR2_PACKAGE_LIBIIO_XML_BACKEND
),y
)
20 LIBIIO_DEPENDENCIES
+= libxml2
21 LIBIIO_CONF_OPTS
+= -DWITH_XML_BACKEND
=ON
23 LIBIIO_CONF_OPTS
+= -DWITH_XML_BACKEND
=OFF
26 ifeq ($(BR2_PACKAGE_LIBIIO_USB_BACKEND
),y
)
27 LIBIIO_DEPENDENCIES
+= libusb
28 LIBIIO_CONF_OPTS
+= -DWITH_USB_BACKEND
=ON
30 LIBIIO_CONF_OPTS
+= -DWITH_USB_BACKEND
=OFF
33 ifeq ($(BR2_PACKAGE_LIBIIO_SERIAL_BACKEND
),y
)
34 LIBIIO_DEPENDENCIES
+= libserialport
35 LIBIIO_CONF_OPTS
+= -DWITH_SERIAL_BACKEND
=ON
37 LIBIIO_CONF_OPTS
+= -DWITH_SERIAL_BACKEND
=OFF
40 ifeq ($(BR2_PACKAGE_LIBIIO_IIOD
),y
)
41 LIBIIO_DEPENDENCIES
+= host-flex host-bison
42 LIBIIO_CONF_OPTS
+= -DWITH_IIOD
=ON
44 LIBIIO_CONF_OPTS
+= -DWITH_IIOD
=OFF
47 # Avahi support in libiio requires avahi-client, which needs avahi-daemon
48 ifeq ($(BR2_PACKAGE_AVAHI
)$(BR2_PACKAGE_AVAHI_DAEMON
),yy
)
49 LIBIIO_DEPENDENCIES
+= avahi
52 ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON
),y
)
53 LIBIIO_DEPENDENCIES
+= python
54 LIBIIO_CONF_OPTS
+= -DPYTHON_BINDINGS
=ON
56 LIBIIO_CONF_OPTS
+= -DPYTHON_BINDINGS
=OFF
59 ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_CSHARP
),y
)
60 define LIBIIO_INSTALL_CSHARP_BINDINGS_TO_TARGET
61 rm $(TARGET_DIR
)/usr
/lib
/cli
/libiio-sharp-
$(LIBIIO_VERSION
)/libiio-sharp.dll.mdb
62 $(HOST_DIR
)/usr
/bin
/gacutil
-root
$(TARGET_DIR
)/usr
/lib
-i \
63 $(TARGET_DIR
)/usr
/lib
/cli
/libiio-sharp-
$(LIBIIO_VERSION
)/libiio-sharp.dll
65 define LIBIIO_INSTALL_CSHARP_BINDINGS_TO_STAGING
66 $(HOST_DIR
)/usr
/bin
/gacutil
-root
$(STAGING_DIR
)/usr
/lib
-i \
67 $(STAGING_DIR
)/usr
/lib
/cli
/libiio-sharp-
$(LIBIIO_VERSION
)/libiio-sharp.dll
69 LIBIIO_POST_INSTALL_TARGET_HOOKS
+= LIBIIO_INSTALL_CSHARP_BINDINGS_TO_TARGET
70 LIBIIO_POST_INSTALL_STAGING_HOOKS
+= LIBIIO_INSTALL_CSHARP_BINDINGS_TO_STAGING
71 LIBIIO_DEPENDENCIES
+= mono
72 LIBIIO_CONF_OPTS
+= -DCSHARP_BINDINGS
=ON
74 LIBIIO_CONF_OPTS
+= -DCSHARP_BINDINGS
=OFF
77 ifeq ($(BR2_PACKAGE_LIBIIO_IIOD
),y
)
78 define LIBIIO_INSTALL_INIT_SYSV
79 $(INSTALL
) -D
-m
0755 package
/libiio
/S99iiod \
80 $(TARGET_DIR
)/etc
/init.d
/S99iiod
82 define LIBIIO_INSTALL_INIT_SYSTEMD
83 $(INSTALL
) -d
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
84 $(INSTALL
) -D
-m
0644 $(@D
)/debian
/iiod.service \
85 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/iiod.service
86 ln
-fs ..
/..
/..
/..
/usr
/lib
/systemd
/system
/iiod.service \
87 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/iiod.service
91 $(eval
$(cmake-package
))