Update makefiles after AOSP push.
authorSteven Moreland <smoreland@google.com>
Wed, 1 Nov 2017 23:42:15 +0000 (16:42 -0700)
committerSteven Moreland <smoreland@google.com>
Wed, 1 Nov 2017 23:42:15 +0000 (16:42 -0700)
Test: none
Change-Id: If3ce74f4d2250d33820cbd864ff56bba6f9e6b67

15 files changed:
configstore/1.1/Android.bp
configstore/1.1/Android.mk [deleted file]
oemlock/1.0/Android.bp
oemlock/1.0/Android.mk [deleted file]
power/1.1/Android.bp
power/1.1/Android.mk [deleted file]
usb/1.1/Android.bp
usb/1.1/Android.mk [deleted file]
vibrator/1.1/Android.bp
vibrator/1.1/Android.mk [deleted file]
weaver/1.0/Android.bp
weaver/1.0/Android.mk [deleted file]
wifi/1.1/Android.bp
wifi/1.1/Android.mk [deleted file]
wifi/offload/1.0/Android.bp

index 92fb7c13995e098dee6fa690038ba8d9d31610da..3f8d580153b9a790672ca1929741202fc1268dc1 100644 (file)
@@ -62,3 +62,109 @@ cc_library {
         "android.hardware.configstore@1.0",
     ],
 }
+
+genrule {
+    name: "android.hardware.configstore-V1.1-java_gen_java",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.1",
+    srcs: [
+        ":android.hardware.configstore@1.1_hal",
+    ],
+    out: [
+        "android/hardware/configstore/V1_1/ISurfaceFlingerConfigs.java",
+    ],
+}
+
+java_library {
+    name: "android.hardware.configstore-V1.1-java",
+    no_framework_libs: true,
+    defaults: ["hidl-java-module-defaults"],
+    srcs: [":android.hardware.configstore-V1.1-java_gen_java"],
+    libs: [
+        "hwbinder",
+        "android.hardware.configstore-V1.0-java",
+        "android.hidl.base-V1.0-java",
+    ]
+}
+
+// This package does not export any types. Not creating java constants export.
+
+
+genrule {
+    name: "android.hardware.configstore@1.1-adapter-helper_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.1",
+    srcs: [
+        ":android.hardware.configstore@1.1_hal",
+    ],
+    out: [
+        "android/hardware/configstore/1.1/ASurfaceFlingerConfigs.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.configstore@1.1-adapter-helper_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.1",
+    srcs: [
+        ":android.hardware.configstore@1.1_hal",
+    ],
+    out: [
+        "android/hardware/configstore/1.1/ASurfaceFlingerConfigs.h",
+    ],
+}
+
+cc_library {
+    name: "android.hardware.configstore@1.1-adapter-helper",
+    defaults: ["hidl-module-defaults"],
+    generated_sources: ["android.hardware.configstore@1.1-adapter-helper_genc++"],
+    generated_headers: ["android.hardware.configstore@1.1-adapter-helper_genc++_headers"],
+    export_generated_headers: ["android.hardware.configstore@1.1-adapter-helper_genc++_headers"],
+    vendor_available: true,
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "libhidladapter",
+        "android.hardware.configstore@1.0",
+        "android.hardware.configstore@1.1",
+        "android.hardware.configstore@1.0-adapter-helper",
+        "android.hidl.base@1.0-adapter-helper",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "libhidladapter",
+        "android.hardware.configstore@1.0",
+        "android.hardware.configstore@1.1",
+        "android.hardware.configstore@1.0-adapter-helper",
+        "android.hidl.base@1.0-adapter-helper",
+    ],
+}
+
+genrule {
+    name: "android.hardware.configstore@1.1-adapter_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.1",
+    out: ["main.cpp"]
+}
+
+cc_test {
+    name: "android.hardware.configstore@1.1-adapter",
+    defaults: ["hidl-module-defaults"],
+    shared_libs: [
+        "libhidladapter",
+        "libhidlbase",
+        "libhidltransport",
+        "libutils",
+        "android.hardware.configstore@1.0",
+        "android.hardware.configstore@1.1",
+        "android.hardware.configstore@1.1-adapter-helper",
+    ],
+    generated_sources: ["android.hardware.configstore@1.1-adapter_genc++"],
+}
diff --git a/configstore/1.1/Android.mk b/configstore/1.1/Android.mk
deleted file mode 100644 (file)
index b3f7053..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# This file is autogenerated by hidl-gen. Do not edit manually.
-
-LOCAL_PATH := $(call my-dir)
-
-################################################################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.configstore-V1.1-java
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-intermediates := $(call local-generated-sources-dir, COMMON)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-LOCAL_JAVA_LIBRARIES := \
-    android.hardware.configstore-V1.0-java \
-    android.hidl.base-V1.0-java \
-
-LOCAL_NO_STANDARD_LIBRARIES := true
-LOCAL_JAVA_LIBRARIES += core-oj hwbinder
-
-#
-# Build ISurfaceFlingerConfigs.hal
-#
-GEN := $(intermediates)/android/hardware/configstore/V1_1/ISurfaceFlingerConfigs.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISurfaceFlingerConfigs.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.configstore@1.1::ISurfaceFlingerConfigs
-
-$(GEN): $(LOCAL_PATH)/ISurfaceFlingerConfigs.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-include $(BUILD_JAVA_LIBRARY)
-
-
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
index 742061d5d6293d073b038c316cfd8f4de0a986a4..5dcc89e204487ac977ef5fbdcac48b9e783f8f28 100644 (file)
@@ -64,3 +64,105 @@ cc_library {
         "libutils",
     ],
 }
