use the new oneshot vts driver generation build rule
Test: mma
Change-Id: Ib15399d6e7d5049b7a1912623ac2d95de9dfba73
diff --git a/tv/cec/1.0/Android.bp b/tv/cec/1.0/Android.bp
index 53b1ce8..b6dc3b1 100644
--- a/tv/cec/1.0/Android.bp
+++ b/tv/cec/1.0/Android.bp
@@ -62,3 +62,65 @@
"android.hidl.base@1.0",
],
}
+
+genrule {
+ name: "android.hardware.tv.cec.vts.driver@1.0_genc++",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.cec@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tv/cec/1.0/ $(genDir)/android/hardware/tv/cec/1.0/",
+ srcs: [
+ "types.hal",
+ "IHdmiCec.hal",
+ "IHdmiCecCallback.hal",
+ ],
+ out: [
+ "android/hardware/tv/cec/1.0/types.vts.cpp",
+ "android/hardware/tv/cec/1.0/HdmiCec.vts.cpp",
+ "android/hardware/tv/cec/1.0/HdmiCecCallback.vts.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.tv.cec.vts.driver@1.0_genc++_headers",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.cec@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tv/cec/1.0/ $(genDir)/android/hardware/tv/cec/1.0/",
+ srcs: [
+ "types.hal",
+ "IHdmiCec.hal",
+ "IHdmiCecCallback.hal",
+ ],
+ out: [
+ "android/hardware/tv/cec/1.0/types.vts.h",
+ "android/hardware/tv/cec/1.0/HdmiCec.vts.h",
+ "android/hardware/tv/cec/1.0/HdmiCecCallback.vts.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.tv.cec.vts.driver@1.0",
+ generated_sources: ["android.hardware.tv.cec.vts.driver@1.0_genc++"],
+ generated_headers: ["android.hardware.tv.cec.vts.driver@1.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.tv.cec.vts.driver@1.0_genc++_headers"],
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "libvts_common",
+ "libvts_datatype",
+ "libvts_measurement",
+ "libvts_multidevice_proto",
+ "libcamera_metadata",
+ "libprotobuf-cpp-full",
+ "android.hidl.base@1.0",
+ "android.hardware.tv.cec@1.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hidl.base@1.0",
+ ],
+}
diff --git a/tv/cec/1.0/vts/Android.mk b/tv/cec/1.0/vts/Android.mk
index d25fb31..a7eeb33 100644
--- a/tv/cec/1.0/vts/Android.mk
+++ b/tv/cec/1.0/vts/Android.mk
@@ -16,38 +16,6 @@
LOCAL_PATH := $(call my-dir)
-# build VTS driver for TvCec v1.0.
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := libvts_driver_hidl_tv_cec@1.0
-
-LOCAL_SRC_FILES := \
- HdmiCec.vts \
- HdmiCecCallback.vts \
- types.vts \
-
-LOCAL_SHARED_LIBRARIES += \
- android.hardware.tv.cec@1.0 \
- libbase \
- libutils \
- libcutils \
- liblog \
- libhidlbase \
- libhidltransport \
- libhwbinder \
- libprotobuf-cpp-full \
- libvts_common \
- libvts_datatype \
- libvts_measurement \
- libvts_multidevice_proto \
-
-LOCAL_PROTOC_OPTIMIZE_TYPE := full
-
-LOCAL_MULTILIB := both
-
-include $(BUILD_SHARED_LIBRARY)
-
-
# build VTS profiler for HdmiCec
include $(CLEAR_VARS)
@@ -117,4 +85,4 @@
include $(BUILD_SHARED_LIBRARY)
-include $(call all-makefiles-under,$(LOCAL_PATH))
\ No newline at end of file
+include $(call all-makefiles-under,$(LOCAL_PATH))