diff options
author | Enrico Granata <egranata@google.com> | 2019-05-09 15:13:34 -0700 |
---|---|---|
committer | Enrico Granata <egranata@google.com> | 2019-05-10 17:47:56 -0700 |
commit | 6a8782c7506c89c95cd7443580458a49559f8291 (patch) | |
tree | d761d6ddba2816e934d559d2c5c3a36ef182e4b1 | |
parent | 19d8880b3215b7d3d2e77545a7fe13cc3efa0776 (diff) | |
download | libiio-6a8782c7506c89c95cd7443580458a49559f8291.tar.gz |
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 <egranata@chromium.org>
Change-Id: Id392839a79ea8c45ed5d45381cdc56ff4be68f3d
-rw-r--r-- | Android.bp | 26 | ||||
l--------- | include/iio.h | 1 | ||||
-rw-r--r-- | src/iio-config.h | 30 |
3 files changed, 57 insertions, 0 deletions
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 */ |