Home | History | Annotate | Download | only in template
      1 // Generate .vts spec files.
      2 hal2vts {
      3     name: "android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.spec",
      4     srcs: [
      5         ":android.hardware.{HAL_NAME}@{HAL_VERSION}_hal",
      6     ],
      7     out: [
      8         {GENERATED_VTS_SPECS}
      9     ],
     10 }
     11 
     12 // Build VTS driver.
     13 genrule {
     14     name: "android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.driver_genc++",
     15     tools: ["hidl-gen", "vtsc"],
     16     cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.{HAL_NAME}@{HAL_VERSION} && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/{HAL_NAME_DIR}/{HAL_VERSION}/ $(genDir)/android/hardware/{HAL_NAME_DIR}/{HAL_VERSION}/",
     17     srcs: [
     18         ":android.hardware.{HAL_NAME}@{HAL_VERSION}_hal",
     19     ],
     20     out: [
     21         {GENERATED_SOURCES}
     22     ],
     23 }
     24 
     25 genrule {
     26     name: "android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.driver_genc++_headers",
     27     tools: ["hidl-gen", "vtsc"],
     28     cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.{HAL_NAME}@{HAL_VERSION} && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/{HAL_NAME_DIR}/{HAL_VERSION}/ $(genDir)/android/hardware/{HAL_NAME_DIR}/{HAL_VERSION}/",
     29     srcs: [
     30         ":android.hardware.{HAL_NAME}@{HAL_VERSION}_hal",
     31     ],
     32     out: [
     33         {GENERATED_HEADERS}
     34     ],
     35 }
     36 
     37 cc_library_shared {
     38     name: "android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.driver",
     39     generated_sources: ["android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.driver_genc++"],
     40     generated_headers: ["android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.driver_genc++_headers"],
     41     export_generated_headers: ["android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.driver_genc++_headers"],
     42     shared_libs: [
     43         "libhidlbase",
     44         "libhidltransport",
     45         "libhwbinder",
     46         "liblog",
     47         "libutils",
     48         "libcutils",
     49         "libvts_common",
     50         "libvts_datatype",
     51         "libvts_drivercomm",
     52         "libvts_measurement",
     53         "libvts_multidevice_proto",
     54         "libcamera_metadata",
     55         "libprotobuf-cpp-full",
     56         "android.hardware.{HAL_NAME}@{HAL_VERSION}",
     57         {IMPORTED_DRIVER_PACKAGES}
     58     ],
     59     export_shared_lib_headers: [
     60         {IMPORTED_DRIVER_PACKAGES}
     61     ],
     62 }
     63 
     64 // Build VTS profiler.
     65 genrule {
     66     name: "android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.profiler_genc++",
     67     tools: ["hidl-gen", "vtsc"],
     68     cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.{HAL_NAME}@{HAL_VERSION} && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/{HAL_NAME_DIR}/{HAL_VERSION}/ $(genDir)/android/hardware/{HAL_NAME_DIR}/{HAL_VERSION}/",
     69     srcs: [
     70         ":android.hardware.{HAL_NAME}@{HAL_VERSION}_hal",
     71     ],
     72     out: [
     73         {GENERATED_SOURCES}
     74     ],
     75 }
     76 
     77 genrule {
     78     name: "android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.profiler_genc++_headers",
     79     tools: ["hidl-gen", "vtsc"],
     80     cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.{HAL_NAME}@{HAL_VERSION} && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/{HAL_NAME_DIR}/{HAL_VERSION}/ $(genDir)/android/hardware/{HAL_NAME_DIR}/{HAL_VERSION}/",
     81     srcs: [
     82         ":android.hardware.{HAL_NAME}@{HAL_VERSION}_hal",
     83     ],
     84     out: [
     85         {GENERATED_HEADERS}
     86     ],
     87 }
     88 
     89 cc_library_shared {
     90     name: "android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.profiler",
     91     generated_sources: ["android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.profiler_genc++"],
     92     generated_headers: ["android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.profiler_genc++_headers"],
     93     export_generated_headers: ["android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.profiler_genc++_headers"],
     94     shared_libs: [
     95         "libbase",
     96         "libhidlbase",
     97         "libhidltransport",
     98         "libvts_profiling",
     99         "libvts_multidevice_proto",
    100         "libprotobuf-cpp-full",
    101         "android.hardware.{HAL_NAME}@{HAL_VERSION}",
    102         {IMPORTED_PROFILER_PACKAGES}
    103     ],
    104 }
    105 
    106