blob: 8012835074b517e3b26da9a101230eee84bea2fc [file] [log] [blame]
Steven Morelandd5e146f2017-10-10 10:14:15 -07001# This is a legacy library which is depended on by some old hidl-generated
2# makefiles. Now, '-java' libraries can work as both static and non-static
3# libraries.
4
5################################################################################
6LOCAL_PATH:= $(call my-dir)
7
Steven Moreland6f75c042017-10-28 20:27:00 -07008# TODO(b/68433855): re-enable building this in the PDK
9ifneq ($(TARGET_BUILD_PDK),true)
10
Steven Morelandd5e146f2017-10-10 10:14:15 -070011include $(CLEAR_VARS)
12LOCAL_MODULE := android.hidl.base-V1.0-java-static
13LOCAL_MODULE_CLASS := JAVA_LIBRARIES
14
15intermediates := $(call local-generated-sources-dir, COMMON)
16
17HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
18LOCAL_NO_STANDARD_LIBRARIES := true
19LOCAL_JAVA_LIBRARIES := core-oj hwbinder
20
21#
22# Build types.hal (DebugInfo)
23#
24GEN := $(intermediates)/android/hidl/base/V1_0/DebugInfo.java
25$(GEN): $(HIDL)
26$(GEN): PRIVATE_HIDL := $(HIDL)
27$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/base/1.0/types.hal
28$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
29$(GEN): PRIVATE_CUSTOM_TOOL = \
30 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
31 -Ljava \
32 -randroid.hidl:system/libhidl/transport \
33 android.hidl.base@1.0::types.DebugInfo
34
35$(GEN): $(LOCAL_PATH)/base/1.0/types.hal
36 $(transform-generated-source)
37LOCAL_GENERATED_SOURCES += $(GEN)
38
39#
40# Build IBase.hal
41#
42GEN := $(intermediates)/android/hidl/base/V1_0/IBase.java
43$(GEN): $(HIDL)
44$(GEN): PRIVATE_HIDL := $(HIDL)
45$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/base/1.0/IBase.hal
46$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/base/1.0/types.hal
47$(GEN): $(LOCAL_PATH)/base/1.0/types.hal
48$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
49$(GEN): PRIVATE_CUSTOM_TOOL = \
50 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
51 -Ljava \
52 -randroid.hidl:system/libhidl/transport \
53 android.hidl.base@1.0::IBase
54
55$(GEN): $(LOCAL_PATH)/base/1.0/IBase.hal
56 $(transform-generated-source)
57LOCAL_GENERATED_SOURCES += $(GEN)
58include $(BUILD_STATIC_JAVA_LIBRARY)
Steven Moreland6f75c042017-10-28 20:27:00 -070059
60endif # TARGET_BUILD_PDK not true