blob: 193609386931370cf9dacd29ab33bd921d0b01ec [file] [log] [blame]
Pavel Maltseva2f426a2016-10-04 10:17:05 -07001# 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
15LOCAL_PATH := $(call my-dir)
16
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080017vhal_v2_0 = android.hardware.automotive.vehicle@2.0
Pavel Maltseve2603e32016-10-25 16:03:23 -070018
19###############################################################################
20# Vehicle reference implementation lib
21###############################################################################
Pavel Maltseva2f426a2016-10-04 10:17:05 -070022include $(CLEAR_VARS)
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080023LOCAL_MODULE := $(vhal_v2_0)-manager-lib
Pavel Maltseva2f426a2016-10-04 10:17:05 -070024LOCAL_SRC_FILES := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080025 common/src/SubscriptionManager.cpp \
26 common/src/VehicleHalManager.cpp \
27 common/src/VehicleObjectPool.cpp \
Pavel Maltsev33676522017-03-31 13:45:54 -070028 common/src/VehiclePropertyStore.cpp \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080029 common/src/VehicleUtils.cpp \
30
31LOCAL_C_INCLUDES := \
32 $(LOCAL_PATH)/common/include/vhal_v2_0
33
34LOCAL_EXPORT_C_INCLUDE_DIRS := \
35 $(LOCAL_PATH)/common/include
Pavel Maltseva2f426a2016-10-04 10:17:05 -070036
37LOCAL_SHARED_LIBRARIES := \
Yifan Hong6b920e42016-11-16 14:17:58 -080038 libhidlbase \
39 libhidltransport \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -080040 liblog \
Pavel Maltseva2f426a2016-10-04 10:17:05 -070041 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080042 $(vhal_v2_0) \
Pavel Maltseva2f426a2016-10-04 10:17:05 -070043
Pavel Maltseve2603e32016-10-25 16:03:23 -070044include $(BUILD_STATIC_LIBRARY)
Pavel Maltseva2f426a2016-10-04 10:17:05 -070045
Alex Yakavenkae99ae122017-05-11 17:18:13 -070046
47include $(CLEAR_VARS)
48LOCAL_MODULE := $(vhal_v2_0)-manager-lib-shared
49LOCAL_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
56LOCAL_C_INCLUDES := \
57 $(LOCAL_PATH)/common/include/vhal_v2_0
58
59LOCAL_EXPORT_C_INCLUDE_DIRS := \
60 $(LOCAL_PATH)/common/include
61
62LOCAL_SHARED_LIBRARIES := \
63 libhidlbase \
64 libhidltransport \
65 liblog \
66 libutils \
67 $(vhal_v2_0) \
68
69include $(BUILD_SHARED_LIBRARY)
70
Pavel Maltseve2603e32016-10-25 16:03:23 -070071###############################################################################
Steve Paik56c0c842017-01-24 18:08:38 -080072# Vehicle HAL Protobuf library
73###############################################################################
74include $(CLEAR_VARS)
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080075LOCAL_SRC_FILES := $(call all-proto-files-under, impl/vhal_v2_0/proto)
Steve Paik56c0c842017-01-24 18:08:38 -080076
77LOCAL_PROTOC_OPTIMIZE_TYPE := nano
78
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080079LOCAL_MODULE := $(vhal_v2_0)-libproto-native
Steve Paik56c0c842017-01-24 18:08:38 -080080LOCAL_MODULE_CLASS := STATIC_LIBRARIES
81
82LOCAL_MODULE_TAGS := optional
83
84LOCAL_STRIP_MODULE := keep_symbols
85
86generated_sources_dir := $(call local-generated-sources-dir)
87LOCAL_EXPORT_C_INCLUDE_DIRS := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080088 $(generated_sources_dir)/proto/$(LOCAL_PATH)/impl/vhal_v2_0/proto
Steve Paik56c0c842017-01-24 18:08:38 -080089
90include $(BUILD_STATIC_LIBRARY)
91
92
93###############################################################################
Pavel Maltseve2603e32016-10-25 16:03:23 -070094# Vehicle default VehicleHAL implementation
95###############################################################################
Pavel Maltseva2f426a2016-10-04 10:17:05 -070096include $(CLEAR_VARS)
Pavel Maltseve2603e32016-10-25 16:03:23 -070097
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080098LOCAL_MODULE:= $(vhal_v2_0)-default-impl-lib
Pavel Maltseve2603e32016-10-25 16:03:23 -070099LOCAL_SRC_FILES:= \
Pavel Maltsev33676522017-03-31 13:45:54 -0700100 impl/vhal_v2_0/EmulatedVehicleHal.cpp \
101 impl/vhal_v2_0/VehicleEmulator.cpp \
Steve Paika59644a2017-02-08 13:51:55 -0800102 impl/vhal_v2_0/PipeComm.cpp \
Pavel Maltsev33676522017-03-31 13:45:54 -0700103 impl/vhal_v2_0/SocketComm.cpp \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800104
105LOCAL_C_INCLUDES := \
106 $(LOCAL_PATH)/impl/vhal_v2_0
107
108LOCAL_EXPORT_C_INCLUDE_DIRS := \
109 $(LOCAL_PATH)/impl
110
111LOCAL_WHOLE_STATIC_LIBRARIES := \
112 $(vhal_v2_0)-manager-lib \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700113
114LOCAL_SHARED_LIBRARIES := \
Steve Paika59644a2017-02-08 13:51:55 -0800115 libbase \
Yifan Hong6b920e42016-11-16 14:17:58 -0800116 libhidlbase \
117 libhidltransport \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800118 liblog \
Steve Paik56c0c842017-01-24 18:08:38 -0800119 libprotobuf-cpp-lite \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700120 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800121 $(vhal_v2_0) \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700122
Steve Paik56c0c842017-01-24 18:08:38 -0800123LOCAL_STATIC_LIBRARIES := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800124 $(vhal_v2_0)-libproto-native \
Steve Paik56c0c842017-01-24 18:08:38 -0800125
Steve Paika59644a2017-02-08 13:51:55 -0800126LOCAL_CFLAGS += -Wall -Wextra -Werror
127
Pavel Maltseve2603e32016-10-25 16:03:23 -0700128include $(BUILD_STATIC_LIBRARY)
129
130
131###############################################################################
132# Vehicle reference implementation unit tests
133###############################################################################
134include $(CLEAR_VARS)
135
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800136LOCAL_MODULE:= $(vhal_v2_0)-manager-unit-tests
Pavel Maltseve2603e32016-10-25 16:03:23 -0700137
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800138LOCAL_WHOLE_STATIC_LIBRARIES := \
139 $(vhal_v2_0)-manager-lib \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700140
141LOCAL_SRC_FILES:= \
Pavel Maltsev8ab96e32017-01-27 11:48:29 -0800142 tests/RecurrentTimer_test.cpp \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700143 tests/SubscriptionManager_test.cpp \
144 tests/VehicleHalManager_test.cpp \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800145 tests/VehicleObjectPool_test.cpp \
146 tests/VehiclePropConfigIndex_test.cpp \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700147
Steven Morelandaee42f02017-05-01 17:30:04 -0700148LOCAL_HEADER_LIBRARIES := \
149 libbase_headers
150
Pavel Maltseve2603e32016-10-25 16:03:23 -0700151LOCAL_SHARED_LIBRARIES := \
Yifan Hong6b920e42016-11-16 14:17:58 -0800152 libhidlbase \
153 libhidltransport \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800154 liblog \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700155 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800156 $(vhal_v2_0) \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700157
Pavel Maltsevff89b0e2017-03-08 09:49:04 -0800158LOCAL_CFLAGS += -Wall -Wextra -Werror
Pavel Maltseve2603e32016-10-25 16:03:23 -0700159LOCAL_MODULE_TAGS := tests
160
161include $(BUILD_NATIVE_TEST)
162
163
164###############################################################################
165# Vehicle HAL service
166###############################################################################
167include $(CLEAR_VARS)
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800168LOCAL_MODULE := $(vhal_v2_0)-service
169LOCAL_INIT_RC := $(vhal_v2_0)-service.rc
Steven Morelanda0da1a12017-02-13 09:59:06 -0800170LOCAL_PROPRIETARY_MODULE := true
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700171LOCAL_MODULE_RELATIVE_PATH := hw
Pavel Maltseve2603e32016-10-25 16:03:23 -0700172
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700173LOCAL_SRC_FILES := \
174 VehicleService.cpp
175
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700176LOCAL_SHARED_LIBRARIES := \
Steve Paika59644a2017-02-08 13:51:55 -0800177 libbase \
Yifan Hong6b920e42016-11-16 14:17:58 -0800178 libhidlbase \
179 libhidltransport \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800180 liblog \
Steve Paik56c0c842017-01-24 18:08:38 -0800181 libprotobuf-cpp-lite \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700182 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800183 $(vhal_v2_0) \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700184
Steve Paik56c0c842017-01-24 18:08:38 -0800185LOCAL_STATIC_LIBRARIES := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800186 $(vhal_v2_0)-manager-lib \
187 $(vhal_v2_0)-default-impl-lib \
188 $(vhal_v2_0)-libproto-native \
Steve Paik56c0c842017-01-24 18:08:38 -0800189
Steve Paika59644a2017-02-08 13:51:55 -0800190LOCAL_CFLAGS += -Wall -Wextra -Werror
191
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700192include $(BUILD_EXECUTABLE)