From 42a6dddd4a3962af77ac46feea0ffcffb0142f3d Mon Sep 17 00:00:00 2001 From: Zhuoyao Zhang Date: Wed, 21 Dec 2016 10:27:35 -0800 Subject: [PATCH] Update Android.bp of Nfc with make rule for profiler. Bug:31930023 Test: mma Change-Id: I4e159d4f0b37fdd4738cdee354c4fe05406baa02 --- nfc/1.0/Android.bp | 90 ++++++++++++++++++++++++++++++++++++++++++ nfc/1.0/vts/Android.mk | 66 +------------------------------ 2 files changed, 91 insertions(+), 65 deletions(-) diff --git a/nfc/1.0/Android.bp b/nfc/1.0/Android.bp index 930fb143dc..af571f38df 100644 --- a/nfc/1.0/Android.bp +++ b/nfc/1.0/Android.bp @@ -124,3 +124,93 @@ cc_library_shared { "android.hidl.base@1.0", ], } + +genrule { + name: "android.hardware.nfc@1.0-INfc-vts.profiler_genc++", + tools: ["hidl-gen", "vtsc"], + cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.nfc@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/nfc/1.0/ $(genDir)/android/hardware/nfc/1.0/", + srcs: [ + "INfc.hal", + "types.hal", + ], + out: [ + "android/hardware/nfc/1.0/Nfc.vts.cpp", + "android/hardware/nfc/1.0/types.vts.cpp", + ], +} + +genrule { + name: "android.hardware.nfc@1.0-INfc-vts.profiler_genc++_headers", + tools: ["hidl-gen", "vtsc"], + cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.nfc@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/nfc/1.0/ $(genDir)/android/hardware/nfc/1.0/", + srcs: [ + "INfc.hal", + "types.hal", + ], + out: [ + "android/hardware/nfc/1.0/Nfc.vts.h", + "android/hardware/nfc/1.0/types.vts.h", + ], +} + +cc_library_shared { + name: "android.hardware.nfc@1.0-INfc-vts.profiler", + generated_sources: ["android.hardware.nfc@1.0-INfc-vts.profiler_genc++"], + generated_headers: ["android.hardware.nfc@1.0-INfc-vts.profiler_genc++_headers"], + export_generated_headers: ["android.hardware.nfc@1.0-INfc-vts.profiler_genc++_headers"], + shared_libs: [ + "libbase", + "libhidlbase", + "libhidltransport", + "libvts_profiling", + "libvts_multidevice_proto", + "libprotobuf-cpp-full", + "android.hidl.base@1.0", + "android.hardware.nfc@1.0", + ], +} + +genrule { + name: "android.hardware.nfc@1.0-INfcClientCallback-vts.profiler_genc++", + tools: ["hidl-gen", "vtsc"], + cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.nfc@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/nfc/1.0/ $(genDir)/android/hardware/nfc/1.0/", + srcs: [ + "INfcClientCallback.hal", + "types.hal", + ], + out: [ + "android/hardware/nfc/1.0/NfcClientCallback.vts.cpp", + "android/hardware/nfc/1.0/types.vts.cpp", + ], +} + +genrule { + name: "android.hardware.nfc@1.0-INfcClientCallback-vts.profiler_genc++_headers", + tools: ["hidl-gen", "vtsc"], + cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.nfc@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/nfc/1.0/ $(genDir)/android/hardware/nfc/1.0/", + srcs: [ + "INfcClientCallback.hal", + "types.hal", + ], + out: [ + "android/hardware/nfc/1.0/NfcClientCallback.vts.h", + "android/hardware/nfc/1.0/types.vts.h", + ], +} + +cc_library_shared { + name: "android.hardware.nfc@1.0-INfcClientCallback-vts.profiler", + generated_sources: ["android.hardware.nfc@1.0-INfcClientCallback-vts.profiler_genc++"], + generated_headers: ["android.hardware.nfc@1.0-INfcClientCallback-vts.profiler_genc++_headers"], + export_generated_headers: ["android.hardware.nfc@1.0-INfcClientCallback-vts.profiler_genc++_headers"], + shared_libs: [ + "libbase", + "libhidlbase", + "libhidltransport", + "libvts_profiling", + "libvts_multidevice_proto", + "libprotobuf-cpp-full", + "android.hidl.base@1.0", + "android.hardware.nfc@1.0", + ], +} diff --git a/nfc/1.0/vts/Android.mk b/nfc/1.0/vts/Android.mk index e7dec14579..f9e32763ff 100644 --- a/nfc/1.0/vts/Android.mk +++ b/nfc/1.0/vts/Android.mk @@ -16,68 +16,4 @@ LOCAL_PATH := $(call my-dir) -# build profiler for Nfc. -include $(CLEAR_VARS) - -LOCAL_MODULE := libvts_profiler_hidl_nfc@1.0 - -LOCAL_SRC_FILES := \ - Nfc.vts \ - types.vts \ - -LOCAL_C_INCLUDES += \ - test/vts/drivers/libprofiling \ - -LOCAL_VTS_MODE := PROFILER - -LOCAL_SHARED_LIBRARIES := \ - android.hardware.nfc@1.0 \ - libbase \ - libcutils \ - liblog \ - libhidlbase \ - libhidltransport \ - libhwbinder \ - libprotobuf-cpp-full \ - libvts_common \ - libvts_multidevice_proto \ - libvts_profiling \ - libutils \ - -LOCAL_PROTOC_OPTIMIZE_TYPE := full - -include $(BUILD_SHARED_LIBRARY) - -# build profiler for NfcClientCallback. -include $(CLEAR_VARS) - -LOCAL_MODULE := libvts_profiler_hidl_nfc_client_callback_@1.0 - -LOCAL_SRC_FILES := \ - NfcClientCallback.vts \ - types.vts \ - -LOCAL_C_INCLUDES += \ - test/vts/drivers/libprofiling \ - -LOCAL_VTS_MODE := PROFILER - -LOCAL_SHARED_LIBRARIES := \ - android.hardware.nfc@1.0 \ - libbase \ - libcutils \ - liblog \ - libhidlbase \ - libhidltransport \ - libhwbinder \ - libprotobuf-cpp-full \ - libvts_common \ - libvts_multidevice_proto \ - libvts_profiling \ - libutils \ - -LOCAL_PROTOC_OPTIMIZE_TYPE := full - -include $(BUILD_SHARED_LIBRARY) - -include $(call all-makefiles-under,$(LOCAL_PATH)) +include $(call all-subdir-makefiles)