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 | 2579fb7 | 2017-02-02 12:39:36 -0800 | [diff] [blame] | 17 | module_prefix = 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 | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 23 | LOCAL_MODULE := $(module_prefix)-manager-lib |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 24 | LOCAL_SRC_FILES := \ |
Pavel Maltsev | 7cb0bf3 | 2016-12-02 16:52:39 -0800 | [diff] [blame] | 25 | vehicle_hal_manager/AccessControlConfigParser.cpp \ |
Enrico Granata | adcb7c7 | 2017-01-25 12:07:15 -0800 | [diff] [blame] | 26 | vehicle_hal_manager/Obd2SensorStore.cpp \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 27 | vehicle_hal_manager/SubscriptionManager.cpp \ |
| 28 | vehicle_hal_manager/VehicleHalManager.cpp \ |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 29 | vehicle_hal_manager/VehicleObjectPool.cpp \ |
| 30 | vehicle_hal_manager/VehicleUtils.cpp \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 31 | |
| 32 | LOCAL_SHARED_LIBRARIES := \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 33 | libbinder \ |
Yifan Hong | 6b920e4 | 2016-11-16 14:17:58 -0800 | [diff] [blame] | 34 | libhidlbase \ |
| 35 | libhidltransport \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 36 | libhwbinder \ |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 37 | liblog \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 38 | libutils \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 39 | $(module_prefix) \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 40 | |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 41 | include $(BUILD_STATIC_LIBRARY) |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 42 | |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 43 | ############################################################################### |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame^] | 44 | # Vehicle HAL Protobuf library |
| 45 | ############################################################################### |
| 46 | include $(CLEAR_VARS) |
| 47 | LOCAL_SRC_FILES := $(call all-proto-files-under, impl/proto) |
| 48 | |
| 49 | LOCAL_PROTOC_OPTIMIZE_TYPE := nano |
| 50 | |
| 51 | LOCAL_MODULE := $(module_prefix)-libproto-native |
| 52 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 53 | |
| 54 | LOCAL_MODULE_TAGS := optional |
| 55 | |
| 56 | LOCAL_STRIP_MODULE := keep_symbols |
| 57 | |
| 58 | generated_sources_dir := $(call local-generated-sources-dir) |
| 59 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ |
| 60 | $(generated_sources_dir)/proto/$(LOCAL_PATH)/impl/proto |
| 61 | |
| 62 | include $(BUILD_STATIC_LIBRARY) |
| 63 | |
| 64 | |
| 65 | ############################################################################### |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 66 | # Vehicle default VehicleHAL implementation |
| 67 | ############################################################################### |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 68 | include $(CLEAR_VARS) |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 69 | |
| 70 | LOCAL_MODULE:= $(module_prefix)-default-impl-lib |
| 71 | LOCAL_SRC_FILES:= \ |
| 72 | impl/DefaultVehicleHal.cpp \ |
| 73 | |
| 74 | LOCAL_SHARED_LIBRARIES := \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 75 | libbinder \ |
Yifan Hong | 6b920e4 | 2016-11-16 14:17:58 -0800 | [diff] [blame] | 76 | libhidlbase \ |
| 77 | libhidltransport \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 78 | libhwbinder \ |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 79 | liblog \ |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame^] | 80 | libprotobuf-cpp-lite \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 81 | libutils \ |
| 82 | $(module_prefix) \ |
| 83 | |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame^] | 84 | LOCAL_STATIC_LIBRARIES := \ |
| 85 | $(module_prefix)-libproto-native |
| 86 | |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 87 | include $(BUILD_STATIC_LIBRARY) |
| 88 | |
| 89 | |
| 90 | ############################################################################### |
| 91 | # Vehicle reference implementation unit tests |
| 92 | ############################################################################### |
| 93 | include $(CLEAR_VARS) |
| 94 | |
| 95 | LOCAL_MODULE:= $(module_prefix)-manager-unit-tests |
| 96 | |
| 97 | LOCAL_WHOLE_STATIC_LIBRARIES := $(module_prefix)-manager-lib |
| 98 | |
| 99 | LOCAL_SRC_FILES:= \ |
Pavel Maltsev | 7cb0bf3 | 2016-12-02 16:52:39 -0800 | [diff] [blame] | 100 | tests/AccessControlConfigParser_test.cpp \ |
Enrico Granata | adcb7c7 | 2017-01-25 12:07:15 -0800 | [diff] [blame] | 101 | tests/Obd2SensorStore_test.cpp \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 102 | tests/SubscriptionManager_test.cpp \ |
| 103 | tests/VehicleHalManager_test.cpp \ |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 104 | tests/VehicleObjectPool_test.cpp \ |
| 105 | tests/VehiclePropConfigIndex_test.cpp \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 106 | |
| 107 | LOCAL_SHARED_LIBRARIES := \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 108 | libbinder \ |
Yifan Hong | 6b920e4 | 2016-11-16 14:17:58 -0800 | [diff] [blame] | 109 | libhidlbase \ |
| 110 | libhidltransport \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 111 | libhwbinder \ |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 112 | liblog \ |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 113 | libutils \ |
| 114 | $(module_prefix) \ |
| 115 | |
| 116 | LOCAL_CFLAGS += -Wall -Wextra |
| 117 | LOCAL_MODULE_TAGS := tests |
| 118 | |
| 119 | include $(BUILD_NATIVE_TEST) |
| 120 | |
| 121 | |
| 122 | ############################################################################### |
| 123 | # Vehicle HAL service |
| 124 | ############################################################################### |
| 125 | include $(CLEAR_VARS) |
| 126 | LOCAL_MODULE := $(module_prefix)-service |
Pavel Maltsev | aab5421 | 2016-11-08 11:16:39 -0800 | [diff] [blame] | 127 | LOCAL_INIT_RC := $(module_prefix)-service.rc |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 128 | LOCAL_MODULE_RELATIVE_PATH := hw |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 129 | |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 130 | LOCAL_SRC_FILES := \ |
| 131 | VehicleService.cpp |
| 132 | |
Pavel Maltsev | e2603e3 | 2016-10-25 16:03:23 -0700 | [diff] [blame] | 133 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
| 134 | $(module_prefix)-manager-lib \ |
| 135 | $(module_prefix)-default-impl-lib \ |
| 136 | |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 137 | LOCAL_SHARED_LIBRARIES := \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 138 | libbinder \ |
Yifan Hong | 6b920e4 | 2016-11-16 14:17:58 -0800 | [diff] [blame] | 139 | libhidlbase \ |
| 140 | libhidltransport \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 141 | libhwbinder \ |
Pavel Maltsev | 0e0a925 | 2016-12-05 11:03:52 -0800 | [diff] [blame] | 142 | liblog \ |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame^] | 143 | libprotobuf-cpp-lite \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 144 | libutils \ |
Pavel Maltsev | 2579fb7 | 2017-02-02 12:39:36 -0800 | [diff] [blame] | 145 | $(module_prefix) \ |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 146 | |
Steve Paik | 56c0c84 | 2017-01-24 18:08:38 -0800 | [diff] [blame^] | 147 | LOCAL_STATIC_LIBRARIES := \ |
| 148 | $(module_prefix)-libproto-native |
| 149 | |
Pavel Maltsev | a2f426a | 2016-10-04 10:17:05 -0700 | [diff] [blame] | 150 | include $(BUILD_EXECUTABLE) |