Update makefiles for hidl adapter.
Bug: 37518178
Test: manual
Change-Id: I50e999907d3c64d2b039272b823971998da64d1b
diff --git a/broadcastradio/1.0/Android.bp b/broadcastradio/1.0/Android.bp
index 5b8e239..a81db93 100644
--- a/broadcastradio/1.0/Android.bp
+++ b/broadcastradio/1.0/Android.bp
@@ -85,3 +85,82 @@
"libutils",
],
}
+
+genrule {
+ name: "android.hardware.broadcastradio@1.0-adapter-helper_genc++",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.0",
+ srcs: [
+ ":android.hardware.broadcastradio@1.0_hal",
+ ],
+ out: [
+ "android/hardware/broadcastradio/1.0/ABroadcastRadio.cpp",
+ "android/hardware/broadcastradio/1.0/ABroadcastRadioFactory.cpp",
+ "android/hardware/broadcastradio/1.0/ATuner.cpp",
+ "android/hardware/broadcastradio/1.0/ATunerCallback.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.broadcastradio@1.0-adapter-helper_genc++_headers",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.0",
+ srcs: [
+ ":android.hardware.broadcastradio@1.0_hal",
+ ],
+ out: [
+ "android/hardware/broadcastradio/1.0/ABroadcastRadio.h",
+ "android/hardware/broadcastradio/1.0/ABroadcastRadioFactory.h",
+ "android/hardware/broadcastradio/1.0/ATuner.h",
+ "android/hardware/broadcastradio/1.0/ATunerCallback.h",
+ ],
+}
+
+
+cc_library {
+ name: "android.hardware.broadcastradio@1.0-adapter-helper",
+ defaults: ["hidl-module-defaults"],
+ generated_sources: ["android.hardware.broadcastradio@1.0-adapter-helper_genc++"],
+ generated_headers: ["android.hardware.broadcastradio@1.0-adapter-helper_genc++_headers"],
+ export_generated_headers: ["android.hardware.broadcastradio@1.0-adapter-helper_genc++_headers"],
+ vendor_available: true,
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "libhidladapter",
+ "android.hardware.broadcastradio@1.0",
+ "android.hidl.base@1.0-adapter-helper",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "libhidladapter",
+ "android.hardware.broadcastradio@1.0",
+ "android.hidl.base@1.0-adapter-helper",
+ ],
+}
+
+genrule {
+ name: "android.hardware.broadcastradio@1.0-adapter_genc++",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.0",
+ out: ["main.cpp"]}
+
+cc_test {
+ name: "android.hardware.broadcastradio@1.0-adapter",
+ shared_libs: [
+ "libhidladapter",
+ "libhidlbase",
+ "libhidltransport",
+ "libutils",
+ "android.hardware.broadcastradio@1.0",
+ "android.hardware.broadcastradio@1.0-adapter-helper",
+ ],
+ generated_sources: ["android.hardware.broadcastradio@1.0-adapter_genc++"],
+}
diff --git a/broadcastradio/1.1/Android.bp b/broadcastradio/1.1/Android.bp
index 12e23d6..6626b52 100644
--- a/broadcastradio/1.1/Android.bp
+++ b/broadcastradio/1.1/Android.bp
@@ -87,3 +87,87 @@
"android.hardware.broadcastradio@1.0",
],
}
+
+genrule {
+ name: "android.hardware.broadcastradio@1.1-adapter-helper_genc++",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.1",
+ srcs: [
+ ":android.hardware.broadcastradio@1.1_hal",
+ ],
+ out: [
+ "android/hardware/broadcastradio/1.1/ABroadcastRadio.cpp",
+ "android/hardware/broadcastradio/1.1/ABroadcastRadioFactory.cpp",
+ "android/hardware/broadcastradio/1.1/ATuner.cpp",
+ "android/hardware/broadcastradio/1.1/ATunerCallback.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.broadcastradio@1.1-adapter-helper_genc++_headers",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.1",
+ srcs: [
+ ":android.hardware.broadcastradio@1.1_hal",
+ ],
+ out: [
+ "android/hardware/broadcastradio/1.1/ABroadcastRadio.h",
+ "android/hardware/broadcastradio/1.1/ABroadcastRadioFactory.h",
+ "android/hardware/broadcastradio/1.1/ATuner.h",
+ "android/hardware/broadcastradio/1.1/ATunerCallback.h",
+ ],
+}
+
+
+cc_library {
+ name: "android.hardware.broadcastradio@1.1-adapter-helper",
+ defaults: ["hidl-module-defaults"],
+ generated_sources: ["android.hardware.broadcastradio@1.1-adapter-helper_genc++"],
+ generated_headers: ["android.hardware.broadcastradio@1.1-adapter-helper_genc++_headers"],
+ export_generated_headers: ["android.hardware.broadcastradio@1.1-adapter-helper_genc++_headers"],
+ vendor_available: true,
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "libhidladapter",
+ "android.hardware.broadcastradio@1.0",
+ "android.hardware.broadcastradio@1.1",
+ "android.hardware.broadcastradio@1.0-adapter-helper",
+ "android.hidl.base@1.0-adapter-helper",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "libhidladapter",
+ "android.hardware.broadcastradio@1.0",
+ "android.hardware.broadcastradio@1.1",
+ "android.hardware.broadcastradio@1.0-adapter-helper",
+ "android.hidl.base@1.0-adapter-helper",
+ ],
+}
+
+genrule {
+ name: "android.hardware.broadcastradio@1.1-adapter_genc++",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.1",
+ out: ["main.cpp"]}
+
+cc_test {
+ name: "android.hardware.broadcastradio@1.1-adapter",
+ shared_libs: [
+ "libhidladapter",
+ "libhidlbase",
+ "libhidltransport",
+ "libutils",
+ "android.hardware.broadcastradio@1.0",
+ "android.hardware.broadcastradio@1.1",
+ "android.hardware.broadcastradio@1.1-adapter-helper",
+ ],
+ generated_sources: ["android.hardware.broadcastradio@1.1-adapter_genc++"],
+}