blob: 9b3323d12a1ad60af1d583c5c29c9b0ad9314617 [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/AccessControlConfigParser.cpp \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080026 common/src/SubscriptionManager.cpp \
27 common/src/VehicleHalManager.cpp \
28 common/src/VehicleObjectPool.cpp \
29 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 := \
Pavel Maltseve2603e32016-10-25 16:03:23 -070038 libbinder \
Yifan Hong6b920e42016-11-16 14:17:58 -080039 libhidlbase \
40 libhidltransport \
Pavel Maltseva2f426a2016-10-04 10:17:05 -070041 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -080042 liblog \
Pavel Maltseva2f426a2016-10-04 10:17:05 -070043 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080044 $(vhal_v2_0) \
Pavel Maltseva2f426a2016-10-04 10:17:05 -070045
Pavel Maltseve2603e32016-10-25 16:03:23 -070046include $(BUILD_STATIC_LIBRARY)
Pavel Maltseva2f426a2016-10-04 10:17:05 -070047
Pavel Maltseve2603e32016-10-25 16:03:23 -070048###############################################################################
Steve Paik56c0c842017-01-24 18:08:38 -080049# Vehicle HAL Protobuf library
50###############################################################################
51include $(CLEAR_VARS)
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080052LOCAL_SRC_FILES := $(call all-proto-files-under, impl/vhal_v2_0/proto)
Steve Paik56c0c842017-01-24 18:08:38 -080053
54LOCAL_PROTOC_OPTIMIZE_TYPE := nano
55
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080056LOCAL_MODULE := $(vhal_v2_0)-libproto-native
Steve Paik56c0c842017-01-24 18:08:38 -080057LOCAL_MODULE_CLASS := STATIC_LIBRARIES
58
59LOCAL_MODULE_TAGS := optional
60
61LOCAL_STRIP_MODULE := keep_symbols
62
63generated_sources_dir := $(call local-generated-sources-dir)
64LOCAL_EXPORT_C_INCLUDE_DIRS := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080065 $(generated_sources_dir)/proto/$(LOCAL_PATH)/impl/vhal_v2_0/proto
Steve Paik56c0c842017-01-24 18:08:38 -080066
67include $(BUILD_STATIC_LIBRARY)
68
69
70###############################################################################
Pavel Maltseve2603e32016-10-25 16:03:23 -070071# Vehicle default VehicleHAL implementation
72###############################################################################
Pavel Maltseva2f426a2016-10-04 10:17:05 -070073include $(CLEAR_VARS)
Pavel Maltseve2603e32016-10-25 16:03:23 -070074
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080075LOCAL_MODULE:= $(vhal_v2_0)-default-impl-lib
Pavel Maltseve2603e32016-10-25 16:03:23 -070076LOCAL_SRC_FILES:= \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080077 impl/vhal_v2_0/DefaultVehicleHal.cpp \
Steve Paika59644a2017-02-08 13:51:55 -080078 impl/vhal_v2_0/PipeComm.cpp \
79 impl/vhal_v2_0/SocketComm.cpp
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080080
81LOCAL_C_INCLUDES := \
82 $(LOCAL_PATH)/impl/vhal_v2_0
83
84LOCAL_EXPORT_C_INCLUDE_DIRS := \
85 $(LOCAL_PATH)/impl
86
87LOCAL_WHOLE_STATIC_LIBRARIES := \
88 $(vhal_v2_0)-manager-lib \
Pavel Maltseve2603e32016-10-25 16:03:23 -070089
90LOCAL_SHARED_LIBRARIES := \
Steve Paika59644a2017-02-08 13:51:55 -080091 libbase \
Pavel Maltseve2603e32016-10-25 16:03:23 -070092 libbinder \
Yifan Hong6b920e42016-11-16 14:17:58 -080093 libhidlbase \
94 libhidltransport \
Pavel Maltseve2603e32016-10-25 16:03:23 -070095 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -080096 liblog \
Steve Paik56c0c842017-01-24 18:08:38 -080097 libprotobuf-cpp-lite \
Pavel Maltseve2603e32016-10-25 16:03:23 -070098 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080099 $(vhal_v2_0) \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700100
Steve Paik56c0c842017-01-24 18:08:38 -0800101LOCAL_STATIC_LIBRARIES := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800102 $(vhal_v2_0)-libproto-native \
Steve Paik56c0c842017-01-24 18:08:38 -0800103
Steve Paika59644a2017-02-08 13:51:55 -0800104LOCAL_CFLAGS += -Wall -Wextra -Werror
105
Pavel Maltseve2603e32016-10-25 16:03:23 -0700106include $(BUILD_STATIC_LIBRARY)
107
108
109###############################################################################
110# Vehicle reference implementation unit tests
111###############################################################################
112include $(CLEAR_VARS)
113
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800114LOCAL_MODULE:= $(vhal_v2_0)-manager-unit-tests
Pavel Maltseve2603e32016-10-25 16:03:23 -0700115
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800116LOCAL_WHOLE_STATIC_LIBRARIES := \
117 $(vhal_v2_0)-manager-lib \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700118
119LOCAL_SRC_FILES:= \
Pavel Maltsev7cb0bf32016-12-02 16:52:39 -0800120 tests/AccessControlConfigParser_test.cpp \
Pavel Maltsev8ab96e32017-01-27 11:48:29 -0800121 tests/RecurrentTimer_test.cpp \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700122 tests/SubscriptionManager_test.cpp \
123 tests/VehicleHalManager_test.cpp \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800124 tests/VehicleObjectPool_test.cpp \
125 tests/VehiclePropConfigIndex_test.cpp \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700126
127LOCAL_SHARED_LIBRARIES := \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700128 libbinder \
Yifan Hong6b920e42016-11-16 14:17:58 -0800129 libhidlbase \
130 libhidltransport \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700131 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800132 liblog \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700133 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800134 $(vhal_v2_0) \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700135
136LOCAL_CFLAGS += -Wall -Wextra
137LOCAL_MODULE_TAGS := tests
138
139include $(BUILD_NATIVE_TEST)
140
141
142###############################################################################
143# Vehicle HAL service
144###############################################################################
145include $(CLEAR_VARS)
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800146LOCAL_MODULE := $(vhal_v2_0)-service
147LOCAL_INIT_RC := $(vhal_v2_0)-service.rc
Steven Morelanda0da1a12017-02-13 09:59:06 -0800148LOCAL_PROPRIETARY_MODULE := true
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700149LOCAL_MODULE_RELATIVE_PATH := hw
Pavel Maltseve2603e32016-10-25 16:03:23 -0700150
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700151LOCAL_SRC_FILES := \
152 VehicleService.cpp
153
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700154LOCAL_SHARED_LIBRARIES := \
Steve Paika59644a2017-02-08 13:51:55 -0800155 libbase \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700156 libbinder \
Yifan Hong6b920e42016-11-16 14:17:58 -0800157 libhidlbase \
158 libhidltransport \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700159 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800160 liblog \
Steve Paik56c0c842017-01-24 18:08:38 -0800161 libprotobuf-cpp-lite \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700162 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800163 $(vhal_v2_0) \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700164
Steve Paik56c0c842017-01-24 18:08:38 -0800165LOCAL_STATIC_LIBRARIES := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800166 $(vhal_v2_0)-manager-lib \
167 $(vhal_v2_0)-default-impl-lib \
168 $(vhal_v2_0)-libproto-native \
Steve Paik56c0c842017-01-24 18:08:38 -0800169
Steve Paika59644a2017-02-08 13:51:55 -0800170LOCAL_CFLAGS += -Wall -Wextra -Werror
171
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700172include $(BUILD_EXECUTABLE)