+
+genrule {
+    name: "android.hardware.oemlock-V1.0-java_gen_java",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.oemlock@1.0",
+    srcs: [
+        ":android.hardware.oemlock@1.0_hal",
+    ],
+    out: [
+        "android/hardware/oemlock/V1_0/OemLockSecureStatus.java",
+        "android/hardware/oemlock/V1_0/OemLockStatus.java",
+        "android/hardware/oemlock/V1_0/IOemLock.java",
+    ],
+}
+
+java_library {
+    name: "android.hardware.oemlock-V1.0-java",
+    no_framework_libs: true,
+    defaults: ["hidl-java-module-defaults"],
+    srcs: [":android.hardware.oemlock-V1.0-java_gen_java"],
+    libs: [
+        "hwbinder",
+        "android.hidl.base-V1.0-java",
+    ]
+}
+
+// This package does not export any types. Not creating java constants export.
+
+
+genrule {
+    name: "android.hardware.oemlock@1.0-adapter-helper_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.oemlock@1.0",
+    srcs: [
+        ":android.hardware.oemlock@1.0_hal",
+    ],
+    out: [
+        "android/hardware/oemlock/1.0/AOemLock.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.oemlock@1.0-adapter-helper_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.oemlock@1.0",
+    srcs: [
+        ":android.hardware.oemlock@1.0_hal",
+    ],
+    out: [
+        "android/hardware/oemlock/1.0/AOemLock.h",
+    ],
+}
+
+cc_library {
+    name: "android.hardware.oemlock@1.0-adapter-helper",
+    defaults: ["hidl-module-defaults"],
+    generated_sources: ["android.hardware.oemlock@1.0-adapter-helper_genc++"],
+    generated_headers: ["android.hardware.oemlock@1.0-adapter-helper_genc++_headers"],
+    export_generated_headers: ["android.hardware.oemlock@1.0-adapter-helper_genc++_headers"],
+    vendor_available: true,
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "libhidladapter",
+        "android.hardware.oemlock@1.0",
+        "android.hidl.base@1.0-adapter-helper",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "libhidladapter",
+        "android.hardware.oemlock@1.0",
+        "android.hidl.base@1.0-adapter-helper",
+    ],
+}
+
+genrule {
+    name: "android.hardware.oemlock@1.0-adapter_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.oemlock@1.0",
+    out: ["main.cpp"]
+}
+
+cc_test {
+    name: "android.hardware.oemlock@1.0-adapter",
+    defaults: ["hidl-module-defaults"],
+    shared_libs: [
+        "libhidladapter",
+        "libhidlbase",
+        "libhidltransport",
+        "libutils",
+        "android.hardware.oemlock@1.0",
+        "android.hardware.oemlock@1.0-adapter-helper",
+    ],
+    generated_sources: ["android.hardware.oemlock@1.0-adapter_genc++"],
+}
diff --git a/oemlock/1.0/Android.mk b/oemlock/1.0/Android.mk
deleted file mode 100644 (file)
index 91cc8f8..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-# This file is autogenerated by hidl-gen. Do not edit manually.
-
-LOCAL_PATH := $(call my-dir)
-
-################################################################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.oemlock-V1.0-java
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-intermediates := $(call local-generated-sources-dir, COMMON)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-LOCAL_JAVA_LIBRARIES := \
-    android.hidl.base-V1.0-java \
-
-LOCAL_NO_STANDARD_LIBRARIES := true
-LOCAL_JAVA_LIBRARIES += core-oj hwbinder
-
-#
-# Build types.hal (OemLockSecureStatus)
-#
-GEN := $(intermediates)/android/hardware/oemlock/V1_0/OemLockSecureStatus.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 \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.oemlock@1.0::types.OemLockSecureStatus
-
-$(GEN): $(LOCAL_PATH)/types.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (OemLockStatus)
-#
-GEN := $(intermediates)/android/hardware/oemlock/V1_0/OemLockStatus.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 \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.oemlock@1.0::types.OemLockStatus
-
-$(GEN): $(LOCAL_PATH)/types.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IOemLock.hal
-#
-GEN := $(intermediates)/android/hardware/oemlock/V1_0/IOemLock.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemLock.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 \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.oemlock@1.0::IOemLock
-
-$(GEN): $(LOCAL_PATH)/IOemLock.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-include $(BUILD_JAVA_LIBRARY)
-
-
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
index fb10aba15b25d91e21cfe4387b03d363bbd6d0dc..cea638350bf9fa783070e498d5dfb689ac29c23a 100644 (file)
@@ -66,3 +66,111 @@ cc_library {
         "android.hardware.power@1.0",
     ],
 }
