diff mbox series

[v2,6/6] Android.bp: initial addition

Message ID 20220308085352.183941-7-gary.bisson@boundarydevices.com
State Accepted
Headers show
Series [v2,1/6] uboot_env: switch to strchr/strrchr | expand

Commit Message

Gary Bisson March 8, 2022, 8:53 a.m. UTC
- adding libubootenv as vendor dynamic library
- adding fw_printenv and fw_setenv as vendor binaries
- as Android uses clang, a few warning flags are needed:
  - Wno-pointer-arith for all the buffer address assignments
  - Wno-switch for the flagstype missing default/NONE case
  - Wno-date-time to allow __DATE__ usage
- using same license as CMake files (LGPLv2.1+)

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---
Changelog v1->v2:
- Add missing SPDX in Android.bp
---
 Android.bp | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 Android.bp
diff mbox series

Patch

diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..29359a5
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,29 @@ 
+// SPDX-License-Identifier:     LGPL-2.1-or-later
+
+cc_library {
+    name: "libubootenv",
+    vendor: true,
+    srcs: [
+        "src/uboot_env.c",
+    ],
+    shared_libs: ["libz"],
+    cflags: ["-std=gnu99", "-Wno-pointer-arith", "-Wno-switch"],
+    export_include_dirs: ["src"],
+    local_include_dirs: ["src"],
+}
+
+cc_binary {
+    name: "fw_printenv",
+    vendor: true,
+    srcs: ["src/fw_printenv.c"],
+    shared_libs: ["libubootenv"],
+    cflags: ["-std=gnu99", "-Wno-date-time"],
+}
+
+cc_binary {
+    name: "fw_setenv",
+    vendor: true,
+    srcs: ["src/fw_setenv.c"],
+    shared_libs: ["libubootenv"],
+    cflags: ["-std=gnu99", "-Wno-date-time"],
+}