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 \ |
Steve Paik | a59644a | 2017-02-08 13:51:55 -0800 | [diff] [blame^] | 79 | impl/vhal_v2_0/PipeComm.cpp \ |
| 80 | impl/vhal_v2_0/SocketComm.cpp |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 81 | |
| 82 | LOCAL_C_INCLUDES := \ |
| 83 | $(LOCAL_PATH)/impl/vhal_v2_0 |
| 84 | |
| 85 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ |
| 86 | $(LOCAL_PATH)/impl |
| 87 | |
| 88 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
| 89 | $(vhal_v2_0)-manager-lib \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 90 | |
| 91 | LOCAL_SHARED_LIBRARIES := \ |
Steve Paik | a59644a | 2017-02-08 13:51:55 -0800 | [diff] [blame^] | 92 | libbase \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 93 | libbinder \ |
Yifan Hong | 6b920e4 | 2016-11-16 14:17:58 -0800 | [diff] [blame] | 94 | libhidlbase \ |
| 95 | libhidltransport \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 96 | libhwbinder \ |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 97 | liblog \ |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame] | 98 | libprotobuf-cpp-lite \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 99 | libutils \ |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 100 | $(vhal_v2_0) \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 101 | |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame] | 102 | LOCAL_STATIC_LIBRARIES := \ |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 103 | $(vhal_v2_0)-libproto-native \ |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame] | 104 | |
Steve Paik | a59644a | 2017-02-08 13:51:55 -0800 | [diff] [blame^] | 105 | LOCAL_CFLAGS += -Wall -Wextra -Werror |
| 106 | |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 107 | include $(BUILD_STATIC_LIBRARY) |
| 108 | |
| 109 | |
| 110 | ############################################################################### |
| 111 | # Vehicle reference implementation unit tests |
| 112 | ############################################################################### |
| 113 | include $(CLEAR_VARS) |
| 114 | |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 115 | LOCAL_MODULE:= $(vhal_v2_0)-manager-unit-tests |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 116 | |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 117 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
| 118 | $(vhal_v2_0)-manager-lib \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 119 | |
| 120 | LOCAL_SRC_FILES:= \ |
Pavel Maltsev | 7cb0bf3 | 2016-12-02 16:52:39 -0800 | [diff] [blame] | 121 | tests/AccessControlConfigParser_test.cpp \ |
Enrico Granata | adcb7c7 | 2017-01-25 12:07:15 -0800 | [diff] [blame] | 122 | tests/Obd2SensorStore_test.cpp \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 123 | tests/SubscriptionManager_test.cpp \ |
| 124 | tests/VehicleHalManager_test.cpp \ |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 125 | tests/VehicleObjectPool_test.cpp \ |
| 126 | tests/VehiclePropConfigIndex_test.cpp \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 127 | |
| 128 | LOCAL_SHARED_LIBRARIES := \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 129 | libbinder \ |
Yifan Hong | 6b920e4 | 2016-11-16 14:17:58 -0800 | [diff] [blame] | 130 | libhidlbase \ |
| 131 | libhidltransport \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 132 | libhwbinder \ |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 133 | liblog \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 134 | libutils \ |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 135 | $(vhal_v2_0) \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 136 | |
| 137 | LOCAL_CFLAGS += -Wall -Wextra |
| 138 | LOCAL_MODULE_TAGS := tests |
| 139 | |
| 140 | include $(BUILD_NATIVE_TEST) |
| 141 | |
| 142 | |
| 143 | ############################################################################### |
| 144 | # Vehicle HAL service |
| 145 | ############################################################################### |
| 146 | include $(CLEAR_VARS) |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 147 | LOCAL_MODULE := $(vhal_v2_0)-service |
| 148 | LOCAL_INIT_RC := $(vhal_v2_0)-service.rc |
Steven Moreland | a0da1a1 | 2017-02-13 09:59:06 -0800 | [diff] [blame] | 149 | LOCAL_PROPRIETARY_MODULE := true |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 150 | LOCAL_MODULE_RELATIVE_PATH := hw |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 151 | |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 152 | LOCAL_SRC_FILES := \ |
| 153 | VehicleService.cpp |
| 154 | |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 155 | LOCAL_SHARED_LIBRARIES := \ |
Steve Paik | a59644a | 2017-02-08 13:51:55 -0800 | [diff] [blame^] | 156 | libbase \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 157 | libbinder \ |
Yifan Hong | 6b920e4 | 2016-11-16 14:17:58 -0800 | [diff] [blame] | 158 | libhidlbase \ |
| 159 | libhidltransport \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 160 | libhwbinder \ |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 161 | liblog \ |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame] | 162 | libprotobuf-cpp-lite \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 163 | libutils \ |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 164 | $(vhal_v2_0) \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 165 | |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame] | 166 | LOCAL_STATIC_LIBRARIES := \ |
Pavel Maltsev | c5344ac | 2017-02-08 12:33:46 -0800 | [diff] [blame] | 167 | $(vhal_v2_0)-manager-lib \ |
| 168 | $(vhal_v2_0)-default-impl-lib \ |
| 169 | $(vhal_v2_0)-libproto-native \ |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame] | 170 | |
Steve Paik | a59644a | 2017-02-08 13:51:55 -0800 | [diff] [blame^] | 171 | LOCAL_CFLAGS += -Wall -Wextra -Werror |
| 172 | |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 173 | include $(BUILD_EXECUTABLE) |