From 6a8782c7506c89c95cd7443580458a49559f8291 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Thu, 9 May 2019 15:13:34 -0700 Subject: libiio: Initial Android.bp build file This introduces the required build logic to create libiio.so in the Android build system. It adds: - a blueprint file; - an explicitly generated iio-config.h, as this is ordinarily produced via CMake, and this doesn't seem possible to replicate trivially under Soong; - an include file for exporting. BUG=b:128636517 Test: mmma external/libiio Signed-off-by: Enrico Granata Change-Id: Id392839a79ea8c45ed5d45381cdc56ff4be68f3d --- Android.bp | 26 ++++++++++++++++++++++++++ include/iio.h | 1 + src/iio-config.h | 30 ++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 Android.bp create mode 120000 include/iio.h create mode 100644 src/iio-config.h diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..dfc81e3 --- /dev/null +++ b/Android.bp @@ -0,0 +1,26 @@ +// Copyright 2019 The Android Open Source Project + +cc_library_headers { + name: "libiio_headers", + export_include_dirs: ["include"], +} + +cc_library_shared { + name: "libiio", + srcs: [ + "src/backend.c", + "src/buffer.c", + "src/channel.c", + "src/context.c", + "src/device.c", + "src/local.c", + "src/scan.c", + "src/utilities.c", + ], + + cflags: [ + "-Wall", + "-Werror", + "-Wno-unused-parameter", + ], +} diff --git a/include/iio.h b/include/iio.h new file mode 120000 index 0000000..4d63392 --- /dev/null +++ b/include/iio.h @@ -0,0 +1 @@ +../src/iio.h \ No newline at end of file diff --git a/src/iio-config.h b/src/iio-config.h new file mode 100644 index 0000000..312c7a7 --- /dev/null +++ b/src/iio-config.h @@ -0,0 +1,30 @@ +#ifndef IIO_CONFIG_H +#define IIO_CONFIG_H + +#define LIBIIO_VERSION_MAJOR 0 +#define LIBIIO_VERSION_MINOR 15 +#define LIBIIO_VERSION_GIT "19d8880" + +#define LOG_LEVEL Info + +#define WITH_LOCAL_BACKEND +#undef WITH_XML_BACKEND +#undef WITH_NETWORK_BACKEND +#undef WITH_USB_BACKEND +#undef WITH_SERIAL_BACKEND +#undef WITH_MATLAB_BINDINGS_API + +#undef WITH_NETWORK_GET_BUFFER +#undef WITH_NETWORK_EVENTFD +#undef WITH_IIOD_USBD +#undef WITH_LOCAL_CONFIG +#define HAS_PIPE2 +#define HAS_STRDUP +#define HAS_STRERROR_R +#define HAS_NEWLOCALE +#define HAS_PTHREAD_SETNAME_NP +#undef HAVE_IPV6 +#undef HAVE_AVAHI +#undef NO_THREADS + +#endif /* IIO_CONFIG_H */ -- cgit v1.2.3