+
+genrule {
+    name: "android.hardware.power-V1.1-java_gen_java",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.1",
+    srcs: [
+        ":android.hardware.power@1.1_hal",
+    ],
+    out: [
+        "android/hardware/power/V1_1/PowerStateSubsystem.java",
+        "android/hardware/power/V1_1/PowerStateSubsystemSleepState.java",
+        "android/hardware/power/V1_1/IPower.java",
+    ],
+}
+
+java_library {
+    name: "android.hardware.power-V1.1-java",
+    no_framework_libs: true,
+    defaults: ["hidl-java-module-defaults"],
+    srcs: [":android.hardware.power-V1.1-java_gen_java"],
+    libs: [
+        "hwbinder",
+        "android.hardware.power-V1.0-java",
+        "android.hidl.base-V1.0-java",
+    ]
+}
+
+// This package does not export any types. Not creating java constants export.
+
+
+genrule {
+    name: "android.hardware.power@1.1-adapter-helper_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.1",
+    srcs: [
+        ":android.hardware.power@1.1_hal",
+    ],
+    out: [
+        "android/hardware/power/1.1/APower.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.power@1.1-adapter-helper_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.1",
+    srcs: [
+        ":android.hardware.power@1.1_hal",
+    ],
+    out: [
+        "android/hardware/power/1.1/APower.h",
+    ],
+}
+
+cc_library {
+    name: "android.hardware.power@1.1-adapter-helper",
+    defaults: ["hidl-module-defaults"],
+    generated_sources: ["android.hardware.power@1.1-adapter-helper_genc++"],
+    generated_headers: ["android.hardware.power@1.1-adapter-helper_genc++_headers"],
+    export_generated_headers: ["android.hardware.power@1.1-adapter-helper_genc++_headers"],
+    vendor_available: true,
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "libhidladapter",
+        "android.hardware.power@1.0",
+        "android.hardware.power@1.1",
+        "android.hardware.power@1.0-adapter-helper",
+        "android.hidl.base@1.0-adapter-helper",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "libhidladapter",
+        "android.hardware.power@1.0",
+        "android.hardware.power@1.1",
+        "android.hardware.power@1.0-adapter-helper",
+        "android.hidl.base@1.0-adapter-helper",
+    ],
+}
+
+genrule {
+    name: "android.hardware.power@1.1-adapter_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.1",
+    out: ["main.cpp"]
+}
+
+cc_test {
+    name: "android.hardware.power@1.1-adapter",
+    defaults: ["hidl-module-defaults"],
+    shared_libs: [
+        "libhidladapter",
+        "libhidlbase",
+        "libhidltransport",
+        "libutils",
+        "android.hardware.power@1.0",
+        "android.hardware.power@1.1",
+        "android.hardware.power@1.1-adapter-helper",
+    ],
+    generated_sources: ["android.hardware.power@1.1-adapter_genc++"],
+}
diff --git a/power/1.1/Android.mk b/power/1.1/Android.mk
deleted file mode 100644 (file)
index 5044cfa..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-# This file is autogenerated by hidl-gen. Do not edit manually.
-
-LOCAL_PATH := $(call my-dir)
-
-################################################################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.power-V1.1-java
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-intermediates := $(call local-generated-sources-dir, COMMON)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-LOCAL_JAVA_LIBRARIES := \
-    android.hardware.power-V1.0-java \
-    android.hidl.base-V1.0-java \
-
-LOCAL_NO_STANDARD_LIBRARIES := true
-LOCAL_JAVA_LIBRARIES += core-oj hwbinder
-
-#
-# Build types.hal (PowerStateSubsystem)
-#
-GEN := $(intermediates)/android/hardware/power/V1_1/PowerStateSubsystem.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 \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.power@1.1::types.PowerStateSubsystem
-
-$(GEN): $(LOCAL_PATH)/types.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (PowerStateSubsystemSleepState)
-#
-GEN := $(intermediates)/android/hardware/power/V1_1/PowerStateSubsystemSleepState.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 \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.power@1.1::types.PowerStateSubsystemSleepState
-
-$(GEN): $(LOCAL_PATH)/types.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IPower.hal
-#
-GEN := $(intermediates)/android/hardware/power/V1_1/IPower.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IPower.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 \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.power@1.1::IPower
-
-$(GEN): $(LOCAL_PATH)/IPower.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-include $(BUILD_JAVA_LIBRARY)
-
-
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
index 5466001bf721ef7ce87f2686d9d78ad8999f1c4a..67bc0a6683389243af5a046e2d949259d86cf2ff 100644 (file)
@@ -73,3 +73,130 @@ cc_library {
         "android.hardware.usb@1.0",
     ],
 }
