- Defines both shared and static versions of libgpiod - Defines all the libs/tools as vendor (installed in /vendor) Signed-off-by: Gary Bisson <gary.bisson@xxxxxxxxxxxxxxxxxxx> --- Hi, One thing that isn't ideal here is to set GPIOD_VERSION_STR manually, that will require to keep track of it for all versions. Not sure if there's a better way to provide that value to Android.bp. Regards, Gary --- Android.bp | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 Android.bp diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..6c437df --- /dev/null +++ b/Android.bp @@ -0,0 +1,95 @@ +cc_library_shared { + name: "libgpiod", + vendor: true, + srcs: [ + "lib/core.c", + "lib/ctxless.c", + "lib/helpers.c", + "lib/iter.c", + "lib/misc.c", + ], + cflags: ["-Werror", "-Wno-macro-redefined", "-DGPIOD_VERSION_STR=\"1.6-devel\""], + export_include_dirs: ["include"], + local_include_dirs: ["include"], +} + +cc_library_static { + name: "libgpiod_static", + vendor: true, + srcs: [ + "lib/core.c", + "lib/ctxless.c", + "lib/helpers.c", + "lib/iter.c", + "lib/misc.c", + ], + cflags: ["-Werror", "-Wno-macro-redefined", "-DGPIOD_VERSION_STR=\"1.6-devel\""], + export_include_dirs: ["include"], + local_include_dirs: ["include"], +} + +cc_binary { + name: "gpiodetect", + vendor: true, + srcs: [ + "tools/tools-common.c", + "tools/gpiodetect.c", + ], + shared_libs: ["libgpiod"], + cflags: ["-Werror"], +} + +cc_binary { + name: "gpiofind", + vendor: true, + srcs: [ + "tools/tools-common.c", + "tools/gpiofind.c", + ], + shared_libs: ["libgpiod"], + cflags: ["-Werror"], +} + +cc_binary { + name: "gpioget", + vendor: true, + srcs: [ + "tools/tools-common.c", + "tools/gpioget.c", + ], + shared_libs: ["libgpiod"], + cflags: ["-Werror"], +} + +cc_binary { + name: "gpioinfo", + vendor: true, + srcs: [ + "tools/tools-common.c", + "tools/gpioinfo.c", + ], + shared_libs: ["libgpiod"], + cflags: ["-Werror"], +} + +cc_binary { + name: "gpiomon", + vendor: true, + srcs: [ + "tools/tools-common.c", + "tools/gpiomon.c", + ], + shared_libs: ["libgpiod"], + cflags: ["-Werror"], +} + +cc_binary { + name: "gpioset", + vendor: true, + srcs: [ + "tools/tools-common.c", + "tools/gpioset.c", + ], + shared_libs: ["libgpiod"], + cflags: ["-Werror"], +} -- 2.26.2