Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab472ebf authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Generate VTS driver lib directly from .hal files (for NFC)"

parents a86dab68 b7b2ff40
Loading
Loading
Loading
Loading
+62 −0
Original line number Diff line number Diff line
@@ -62,3 +62,65 @@ cc_library_shared {
        "android.hidl.base@1.0",
    ],
}

genrule {
    name: "android.hardware.nfc.vts.driver@1.0_genc++",
    tools: ["hidl-gen", "vtsc"],
    cmd: "$(location hidl-gen) -o $(genDir) -L vts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.nfc@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/nfc/1.0/ $(genDir)/android/hardware/nfc/1.0/",
    srcs: [
        "types.hal",
        "INfc.hal",
        "INfcClientCallback.hal",
    ],
    out: [
        "android/hardware/nfc/1.0/types.vts.cpp",
        "android/hardware/nfc/1.0/Nfc.vts.cpp",
        "android/hardware/nfc/1.0/NfcClientCallback.vts.cpp",
    ],
}

genrule {
    name: "android.hardware.nfc.vts.driver@1.0_genc++_headers",
    tools: ["hidl-gen", "vtsc"],
    cmd: "$(location hidl-gen) -o $(genDir) -L vts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.nfc@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/nfc/1.0/ $(genDir)/android/hardware/nfc/1.0/",
    srcs: [
        "types.hal",
        "INfc.hal",
        "INfcClientCallback.hal",
    ],
    out: [
        "android/hardware/nfc/1.0/types.vts.h",
        "android/hardware/nfc/1.0/Nfc.vts.h",
        "android/hardware/nfc/1.0/NfcClientCallback.vts.h",
    ],
}

cc_library_shared {
    name: "android.hardware.nfc.vts.driver@1.0",
    generated_sources: ["android.hardware.nfc.vts.driver@1.0_genc++"],
    generated_headers: ["android.hardware.nfc.vts.driver@1.0_genc++_headers"],
    export_generated_headers: ["android.hardware.nfc.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.nfc@1.0",
    ],
    export_shared_lib_headers: [
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "libutils",
        "android.hidl.base@1.0",
    ],
}
+1 −32
Original line number Diff line number Diff line
@@ -16,37 +16,6 @@

LOCAL_PATH := $(call my-dir)

# build VTS driver for Nfc v1.0.
include $(CLEAR_VARS)

LOCAL_MODULE := libvts_driver_hidl_nfc@1.0

LOCAL_SRC_FILES := \
  Nfc.vts \
  NfcClientCallback.vts \
  types.vts \

LOCAL_SHARED_LIBRARIES += \
  android.hardware.nfc@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 profiler for Nfc.
include $(CLEAR_VARS)