+
+genrule {
+    name: "android.hardware.usb-V1.1-java_gen_java",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1",
+    srcs: [
+        ":android.hardware.usb@1.1_hal",
+    ],
+    out: [
+        "android/hardware/usb/V1_1/PortMode_1_1.java",
+        "android/hardware/usb/V1_1/PortStatus_1_1.java",
+        "android/hardware/usb/V1_1/IUsb.java",
+        "android/hardware/usb/V1_1/IUsbCallback.java",
+    ],
+}
+
+java_library {
+    name: "android.hardware.usb-V1.1-java",
+    no_framework_libs: true,
+    defaults: ["hidl-java-module-defaults"],
+    srcs: [":android.hardware.usb-V1.1-java_gen_java"],
+    libs: [
+        "hwbinder",
+        "android.hardware.usb-V1.0-java",
+        "android.hidl.base-V1.0-java",
+    ]
+}
+
+genrule {
+    name: "android.hardware.usb-V1.1-java-constants_gen_java",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1",
+    srcs: [
+        ":android.hardware.usb@1.1_hal",
+    ],
+    out: [
+        "android/hardware/usb/V1_1/Constants.java",
+    ],
+}
+
+java_library {
+    name: "android.hardware.usb-V1.1-java-constants",
+    no_framework_libs: true,
+    defaults: ["hidl-java-module-defaults"],
+    srcs: [":android.hardware.usb-V1.1-java-constants_gen_java"],
+}
+
+genrule {
+    name: "android.hardware.usb@1.1-adapter-helper_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1",
+    srcs: [
+        ":android.hardware.usb@1.1_hal",
+    ],
+    out: [
+        "android/hardware/usb/1.1/AUsb.cpp",
+        "android/hardware/usb/1.1/AUsbCallback.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.usb@1.1-adapter-helper_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1",
+    srcs: [
+        ":android.hardware.usb@1.1_hal",
+    ],
+    out: [
+        "android/hardware/usb/1.1/AUsb.h",
+        "android/hardware/usb/1.1/AUsbCallback.h",
+    ],
+}
+
+cc_library {
+    name: "android.hardware.usb@1.1-adapter-helper",
+    defaults: ["hidl-module-defaults"],
+    generated_sources: ["android.hardware.usb@1.1-adapter-helper_genc++"],
+    generated_headers: ["android.hardware.usb@1.1-adapter-helper_genc++_headers"],
+    export_generated_headers: ["android.hardware.usb@1.1-adapter-helper_genc++_headers"],
+    vendor_available: true,
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "libhidladapter",
+        "android.hardware.usb@1.0",
+        "android.hardware.usb@1.1",
+        "android.hardware.usb@1.0-adapter-helper",
+        "android.hidl.base@1.0-adapter-helper",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "libhidladapter",
+        "android.hardware.usb@1.0",
+        "android.hardware.usb@1.1",
+        "android.hardware.usb@1.0-adapter-helper",
+        "android.hidl.base@1.0-adapter-helper",
+    ],
+}
+
+genrule {
+    name: "android.hardware.usb@1.1-adapter_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1",
+    out: ["main.cpp"]
+}
+
+cc_test {
+    name: "android.hardware.usb@1.1-adapter",
+    defaults: ["hidl-module-defaults"],
+    shared_libs: [
+        "libhidladapter",
+        "libhidlbase",
+        "libhidltransport",
+        "libutils",
+        "android.hardware.usb@1.0",
+        "android.hardware.usb@1.1",
+        "android.hardware.usb@1.1-adapter-helper",
+    ],
+    generated_sources: ["android.hardware.usb@1.1-adapter_genc++"],
+}
diff --git a/usb/1.1/Android.mk b/usb/1.1/Android.mk
deleted file mode 100644 (file)
index 57147f1..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-# This file is autogenerated by hidl-gen. Do not edit manually.
-
-LOCAL_PATH := $(call my-dir)
-
-################################################################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.usb-V1.1-java
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-intermediates := $(call local-generated-sources-dir, COMMON)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-LOCAL_JAVA_LIBRARIES := \
-    android.hardware.usb-V1.0-java \
-    android.hidl.base-V1.0-java \
-
-LOCAL_NO_STANDARD_LIBRARIES := true
-LOCAL_JAVA_LIBRARIES += core-oj hwbinder
-
-#
-# Build types.hal (PortMode_1_1)
-#
-GEN := $(intermediates)/android/hardware/usb/V1_1/PortMode_1_1.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 \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.usb@1.1::types.PortMode_1_1
-
-$(GEN): $(LOCAL_PATH)/types.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (PortStatus_1_1)
-#
-GEN := $(intermediates)/android/hardware/usb/V1_1/PortStatus_1_1.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 \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.usb@1.1::types.PortStatus_1_1
-
-$(GEN): $(LOCAL_PATH)/types.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IUsb.hal
-#
-GEN := $(intermediates)/android/hardware/usb/V1_1/IUsb.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IUsb.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.usb@1.1::IUsb
-
-$(GEN): $(LOCAL_PATH)/IUsb.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IUsbCallback.hal
-#
-GEN := $(intermediates)/android/hardware/usb/V1_1/IUsbCallback.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IUsbCallback.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 \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.usb@1.1::IUsbCallback
-
-$(GEN): $(LOCAL_PATH)/IUsbCallback.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-include $(BUILD_JAVA_LIBRARY)
-
-
-################################################################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.usb-V1.1-java-constants
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-intermediates := $(call local-generated-sources-dir, COMMON)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-#
-GEN := $(intermediates)/android/hardware/usb/V1_1/Constants.java
-$(GEN): $(HIDL)
-$(GEN): $(LOCAL_PATH)/types.hal
-$(GEN): $(LOCAL_PATH)/IUsb.hal
-$(GEN): $(LOCAL_PATH)/IUsbCallback.hal
-
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava-constants \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.usb@1.1
-
-$(GEN):
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-# Avoid dependency cycle of framework.jar -> this-library -> framework.jar
-LOCAL_NO_STANDARD_LIBRARIES := true
-LOCAL_JAVA_LIBRARIES := core-oj
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
index a47f37c9a01a734bcd236d5c8af21f04c4c318d7..11985fda6a6364cdea0534da576bca3d2e856ae5 100644 (file)
@@ -66,3 +66,126 @@ cc_library {
         "android.hardware.vibrator@1.0",
     ],
 }
