Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 1 | # Copyright (C) 2016 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | LOCAL_PATH := $(call my-dir) |
| 16 | |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 17 | vhal_v2_0 = android.hardware.automotive.vehicle@2.0 |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 18 | |
| 19 | ############################################################################### |
| 20 | # Vehicle reference implementation lib |
| 21 | ############################################################################### |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 22 | include $(CLEAR_VARS) |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 23 | LOCAL_MODULE := $(vhal_v2_0)-manager-lib |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 24 | LOCAL_SRC_FILES := \ |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 25 | common/src/AccessControlConfigParser.cpp \ |
| 26 | common/src/Obd2SensorStore.cpp \ |
| 27 | common/src/SubscriptionManager.cpp \ |
| 28 | common/src/VehicleHalManager.cpp \ |
| 29 | common/src/VehicleObjectPool.cpp \ |
| 30 | common/src/VehicleUtils.cpp \ |
| 31 | |
| 32 | LOCAL_C_INCLUDES := \ |
| 33 | $(LOCAL_PATH)/common/include/vhal_v2_0 |
| 34 | |
| 35 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ |
| 36 | $(LOCAL_PATH)/common/include |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 37 | |
| 38 | LOCAL_SHARED_LIBRARIES := \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 39 | libbinder \ |
Yifan Hong | 6b920e4 | 2016-11-16 14:17:58 -0800 | [diff] [blame] | 40 | libhidlbase \ |
| 41 | libhidltransport \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 42 | libhwbinder \ |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 43 | liblog \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 44 | libutils \ |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 45 | $(vhal_v2_0) \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 46 | |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 47 | include $(BUILD_STATIC_LIBRARY) |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 48 | |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 49 | ############################################################################### |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame] | 50 | # Vehicle HAL Protobuf library |
| 51 | ############################################################################### |
| 52 | include $(CLEAR_VARS) |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 53 | LOCAL_SRC_FILES := $(call all-proto-files-under, impl/vhal_v2_0/proto) |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame] | 54 | |
| 55 | LOCAL_PROTOC_OPTIMIZE_TYPE := nano |
| 56 | |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 57 | LOCAL_MODULE := $(vhal_v2_0)-libproto-native |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame] | 58 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 59 | |
| 60 | LOCAL_MODULE_TAGS := optional |
| 61 | |
| 62 | LOCAL_STRIP_MODULE := keep_symbols |
| 63 | |
| 64 | generated_sources_dir := $(call local-generated-sources-dir) |
| 65 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 66 | $(generated_sources_dir)/proto/$(LOCAL_PATH)/impl/vhal_v2_0/proto |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame] | 67 | |
| 68 | include $(BUILD_STATIC_LIBRARY) |
| 69 | |
| 70 | |
| 71 | ############################################################################### |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 72 | # Vehicle default VehicleHAL implementation |
| 73 | ############################################################################### |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 74 | include $(CLEAR_VARS) |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 75 | |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 76 | LOCAL_MODULE:= $(vhal_v2_0)-default-impl-lib |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 77 | LOCAL_SRC_FILES:= \ |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 78 | impl/vhal_v2_0/DefaultVehicleHal.cpp \ |
| 79 | |
| 80 | LOCAL_C_INCLUDES := \ |
| 81 | $(LOCAL_PATH)/impl/vhal_v2_0 |
| 82 | |
| 83 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ |
| 84 | $(LOCAL_PATH)/impl |
| 85 | |
| 86 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
| 87 | $(vhal_v2_0)-manager-lib \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 88 | |
| 89 | LOCAL_SHARED_LIBRARIES := \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 90 | libbinder \ |
Yifan Hong | 6b920e4 | 2016-11-16 14:17:58 -0800 | [diff] [blame] | 91 | libhidlbase \ |
| 92 | libhidltransport \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 93 | libhwbinder \ |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 94 | liblog \ |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame] | 95 | libprotobuf-cpp-lite \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 96 | libutils \ |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 97 | $(vhal_v2_0) \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 98 | |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame] | 99 | LOCAL_STATIC_LIBRARIES := \ |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 100 | $(vhal_v2_0)-libproto-native \ |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame] | 101 | |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 102 | include $(BUILD_STATIC_LIBRARY) |
| 103 | |
| 104 | |
| 105 | ############################################################################### |
| 106 | # Vehicle reference implementation unit tests |
| 107 | ############################################################################### |
| 108 | include $(CLEAR_VARS) |
| 109 | |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 110 | LOCAL_MODULE:= $(vhal_v2_0)-manager-unit-tests |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 111 | |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 112 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
| 113 | $(vhal_v2_0)-manager-lib \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 114 | |
| 115 | LOCAL_SRC_FILES:= \ |
Pavel Maltsev | 7cb0bf3 | 2016-12-02 16:52:39 -0800 | [diff] [blame] | 116 | tests/AccessControlConfigParser_test.cpp \ |
Enrico Granata | adcb7c7 | 2017-01-25 12:07:15 -0800 | [diff] [blame] | 117 | tests/Obd2SensorStore_test.cpp \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 118 | tests/SubscriptionManager_test.cpp \ |
| 119 | tests/VehicleHalManager_test.cpp \ |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 120 | tests/VehicleObjectPool_test.cpp \ |
| 121 | tests/VehiclePropConfigIndex_test.cpp \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 122 | |
| 123 | LOCAL_SHARED_LIBRARIES := \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 124 | libbinder \ |
Yifan Hong | 6b920e4 | 2016-11-16 14:17:58 -0800 | [diff] [blame] | 125 | libhidlbase \ |
| 126 | libhidltransport \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 127 | libhwbinder \ |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 128 | liblog \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 129 | libutils \ |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 130 | $(vhal_v2_0) \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 131 | |
| 132 | LOCAL_CFLAGS += -Wall -Wextra |
| 133 | LOCAL_MODULE_TAGS := tests |
| 134 | |
| 135 | include $(BUILD_NATIVE_TEST) |
| 136 | |
| 137 | |
| 138 | ############################################################################### |
| 139 | # Vehicle HAL service |
| 140 | ############################################################################### |
| 141 | include $(CLEAR_VARS) |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 142 | LOCAL_MODULE := $(vhal_v2_0)-service |
| 143 | LOCAL_INIT_RC := $(vhal_v2_0)-service.rc |
Steven Moreland | a0da1a1 | 2017-02-13 09:59:06 -0800 | [diff] [blame] | 144 | LOCAL_PROPRIETARY_MODULE := true |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 145 | LOCAL_MODULE_RELATIVE_PATH := hw |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 146 | |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 147 | LOCAL_SRC_FILES := \ |
| 148 | VehicleService.cpp |
| 149 | |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 150 | LOCAL_SHARED_LIBRARIES := \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 151 | libbinder \ |
Yifan Hong | 6b920e4 | 2016-11-16 14:17:58 -0800 | [diff] [blame] | 152 | libhidlbase \ |
| 153 | libhidltransport \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 154 | libhwbinder \ |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 155 | liblog \ |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame] | 156 | libprotobuf-cpp-lite \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 157 | libutils \ |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 158 | $(vhal_v2_0) \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 159 | |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame] | 160 | LOCAL_STATIC_LIBRARIES := \ |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 161 | $(vhal_v2_0)-manager-lib \ |
| 162 | $(vhal_v2_0)-default-impl-lib \ |
| 163 | $(vhal_v2_0)-libproto-native \ |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame] | 164 | |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 165 | include $(BUILD_EXECUTABLE) |