2 # Copyright (C) 2017-2018 Michael Heimpold <mhei@heimpold.de>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://codeload.github.com
/analogdevicesinc
/libiio
/tar.gz
/v
$(PKG_VERSION
)?
16 PKG_HASH
:=21972599a3c143ab1f98002ad2b3f28f4aff927fde5f677478311cd4e517730c
19 PKG_LICENSE_FILES
:=COPYING.txt
21 PKG_MAINTAINER
:=Michael Heimpold
<mhei@heimpold.de
>
25 PKG_CONFIG_DEPENDS
:= \
27 CONFIG_LIBIIO_LOCAL_BACKEND \
28 CONFIG_LIBIIO_NETWORK_BACKEND \
29 CONFIG_LIBIIO_USB_BACKEND \
30 CONFIG_LIBIIO_XML_BACKEND
32 include $(INCLUDE_DIR
)/package.mk
33 include $(INCLUDE_DIR
)/nls.mk
34 include $(INCLUDE_DIR
)/cmake.mk
36 CMAKE_OPTIONS
+= -DWITH_DOC
=OFF
37 CMAKE_OPTIONS
+= -DENABLE_IPV6
=$(if
$(CONFIG_IPV6
),ON
,OFF
)
38 CMAKE_OPTIONS
+= -DWITH_AIO
=OFF
39 CMAKE_OPTIONS
+= -DWITH_LOCAL_BACKEND
=$(if
$(CONFIG_LIBIIO_LOCAL_BACKEND
),ON
,OFF
)
40 CMAKE_OPTIONS
+= -DWITH_LOCAL_CONFIG
=OFF
41 CMAKE_OPTIONS
+= -DWITH_NETWORK_BACKEND
=$(if
$(CONFIG_LIBIIO_NETWORK_BACKEND
),ON
,OFF
)
42 # serial backend requires libserial which is not packaged yet
43 CMAKE_OPTIONS
+= -DWITH_SERIAL_BACKEND
=OFF
44 CMAKE_OPTIONS
+= -DWITH_USB_BACKEND
=$(if
$(CONFIG_LIBIIO_USB_BACKEND
),ON
,OFF
)
45 CMAKE_OPTIONS
+= -DWITH_XML_BACKEND
=$(if
$(CONFIG_LIBIIO_XML_BACKEND
),ON
,OFF
)
50 TITLE
:=Library for interfacing with Linux IIO devices
51 URL
:=https
://github.com
/analogdevicesinc
/libiio
54 +LIBIIO_USB_BACKEND
:libusb-1.0 \
55 +LIBIIO_NETWORK_BACKEND
:libavahi-client \
56 +LIBIIO_XML_BACKEND
:libxml2 \
61 define Package
/libiio
/config
62 config LIBIIO_LOCAL_BACKEND
63 bool
"Enable local backend"
64 depends on PACKAGE_libiio
67 config LIBIIO_NETWORK_BACKEND
68 bool
"Enable network backend"
69 depends on PACKAGE_libiio
70 select LIBIIO_XML_BACKEND
73 config LIBIIO_USB_BACKEND
74 bool
"Enable USB backend"
75 depends on PACKAGE_libiio
76 select LIBIIO_XML_BACKEND
79 config LIBIIO_XML_BACKEND
81 depends on PACKAGE_libiio
85 define Package
/libiio
/description
86 libiio is used to interface to the Linux Industrial Input
/Output
(IIO
) Subsystem.
87 The Linux IIO subsystem is intended to provide support for devices that in some
88 sense are analog to digital or digital to analog converters
(ADCs
, DACs
). This
89 includes
, but is not limited to ADCs
, Accelerometers
, Gyros
, IMUs
, Capacitance
90 to Digital Converters
(CDCs
), Pressure Sensors
, Color
, Light and Proximity Sensors
,
91 Temperature Sensors
, Magnetometers
, DACs
, DDS
(Direct Digital Synthesis
),
92 PLLs
(Phase Locked Loops
), Variable
/Programmable Gain Amplifiers
(VGA
, PGA
),
93 and RF transceivers. You can use libiio natively on an embedded Linux
94 target
(local mode
), or use libiio to communicate remotely to that same target
95 from a host Linux
, Windows or MAC over USB or Ethernet or Serial.
101 TITLE
:=Linux IIO daemon
102 URL
:=https
://github.com
/analogdevicesinc
/libiio
106 define Package
/iiod
/description
107 Daemon to access IIO devices via network.
110 define Package
/iio-utils
113 TITLE
:=Linux IIO tools
114 URL
:=https
://github.com
/analogdevicesinc
/libiio
118 define Package
/iio-utils
/description
119 Command line tools for IIO devices.
122 define Build
/InstallDev
123 $(INSTALL_DIR
) $(1)/usr
/include
124 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/include/iio.h
$(1)/usr
/include/
126 $(INSTALL_DIR
) $(1)/usr
/lib
127 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libiio.so
* $(1)/usr
/lib
/
129 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
130 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libiio.
pc $(1)/usr
/lib
/pkgconfig
/
131 $(SED
) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr
/lib
/pkgconfig
/libiio.
pc
132 $(SED
) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr
/lib
/pkgconfig
/libiio.
pc
135 define Package
/libiio
/install
136 $(INSTALL_DIR
) $(1)/usr
/lib
137 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libiio.so.
* $(1)/usr
/lib
/
140 define Package
/iiod
/install
141 $(INSTALL_DIR
) $(1)/etc
/init.d
142 $(INSTALL_BIN
) .
/files
/iiod.init
$(1)/etc
/init.d
/iiod
143 $(INSTALL_DIR
) $(1)/usr
/sbin
144 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/iiod
$(1)/usr
/sbin
/
147 define Package
/iio-utils
/install
148 $(INSTALL_DIR
) $(1)/usr
/bin
149 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/* $(1)/usr
/bin
/
152 $(eval
$(call BuildPackage
,libiio
))
153 $(eval
$(call BuildPackage
,iiod
))
154 $(eval
$(call BuildPackage
,iio-utils
))