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 17 vhal_v2_0 = android.hardware.automotive.vehicle (a] 2.0 18 19 ############################################################################### 20 # Vehicle reference implementation lib 21 ############################################################################### 22 include $(CLEAR_VARS) 23 LOCAL_MODULE := $(vhal_v2_0)-manager-lib 24 LOCAL_SRC_FILES := \ 25 common/src/SubscriptionManager.cpp \ 26 common/src/VehicleHalManager.cpp \ 27 common/src/VehicleObjectPool.cpp \ 28 common/src/VehiclePropertyStore.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 36 37 LOCAL_SHARED_LIBRARIES := \ 38 libhidlbase \ 39 libhidltransport \ 40 liblog \ 41 libutils \ 42 $(vhal_v2_0) \ 43 44 include $(BUILD_STATIC_LIBRARY) 45 46 47 include $(CLEAR_VARS) 48 LOCAL_MODULE := $(vhal_v2_0)-manager-lib-shared 49 LOCAL_SRC_FILES := \ 50 common/src/SubscriptionManager.cpp \ 51 common/src/VehicleHalManager.cpp \ 52 common/src/VehicleObjectPool.cpp \ 53 common/src/VehiclePropertyStore.cpp \ 54 common/src/VehicleUtils.cpp \ 55 56 LOCAL_C_INCLUDES := \ 57 $(LOCAL_PATH)/common/include/vhal_v2_0 58 59 LOCAL_EXPORT_C_INCLUDE_DIRS := \ 60 $(LOCAL_PATH)/common/include 61 62 LOCAL_SHARED_LIBRARIES := \ 63 libhidlbase \ 64 libhidltransport \ 65 liblog \ 66 libutils \ 67 $(vhal_v2_0) \ 68 69 include $(BUILD_SHARED_LIBRARY) 70 71 ############################################################################### 72 # Vehicle HAL Protobuf library 73 ############################################################################### 74 include $(CLEAR_VARS) 75 LOCAL_SRC_FILES := $(call all-proto-files-under, impl/vhal_v2_0/proto) 76 77 LOCAL_PROTOC_OPTIMIZE_TYPE := nano 78 79 LOCAL_MODULE := $(vhal_v2_0)-libproto-native 80 LOCAL_MODULE_CLASS := STATIC_LIBRARIES 81 82 LOCAL_MODULE_TAGS := optional 83 84 LOCAL_STRIP_MODULE := keep_symbols 85 86 generated_sources_dir := $(call local-generated-sources-dir) 87 LOCAL_EXPORT_C_INCLUDE_DIRS := \ 88 $(generated_sources_dir)/proto/$(LOCAL_PATH)/impl/vhal_v2_0/proto 89 90 include $(BUILD_STATIC_LIBRARY) 91 92 93 ############################################################################### 94 # Vehicle default VehicleHAL implementation 95 ############################################################################### 96 include $(CLEAR_VARS) 97 98 LOCAL_MODULE:= $(vhal_v2_0)-default-impl-lib 99 LOCAL_SRC_FILES:= \ 100 impl/vhal_v2_0/EmulatedVehicleHal.cpp \ 101 impl/vhal_v2_0/VehicleEmulator.cpp \ 102 impl/vhal_v2_0/PipeComm.cpp \ 103 impl/vhal_v2_0/SocketComm.cpp \ 104 105 LOCAL_C_INCLUDES := \ 106 $(LOCAL_PATH)/impl/vhal_v2_0 107 108 LOCAL_EXPORT_C_INCLUDE_DIRS := \ 109 $(LOCAL_PATH)/impl 110 111 LOCAL_WHOLE_STATIC_LIBRARIES := \ 112 $(vhal_v2_0)-manager-lib \ 113 114 LOCAL_SHARED_LIBRARIES := \ 115 libbase \ 116 libhidlbase \ 117 libhidltransport \ 118 liblog \ 119 libprotobuf-cpp-lite \ 120 libutils \ 121 $(vhal_v2_0) \ 122 123 LOCAL_STATIC_LIBRARIES := \ 124 $(vhal_v2_0)-libproto-native \ 125 126 LOCAL_CFLAGS += -Wall -Wextra -Werror 127 128 include $(BUILD_STATIC_LIBRARY) 129 130 131 ############################################################################### 132 # Vehicle reference implementation unit tests 133 ############################################################################### 134 include $(CLEAR_VARS) 135 136 LOCAL_MODULE:= $(vhal_v2_0)-manager-unit-tests 137 138 LOCAL_WHOLE_STATIC_LIBRARIES := \ 139 $(vhal_v2_0)-manager-lib \ 140 141 LOCAL_SRC_FILES:= \ 142 tests/RecurrentTimer_test.cpp \ 143 tests/SubscriptionManager_test.cpp \ 144 tests/VehicleHalManager_test.cpp \ 145 tests/VehicleObjectPool_test.cpp \ 146 tests/VehiclePropConfigIndex_test.cpp \ 147 148 LOCAL_SHARED_LIBRARIES := \ 149 libhidlbase \ 150 libhidltransport \ 151 liblog \ 152 libutils \ 153 $(vhal_v2_0) \ 154 155 LOCAL_CFLAGS += -Wall -Wextra -Werror 156 LOCAL_MODULE_TAGS := tests 157 158 include $(BUILD_NATIVE_TEST) 159 160 161 ############################################################################### 162 # Vehicle HAL service 163 ############################################################################### 164 include $(CLEAR_VARS) 165 LOCAL_MODULE := $(vhal_v2_0)-service 166 LOCAL_INIT_RC := $(vhal_v2_0)-service.rc 167 LOCAL_PROPRIETARY_MODULE := true 168 LOCAL_MODULE_RELATIVE_PATH := hw 169 170 LOCAL_SRC_FILES := \ 171 VehicleService.cpp 172 173 LOCAL_SHARED_LIBRARIES := \ 174 libbase \ 175 libhidlbase \ 176 libhidltransport \ 177 liblog \ 178 libprotobuf-cpp-lite \ 179 libutils \ 180 $(vhal_v2_0) \ 181 182 LOCAL_STATIC_LIBRARIES := \ 183 $(vhal_v2_0)-manager-lib \ 184 $(vhal_v2_0)-default-impl-lib \ 185 $(vhal_v2_0)-libproto-native \ 186 187 LOCAL_CFLAGS += -Wall -Wextra -Werror 188 189 include $(BUILD_EXECUTABLE) 190