+
+genrule {
+    name: "android.hardware.vibrator-V1.1-java_gen_java",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.1",
+    srcs: [
+        ":android.hardware.vibrator@1.1_hal",
+    ],
+    out: [
+        "android/hardware/vibrator/V1_1/Effect_1_1.java",
+        "android/hardware/vibrator/V1_1/IVibrator.java",
+    ],
+}
+
+java_library {
+    name: "android.hardware.vibrator-V1.1-java",
+    no_framework_libs: true,
+    defaults: ["hidl-java-module-defaults"],
+    srcs: [":android.hardware.vibrator-V1.1-java_gen_java"],
+    libs: [
+        "hwbinder",
+        "android.hardware.vibrator-V1.0-java",
+        "android.hidl.base-V1.0-java",
+    ]
+}
+
+genrule {
+    name: "android.hardware.vibrator-V1.1-java-constants_gen_java",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.1",
+    srcs: [
+        ":android.hardware.vibrator@1.1_hal",
+    ],
+    out: [
+        "android/hardware/vibrator/V1_1/Constants.java",
+    ],
+}
+
+java_library {
+    name: "android.hardware.vibrator-V1.1-java-constants",
+    no_framework_libs: true,
+    defaults: ["hidl-java-module-defaults"],
+    srcs: [":android.hardware.vibrator-V1.1-java-constants_gen_java"],
+}
+
+genrule {
+    name: "android.hardware.vibrator@1.1-adapter-helper_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.1",
+    srcs: [
+        ":android.hardware.vibrator@1.1_hal",
+    ],
+    out: [
+        "android/hardware/vibrator/1.1/AVibrator.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.vibrator@1.1-adapter-helper_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.1",
+    srcs: [
+        ":android.hardware.vibrator@1.1_hal",
+    ],
+    out: [
+        "android/hardware/vibrator/1.1/AVibrator.h",
+    ],
+}
+
+cc_library {
+    name: "android.hardware.vibrator@1.1-adapter-helper",
+    defaults: ["hidl-module-defaults"],
+    generated_sources: ["android.hardware.vibrator@1.1-adapter-helper_genc++"],
+    generated_headers: ["android.hardware.vibrator@1.1-adapter-helper_genc++_headers"],
+    export_generated_headers: ["android.hardware.vibrator@1.1-adapter-helper_genc++_headers"],
+    vendor_available: true,
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "libhidladapter",
+        "android.hardware.vibrator@1.0",
+        "android.hardware.vibrator@1.1",
+        "android.hardware.vibrator@1.0-adapter-helper",
+        "android.hidl.base@1.0-adapter-helper",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "libhidladapter",
+        "android.hardware.vibrator@1.0",
+        "android.hardware.vibrator@1.1",
+        "android.hardware.vibrator@1.0-adapter-helper",
+        "android.hidl.base@1.0-adapter-helper",
+    ],
+}
+
+genrule {
+    name: "android.hardware.vibrator@1.1-adapter_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.1",
+    out: ["main.cpp"]
+}
+
+cc_test {
+    name: "android.hardware.vibrator@1.1-adapter",
+    defaults: ["hidl-module-defaults"],
+    shared_libs: [
+        "libhidladapter",
+        "libhidlbase",
+        "libhidltransport",
+        "libutils",
+        "android.hardware.vibrator@1.0",
+        "android.hardware.vibrator@1.1",
+        "android.hardware.vibrator@1.1-adapter-helper",
+    ],
+    generated_sources: ["android.hardware.vibrator@1.1-adapter_genc++"],
+}
diff --git a/vibrator/1.1/Android.mk b/vibrator/1.1/Android.mk
deleted file mode 100644 (file)
index d08f837..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-# This file is autogenerated by hidl-gen. Do not edit manually.
-
-LOCAL_PATH := $(call my-dir)
-
-################################################################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.vibrator-V1.1-java
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-intermediates := $(call local-generated-sources-dir, COMMON)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-LOCAL_JAVA_LIBRARIES := \
-    android.hardware.vibrator-V1.0-java \
-    android.hidl.base-V1.0-java \
-
-LOCAL_NO_STANDARD_LIBRARIES := true
-LOCAL_JAVA_LIBRARIES += core-oj hwbinder
-
-#
-# Build types.hal (Effect_1_1)
-#
-GEN := $(intermediates)/android/hardware/vibrator/V1_1/Effect_1_1.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 \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.vibrator@1.1::types.Effect_1_1
-
-$(GEN): $(LOCAL_PATH)/types.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IVibrator.hal
-#
-GEN := $(intermediates)/android/hardware/vibrator/V1_1/IVibrator.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IVibrator.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 \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.vibrator@1.1::IVibrator
-
-$(GEN): $(LOCAL_PATH)/IVibrator.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-include $(BUILD_JAVA_LIBRARY)
-
-
-################################################################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.vibrator-V1.1-java-constants
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-intermediates := $(call local-generated-sources-dir, COMMON)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-#
-GEN := $(intermediates)/android/hardware/vibrator/V1_1/Constants.java
-$(GEN): $(HIDL)
-$(GEN): $(LOCAL_PATH)/types.hal
-$(GEN): $(LOCAL_PATH)/IVibrator.hal
-
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava-constants \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.vibrator@1.1
-
-$(GEN):
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-# Avoid dependency cycle of framework.jar -> this-library -> framework.jar
-LOCAL_NO_STANDARD_LIBRARIES := true
-LOCAL_JAVA_LIBRARIES := core-oj
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
index cdc59c9d064024cec257b1b6eb287fba021158b4..b7bf1fe55119f4984c9df3901d6095ad539b5e3f 100644 (file)
@@ -64,3 +64,107 @@ cc_library {
         "libutils",
     ],
 }
