blob: e82204477b9e2c33a03279b5168d830f6377cc29 [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 Maltsev2579fb72017-02-02 12:39:36 -080017module_prefix = 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 Maltseve2603e32016-10-25 16:03:23 -070023LOCAL_MODULE := $(module_prefix)-manager-lib
Pavel Maltseva2f426a2016-10-04 10:17:05 -070024LOCAL_SRC_FILES := \
Pavel Maltsev7cb0bf32016-12-02 16:52:39 -080025 vehicle_hal_manager/AccessControlConfigParser.cpp \
Enrico Granataadcb7c72017-01-25 12:07:15 -080026 vehicle_hal_manager/Obd2SensorStore.cpp \
Pavel Maltseve2603e32016-10-25 16:03:23 -070027 vehicle_hal_manager/SubscriptionManager.cpp \
28 vehicle_hal_manager/VehicleHalManager.cpp \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -080029 vehicle_hal_manager/VehicleObjectPool.cpp \
30 vehicle_hal_manager/VehicleUtils.cpp \
Pavel Maltseva2f426a2016-10-04 10:17:05 -070031
32LOCAL_SHARED_LIBRARIES := \
Pavel Maltseve2603e32016-10-25 16:03:23 -070033 libbinder \
Yifan Hong6b920e42016-11-16 14:17:58 -080034 libhidlbase \
35 libhidltransport \
Pavel Maltseva2f426a2016-10-04 10:17:05 -070036 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -080037 liblog \
Pavel Maltseva2f426a2016-10-04 10:17:05 -070038 libutils \
Pavel Maltseve2603e32016-10-25 16:03:23 -070039 $(module_prefix) \
Pavel Maltseva2f426a2016-10-04 10:17:05 -070040
Pavel Maltseve2603e32016-10-25 16:03:23 -070041include $(BUILD_STATIC_LIBRARY)
Pavel Maltseva2f426a2016-10-04 10:17:05 -070042
Pavel Maltseve2603e32016-10-25 16:03:23 -070043###############################################################################
Steve Paik56c0c842017-01-24 18:08:38 -080044# Vehicle HAL Protobuf library
45###############################################################################
46include $(CLEAR_VARS)
47LOCAL_SRC_FILES := $(call all-proto-files-under, impl/proto)
48
49LOCAL_PROTOC_OPTIMIZE_TYPE := nano
50
51LOCAL_MODULE := $(module_prefix)-libproto-native
52LOCAL_MODULE_CLASS := STATIC_LIBRARIES
53
54LOCAL_MODULE_TAGS := optional
55
56LOCAL_STRIP_MODULE := keep_symbols
57
58generated_sources_dir := $(call local-generated-sources-dir)
59LOCAL_EXPORT_C_INCLUDE_DIRS := \
60 $(generated_sources_dir)/proto/$(LOCAL_PATH)/impl/proto
61
62include $(BUILD_STATIC_LIBRARY)
63
64
65###############################################################################
Pavel Maltseve2603e32016-10-25 16:03:23 -070066# Vehicle default VehicleHAL implementation
67###############################################################################
Pavel Maltseva2f426a2016-10-04 10:17:05 -070068include $(CLEAR_VARS)
Pavel Maltseve2603e32016-10-25 16:03:23 -070069
70LOCAL_MODULE:= $(module_prefix)-default-impl-lib
71LOCAL_SRC_FILES:= \
72 impl/DefaultVehicleHal.cpp \
73
74LOCAL_SHARED_LIBRARIES := \
Pavel Maltseve2603e32016-10-25 16:03:23 -070075 libbinder \
Yifan Hong6b920e42016-11-16 14:17:58 -080076 libhidlbase \
77 libhidltransport \
Pavel Maltseve2603e32016-10-25 16:03:23 -070078 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -080079 liblog \
Steve Paik56c0c842017-01-24 18:08:38 -080080 libprotobuf-cpp-lite \
Pavel Maltseve2603e32016-10-25 16:03:23 -070081 libutils \
82 $(module_prefix) \
83
Steve Paik56c0c842017-01-24 18:08:38 -080084LOCAL_STATIC_LIBRARIES := \
85 $(module_prefix)-libproto-native
86
Pavel Maltseve2603e32016-10-25 16:03:23 -070087include $(BUILD_STATIC_LIBRARY)
88
89
90###############################################################################
91# Vehicle reference implementation unit tests
92###############################################################################
93include $(CLEAR_VARS)
94
95LOCAL_MODULE:= $(module_prefix)-manager-unit-tests
96
97LOCAL_WHOLE_STATIC_LIBRARIES := $(module_prefix)-manager-lib
98
99LOCAL_SRC_FILES:= \
Pavel Maltsev7cb0bf32016-12-02 16:52:39 -0800100 tests/AccessControlConfigParser_test.cpp \
Enrico Granataadcb7c72017-01-25 12:07:15 -0800101 tests/Obd2SensorStore_test.cpp \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700102 tests/SubscriptionManager_test.cpp \
103 tests/VehicleHalManager_test.cpp \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800104 tests/VehicleObjectPool_test.cpp \
105 tests/VehiclePropConfigIndex_test.cpp \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700106
107LOCAL_SHARED_LIBRARIES := \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700108 libbinder \
Yifan Hong6b920e42016-11-16 14:17:58 -0800109 libhidlbase \
110 libhidltransport \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700111 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800112 liblog \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700113 libutils \
114 $(module_prefix) \
115
116LOCAL_CFLAGS += -Wall -Wextra
117LOCAL_MODULE_TAGS := tests
118
119include $(BUILD_NATIVE_TEST)
120
121
122###############################################################################
123# Vehicle HAL service
124###############################################################################
125include $(CLEAR_VARS)
126LOCAL_MODULE := $(module_prefix)-service
Pavel Maltsevaab54212016-11-08 11:16:39 -0800127LOCAL_INIT_RC := $(module_prefix)-service.rc
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700128LOCAL_MODULE_RELATIVE_PATH := hw
Pavel Maltseve2603e32016-10-25 16:03:23 -0700129
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700130LOCAL_SRC_FILES := \
131 VehicleService.cpp
132
Pavel Maltseve2603e32016-10-25 16:03:23 -0700133LOCAL_WHOLE_STATIC_LIBRARIES := \
134 $(module_prefix)-manager-lib \
135 $(module_prefix)-default-impl-lib \
136
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700137LOCAL_SHARED_LIBRARIES := \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700138 libbinder \
Yifan Hong6b920e42016-11-16 14:17:58 -0800139 libhidlbase \
140 libhidltransport \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700141 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800142 liblog \
Steve Paik56c0c842017-01-24 18:08:38 -0800143 libprotobuf-cpp-lite \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700144 libutils \
Pavel Maltsev2579fb72017-02-02 12:39:36 -0800145 $(module_prefix) \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700146
Steve Paik56c0c842017-01-24 18:08:38 -0800147LOCAL_STATIC_LIBRARIES := \
148 $(module_prefix)-libproto-native
149
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700150include $(BUILD_EXECUTABLE)