Split hbci/hdll chip support into static libs
Bug: 382359822
Test: check uwb both with sr100 and sr200
Change-Id: Iaae6fffba360059398e5f97d52acffbec6cb942f
(cherry picked from commit 3001e0c432e99eaa7d07e20738df69a32dcb167b)
diff --git a/Android.bp b/Android.bp
index 95745ce..af11258 100644
--- a/Android.bp
+++ b/Android.bp
@@ -16,8 +16,8 @@
soong_config_string_variable {
name: "chip",
values: [
- "SR1XX",
- "SR200",
+ "hbci",
+ "hdll",
],
}
@@ -27,9 +27,7 @@
config_namespace: "nxp_uwb",
variables: ["chip"],
properties: [
- "cflags",
- "srcs",
- "local_include_dirs",
+ "static_libs",
],
}
@@ -37,22 +35,14 @@
name: "uwb_defaults",
soong_config_variables: {
chip: {
- SR200: {
- cflags: ["-DSR200=TRUE"],
- srcs: [
- "halimpl/hal/sr200/*.cc",
- ],
- local_include_dirs: [
- "halimpl/hal/sr200",
+ hdll: {
+ static_libs: [
+ "nxp_uwb_hdll",
],
},
conditions_default: {
- cflags: ["-DSR1XX=TRUE"],
- srcs: [
- "halimpl/hal/hbci/*.cc",
- ],
- local_include_dirs: [
- "halimpl/hal/hbci",
+ static_libs: [
+ "nxp_uwb_hbci",
],
},
},
diff --git a/halimpl/hal/hbci/Android.bp b/halimpl/hal/hbci/Android.bp
new file mode 100644
index 0000000..92c9aad
--- /dev/null
+++ b/halimpl/hal/hbci/Android.bp
@@ -0,0 +1,23 @@
+package {
+ default_applicable_licenses: ["hardware_nxp_uwb_license"],
+}
+
+cc_library_static {
+ name: "nxp_uwb_hbci",
+ srcs: [
+ "NxpUwbChipHbciModule.cc",
+ "phNxpUciHal_hbci_fwd.cc",
+ ],
+ shared_libs: [
+ "android.hardware.uwb-V1-ndk",
+ ],
+ include_dirs: [
+ "hardware/nxp/uwb/extns/inc",
+ "hardware/nxp/uwb/halimpl/hal",
+ "hardware/nxp/uwb/halimpl/inc",
+ "hardware/nxp/uwb/halimpl/inc/common",
+ "hardware/nxp/uwb/halimpl/log",
+ "hardware/nxp/uwb/halimpl/tml",
+ "hardware/nxp/uwb/halimpl/utils",
+ ],
+}