From 495391aad8bdcefbe8b8dc7aaf452f0ac8ed98c2 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Fri, 23 Sep 2016 09:15:24 -0700 Subject: [PATCH] Updated makefiles that also add static java library targets. Bug: 31684178 Test: hidl_test and hidl_test_java Change-Id: Ib53d1be2b1535837ca97cb61796e335141fc7611 --- nfc/1.0/Android.mk | 138 +++++++++++++++++++++++++++---- tests/baz/1.0/Android.mk | 68 +++++++++++++++ tests/expression/1.0/Android.mk | 30 +++++++ tests/libhwbinder/1.0/Android.mk | 30 +++++++ wifi/1.0/Android.mk | 130 +++++++++++++++++++++++++++++ 5 files changed, 379 insertions(+), 17 deletions(-) diff --git a/nfc/1.0/Android.mk b/nfc/1.0/Android.mk index 79a57cc822..c25faa477e 100644 --- a/nfc/1.0/Android.mk +++ b/nfc/1.0/Android.mk @@ -85,23 +85,6 @@ intermediates := $(local-generated-sources-dir) HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX) -# -# Build types.hal (nfc_data_t) -# -GEN := $(intermediates)/android/hardware/nfc/1.0/nfc_data_t.java -$(GEN): $(HIDL) -$(GEN): PRIVATE_HIDL := $(HIDL) -$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal -$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) -$(GEN): PRIVATE_CUSTOM_TOOL = \ - $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ - -Ljava -randroid.hardware:hardware/interfaces \ - android.hardware.nfc@1.0::types.nfc_data_t - -$(GEN): $(LOCAL_PATH)/types.hal - $(transform-generated-source) -LOCAL_GENERATED_SOURCES += $(GEN) - # # Build types.hal (nfc_event_t) # @@ -136,6 +119,23 @@ $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) +# +# Build types.hal (nfc_data_t) +# +GEN := $(intermediates)/android/hardware/nfc/1.0/nfc_data_t.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Ljava -randroid.hardware:hardware/interfaces \ + android.hardware.nfc@1.0::types.nfc_data_t + +$(GEN): $(LOCAL_PATH)/types.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) + # # Build INfc.hal # @@ -178,4 +178,108 @@ LOCAL_GENERATED_SOURCES += $(GEN) include $(BUILD_JAVA_LIBRARY) +################################################################################ + +include $(CLEAR_VARS) +LOCAL_MODULE := android.hardware.nfc@1.0-java-static +LOCAL_MODULE_CLASS := JAVA_LIBRARIES + +intermediates := $(local-generated-sources-dir) + +HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX) + +# +# Build types.hal (nfc_event_t) +# +GEN := $(intermediates)/android/hardware/nfc/1.0/nfc_event_t.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Ljava -randroid.hardware:hardware/interfaces \ + android.hardware.nfc@1.0::types.nfc_event_t + +$(GEN): $(LOCAL_PATH)/types.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) + +# +# Build types.hal (nfc_status_t) +# +GEN := $(intermediates)/android/hardware/nfc/1.0/nfc_status_t.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Ljava -randroid.hardware:hardware/interfaces \ + android.hardware.nfc@1.0::types.nfc_status_t + +$(GEN): $(LOCAL_PATH)/types.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) + +# +# Build types.hal (nfc_data_t) +# +GEN := $(intermediates)/android/hardware/nfc/1.0/nfc_data_t.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Ljava -randroid.hardware:hardware/interfaces \ + android.hardware.nfc@1.0::types.nfc_data_t + +$(GEN): $(LOCAL_PATH)/types.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) + +# +# Build INfc.hal +# +GEN := $(intermediates)/android/hardware/nfc/1.0/INfc.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/INfc.hal +$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/INfcClientCallback.hal +$(GEN): $(LOCAL_PATH)/INfcClientCallback.hal +$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal +$(GEN): $(LOCAL_PATH)/types.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Ljava -randroid.hardware:hardware/interfaces \ + android.hardware.nfc@1.0::INfc + +$(GEN): $(LOCAL_PATH)/INfc.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) + +# +# Build INfcClientCallback.hal +# +GEN := $(intermediates)/android/hardware/nfc/1.0/INfcClientCallback.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/INfcClientCallback.hal +$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal +$(GEN): $(LOCAL_PATH)/types.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Ljava -randroid.hardware:hardware/interfaces \ + android.hardware.nfc@1.0::INfcClientCallback + +$(GEN): $(LOCAL_PATH)/INfcClientCallback.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) +include $(BUILD_STATIC_JAVA_LIBRARY) + + + include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/tests/baz/1.0/Android.mk b/tests/baz/1.0/Android.mk index 6ccb89b91b..f28709a521 100644 --- a/tests/baz/1.0/Android.mk +++ b/tests/baz/1.0/Android.mk @@ -157,4 +157,72 @@ LOCAL_GENERATED_SOURCES += $(GEN) include $(BUILD_JAVA_LIBRARY) +################################################################################ + +include $(CLEAR_VARS) +LOCAL_MODULE := android.hardware.tests.baz@1.0-java-static +LOCAL_MODULE_CLASS := JAVA_LIBRARIES + +intermediates := $(local-generated-sources-dir) + +HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX) + +# +# Build IBase.hal +# +GEN := $(intermediates)/android/hardware/tests/baz/1.0/IBase.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBase.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Ljava -randroid.hardware:hardware/interfaces \ + android.hardware.tests.baz@1.0::IBase + +$(GEN): $(LOCAL_PATH)/IBase.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) + +# +# Build IBaz.hal +# +GEN := $(intermediates)/android/hardware/tests/baz/1.0/IBaz.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBaz.hal +$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IBase.hal +$(GEN): $(LOCAL_PATH)/IBase.hal +$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IBazCallback.hal +$(GEN): $(LOCAL_PATH)/IBazCallback.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Ljava -randroid.hardware:hardware/interfaces \ + android.hardware.tests.baz@1.0::IBaz + +$(GEN): $(LOCAL_PATH)/IBaz.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) + +# +# Build IBazCallback.hal +# +GEN := $(intermediates)/android/hardware/tests/baz/1.0/IBazCallback.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBazCallback.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Ljava -randroid.hardware:hardware/interfaces \ + android.hardware.tests.baz@1.0::IBazCallback + +$(GEN): $(LOCAL_PATH)/IBazCallback.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) +include $(BUILD_STATIC_JAVA_LIBRARY) + + + include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/tests/expression/1.0/Android.mk b/tests/expression/1.0/Android.mk index 08713a7946..bc6b50e3e2 100644 --- a/tests/expression/1.0/Android.mk +++ b/tests/expression/1.0/Android.mk @@ -64,4 +64,34 @@ LOCAL_GENERATED_SOURCES += $(GEN) include $(BUILD_JAVA_LIBRARY) +################################################################################ + +include $(CLEAR_VARS) +LOCAL_MODULE := android.hardware.tests.expression@1.0-java-static +LOCAL_MODULE_CLASS := JAVA_LIBRARIES + +intermediates := $(local-generated-sources-dir) + +HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX) + +# +# Build IExpression.hal +# +GEN := $(intermediates)/android/hardware/tests/expression/1.0/IExpression.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IExpression.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Ljava -randroid.hardware:hardware/interfaces \ + android.hardware.tests.expression@1.0::IExpression + +$(GEN): $(LOCAL_PATH)/IExpression.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) +include $(BUILD_STATIC_JAVA_LIBRARY) + + + include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/tests/libhwbinder/1.0/Android.mk b/tests/libhwbinder/1.0/Android.mk index 358c3db7c2..e29b3312e5 100644 --- a/tests/libhwbinder/1.0/Android.mk +++ b/tests/libhwbinder/1.0/Android.mk @@ -64,4 +64,34 @@ LOCAL_GENERATED_SOURCES += $(GEN) include $(BUILD_JAVA_LIBRARY) +################################################################################ + +include $(CLEAR_VARS) +LOCAL_MODULE := android.hardware.tests.libhwbinder@1.0-java-static +LOCAL_MODULE_CLASS := JAVA_LIBRARIES + +intermediates := $(local-generated-sources-dir) + +HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX) + +# +# Build IBenchmark.hal +# +GEN := $(intermediates)/android/hardware/tests/libhwbinder/1.0/IBenchmark.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBenchmark.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Ljava -randroid.hardware:hardware/interfaces \ + android.hardware.tests.libhwbinder@1.0::IBenchmark + +$(GEN): $(LOCAL_PATH)/IBenchmark.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) +include $(BUILD_STATIC_JAVA_LIBRARY) + + + include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/wifi/1.0/Android.mk b/wifi/1.0/Android.mk index 7d32820435..e17771fa0b 100644 --- a/wifi/1.0/Android.mk +++ b/wifi/1.0/Android.mk @@ -239,3 +239,133 @@ $(GEN): $(LOCAL_PATH)/IWifiEventCallback.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) include $(BUILD_JAVA_LIBRARY) + + +################################################################################ + +include $(CLEAR_VARS) +LOCAL_MODULE := android.hardware.wifi@1.0-java-static +LOCAL_MODULE_CLASS := JAVA_LIBRARIES + +intermediates := $(local-generated-sources-dir) + +HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX) + +# +# Build types.hal (CommandFailureReason) +# +GEN := $(intermediates)/android/hardware/wifi/1.0/CommandFailureReason.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Ljava -randroid.hardware:hardware/interfaces \ + android.hardware.wifi@1.0::types.CommandFailureReason + +$(GEN): $(LOCAL_PATH)/types.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) + +# +# Build types.hal (FailureReason) +# +GEN := $(intermediates)/android/hardware/wifi/1.0/FailureReason.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Ljava -randroid.hardware:hardware/interfaces \ + android.hardware.wifi@1.0::types.FailureReason + +$(GEN): $(LOCAL_PATH)/types.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) + +# +# Build IWifi.hal +# +GEN := $(intermediates)/android/hardware/wifi/1.0/IWifi.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifi.hal +$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiChip.hal +$(GEN): $(LOCAL_PATH)/IWifiChip.hal +$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiEventCallback.hal +$(GEN): $(LOCAL_PATH)/IWifiEventCallback.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Ljava -randroid.hardware:hardware/interfaces \ + android.hardware.wifi@1.0::IWifi + +$(GEN): $(LOCAL_PATH)/IWifi.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) + +# +# Build IWifiChip.hal +# +GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiChip.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiChip.hal +$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiChipEventCallback.hal +$(GEN): $(LOCAL_PATH)/IWifiChipEventCallback.hal +$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal +$(GEN): $(LOCAL_PATH)/types.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Ljava -randroid.hardware:hardware/interfaces \ + android.hardware.wifi@1.0::IWifiChip + +$(GEN): $(LOCAL_PATH)/IWifiChip.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) + +# +# Build IWifiChipEventCallback.hal +# +GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiChipEventCallback.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiChipEventCallback.hal +$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal +$(GEN): $(LOCAL_PATH)/types.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Ljava -randroid.hardware:hardware/interfaces \ + android.hardware.wifi@1.0::IWifiChipEventCallback + +$(GEN): $(LOCAL_PATH)/IWifiChipEventCallback.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) + +# +# Build IWifiEventCallback.hal +# +GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiEventCallback.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiEventCallback.hal +$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal +$(GEN): $(LOCAL_PATH)/types.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Ljava -randroid.hardware:hardware/interfaces \ + android.hardware.wifi@1.0::IWifiEventCallback + +$(GEN): $(LOCAL_PATH)/IWifiEventCallback.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) +include $(BUILD_STATIC_JAVA_LIBRARY) + + + +include $(call all-makefiles-under,$(LOCAL_PATH))