+
+genrule {
+    name: "android.hardware.weaver-V1.0-java_gen_java",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.weaver@1.0",
+    srcs: [
+        ":android.hardware.weaver@1.0_hal",
+    ],
+    out: [
+        "android/hardware/weaver/V1_0/WeaverConfig.java",
+        "android/hardware/weaver/V1_0/WeaverReadResponse.java",
+        "android/hardware/weaver/V1_0/WeaverReadStatus.java",
+        "android/hardware/weaver/V1_0/WeaverStatus.java",
+        "android/hardware/weaver/V1_0/IWeaver.java",
+    ],
+}
+
+java_library {
+    name: "android.hardware.weaver-V1.0-java",
+    no_framework_libs: true,
+    defaults: ["hidl-java-module-defaults"],
+    srcs: [":android.hardware.weaver-V1.0-java_gen_java"],
+    libs: [
+        "hwbinder",
+        "android.hidl.base-V1.0-java",
+    ]
+}
+
+// This package does not export any types. Not creating java constants export.
+
+
+genrule {
+    name: "android.hardware.weaver@1.0-adapter-helper_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.weaver@1.0",
+    srcs: [
+        ":android.hardware.weaver@1.0_hal",
+    ],
+    out: [
+        "android/hardware/weaver/1.0/AWeaver.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.weaver@1.0-adapter-helper_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.weaver@1.0",
+    srcs: [
+        ":android.hardware.weaver@1.0_hal",
+    ],
+    out: [
+        "android/hardware/weaver/1.0/AWeaver.h",
+    ],
+}
+
+cc_library {
+    name: "android.hardware.weaver@1.0-adapter-helper",
+    defaults: ["hidl-module-defaults"],
+    generated_sources: ["android.hardware.weaver@1.0-adapter-helper_genc++"],
+    generated_headers: ["android.hardware.weaver@1.0-adapter-helper_genc++_headers"],
+    export_generated_headers: ["android.hardware.weaver@1.0-adapter-helper_genc++_headers"],
+    vendor_available: true,
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "libhidladapter",
+        "android.hardware.weaver@1.0",
+        "android.hidl.base@1.0-adapter-helper",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "libhidladapter",
+        "android.hardware.weaver@1.0",
+        "android.hidl.base@1.0-adapter-helper",
+    ],
+}
+
+genrule {
+    name: "android.hardware.weaver@1.0-adapter_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.weaver@1.0",
+    out: ["main.cpp"]
+}
+
+cc_test {
+    name: "android.hardware.weaver@1.0-adapter",
+    defaults: ["hidl-module-defaults"],
+    shared_libs: [
+        "libhidladapter",
+        "libhidlbase",
+        "libhidltransport",
+        "libutils",
+        "android.hardware.weaver@1.0",
+        "android.hardware.weaver@1.0-adapter-helper",
+    ],
+    generated_sources: ["android.hardware.weaver@1.0-adapter_genc++"],
+}
diff --git a/weaver/1.0/Android.mk b/weaver/1.0/Android.mk
deleted file mode 100644 (file)
index ab33a15..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-# This file is autogenerated by hidl-gen. Do not edit manually.
-
-LOCAL_PATH := $(call my-dir)
-
-################################################################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.weaver-V1.0-java
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-intermediates := $(call local-generated-sources-dir, COMMON)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-LOCAL_JAVA_LIBRARIES := \
-    android.hidl.base-V1.0-java \
-
-LOCAL_NO_STANDARD_LIBRARIES := true
-LOCAL_JAVA_LIBRARIES += core-oj hwbinder
-
-#
-# Build types.hal (WeaverConfig)
-#
-GEN := $(intermediates)/android/hardware/weaver/V1_0/WeaverConfig.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 \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.weaver@1.0::types.WeaverConfig
-
-$(GEN): $(LOCAL_PATH)/types.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (WeaverReadResponse)
-#
-GEN := $(intermediates)/android/hardware/weaver/V1_0/WeaverReadResponse.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 \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.weaver@1.0::types.WeaverReadResponse
-
-$(GEN): $(LOCAL_PATH)/types.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (WeaverReadStatus)
-#
-GEN := $(intermediates)/android/hardware/weaver/V1_0/WeaverReadStatus.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 \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.weaver@1.0::types.WeaverReadStatus
-
-$(GEN): $(LOCAL_PATH)/types.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (WeaverStatus)
-#
-GEN := $(intermediates)/android/hardware/weaver/V1_0/WeaverStatus.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 \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.weaver@1.0::types.WeaverStatus
-
-$(GEN): $(LOCAL_PATH)/types.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IWeaver.hal
-#
-GEN := $(intermediates)/android/hardware/weaver/V1_0/IWeaver.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWeaver.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 \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.weaver@1.0::IWeaver
-
-$(GEN): $(LOCAL_PATH)/IWeaver.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-include $(BUILD_JAVA_LIBRARY)
-
-
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
index aa6e9379bef63855f0c4c3137be30683add95005..0878abc8a86e1368efd7b330dcc5b20f19bc5c71 100644 (file)
@@ -69,3 +69,112 @@ cc_library {
         "android.hardware.wifi@1.0",
     ],
 }
