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