+
+genrule {
+    name: "android.hardware.wifi-V1.1-java_gen_java",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.1",
+    srcs: [
+        ":android.hardware.wifi@1.1_hal",
+    ],
+    out: [
+        "android/hardware/wifi/V1_1/IWifi.java",
+        "android/hardware/wifi/V1_1/IWifiChip.java",
+    ],
+}
+
+java_library {
+    name: "android.hardware.wifi-V1.1-java",
+    no_framework_libs: true,
+    defaults: ["hidl-java-module-defaults"],
+    srcs: [":android.hardware.wifi-V1.1-java_gen_java"],
+    libs: [
+        "hwbinder",
+        "android.hardware.wifi-V1.0-java",
+        "android.hidl.base-V1.0-java",
+    ]
+}
+
+// This package does not export any types. Not creating java constants export.
+
+
+genrule {
+    name: "android.hardware.wifi@1.1-adapter-helper_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.1",
+    srcs: [
+        ":android.hardware.wifi@1.1_hal",
+    ],
+    out: [
+        "android/hardware/wifi/1.1/AWifi.cpp",
+        "android/hardware/wifi/1.1/AWifiChip.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.wifi@1.1-adapter-helper_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.1",
+    srcs: [
+        ":android.hardware.wifi@1.1_hal",
+    ],
+    out: [
+        "android/hardware/wifi/1.1/AWifi.h",
+        "android/hardware/wifi/1.1/AWifiChip.h",
+    ],
+}
+
+cc_library {
+    name: "android.hardware.wifi@1.1-adapter-helper",
+    defaults: ["hidl-module-defaults"],
+    generated_sources: ["android.hardware.wifi@1.1-adapter-helper_genc++"],
+    generated_headers: ["android.hardware.wifi@1.1-adapter-helper_genc++_headers"],
+    export_generated_headers: ["android.hardware.wifi@1.1-adapter-helper_genc++_headers"],
+    vendor_available: true,
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "libhidladapter",
+        "android.hardware.wifi@1.0",
+        "android.hardware.wifi@1.1",
+        "android.hardware.wifi@1.0-adapter-helper",
+        "android.hidl.base@1.0-adapter-helper",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "libhidladapter",
+        "android.hardware.wifi@1.0",
+        "android.hardware.wifi@1.1",
+        "android.hardware.wifi@1.0-adapter-helper",
+        "android.hidl.base@1.0-adapter-helper",
+    ],
+}
+
+genrule {
+    name: "android.hardware.wifi@1.1-adapter_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.1",
+    out: ["main.cpp"]
+}
+
+cc_test {
+    name: "android.hardware.wifi@1.1-adapter",
+    defaults: ["hidl-module-defaults"],
+    shared_libs: [
+        "libhidladapter",
+        "libhidlbase",
+        "libhidltransport",
+        "libutils",
+        "android.hardware.wifi@1.0",
+        "android.hardware.wifi@1.1",
+        "android.hardware.wifi@1.1-adapter-helper",
+    ],
+    generated_sources: ["android.hardware.wifi@1.1-adapter_genc++"],
+}
diff --git a/wifi/1.1/Android.mk b/wifi/1.1/Android.mk
deleted file mode 100644 (file)
index 5f4bc6a..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-# This file is autogenerated by hidl-gen. Do not edit manually.
-
-LOCAL_PATH := $(call my-dir)
-
-################################################################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.wifi-V1.1-java
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-intermediates := $(call local-generated-sources-dir, COMMON)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-LOCAL_JAVA_LIBRARIES := \
-    android.hardware.wifi-V1.0-java \
-    android.hidl.base-V1.0-java \
-
-LOCAL_NO_STANDARD_LIBRARIES := true
-LOCAL_JAVA_LIBRARIES += core-oj hwbinder
-
-#
-# Build IWifi.hal
-#
-GEN := $(intermediates)/android/hardware/wifi/V1_1/IWifi.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifi.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.wifi@1.1::IWifi
-
-$(GEN): $(LOCAL_PATH)/IWifi.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IWifiChip.hal
-#
-GEN := $(intermediates)/android/hardware/wifi/V1_1/IWifiChip.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiChip.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.wifi@1.1::IWifiChip
-
-$(GEN): $(LOCAL_PATH)/IWifiChip.hal
-       $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-include $(BUILD_JAVA_LIBRARY)
-
-
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
index 5b7fcad875c322abbbe4272a9b5b780d0dce4c50..12b2ff6cb83d1924614cb4452ae051220383bb51 100644 (file)
@@ -71,3 +71,84 @@ cc_library {
         "libutils",
     ],
 }
+
+// This package is not java compatible. Not creating java target.
+
+// This package does not export any types. Not creating java constants export.
+
+
+genrule {
+    name: "android.hardware.wifi.offload@1.0-adapter-helper_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.offload@1.0",
+    srcs: [
+        ":android.hardware.wifi.offload@1.0_hal",
+    ],
+    out: [
+        "android/hardware/wifi/offload/1.0/AOffload.cpp",
+        "android/hardware/wifi/offload/1.0/AOffloadCallback.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.wifi.offload@1.0-adapter-helper_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.offload@1.0",
+    srcs: [
+        ":android.hardware.wifi.offload@1.0_hal",
+    ],
+    out: [
+        "android/hardware/wifi/offload/1.0/AOffload.h",
+        "android/hardware/wifi/offload/1.0/AOffloadCallback.h",
+    ],
+}
+
+cc_library {
+    name: "android.hardware.wifi.offload@1.0-adapter-helper",
+    defaults: ["hidl-module-defaults"],
+    generated_sources: ["android.hardware.wifi.offload@1.0-adapter-helper_genc++"],
+    generated_headers: ["android.hardware.wifi.offload@1.0-adapter-helper_genc++_headers"],
+    export_generated_headers: ["android.hardware.wifi.offload@1.0-adapter-helper_genc++_headers"],
+    vendor_available: true,
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "libhidladapter",
+        "android.hardware.wifi.offload@1.0",
+        "android.hidl.base@1.0-adapter-helper",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "libhidladapter",
+        "android.hardware.wifi.offload@1.0",
+        "android.hidl.base@1.0-adapter-helper",
+    ],
+}
+
+genrule {
+    name: "android.hardware.wifi.offload@1.0-adapter_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.offload@1.0",
+    out: ["main.cpp"]
+}
+
+cc_test {
+    name: "android.hardware.wifi.offload@1.0-adapter",
+    defaults: ["hidl-module-defaults"],
+    shared_libs: [
+        "libhidladapter",
+        "libhidlbase",
+        "libhidltransport",
+        "libutils",
+        "android.hardware.wifi.offload@1.0",
+        "android.hardware.wifi.offload@1.0-adapter-helper",
+    ],
+    generated_sources: ["android.hardware.wifi.offload@1.0-adapter_genc++"],
+}