blob: ba4a6cd927e579aa3cccd7c7f7c785e969089b72 [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 Maltseve2603e32016-10-25 16:03:23 -0700121 tests/SubscriptionManager_test.cpp \
122 tests/VehicleHalManager_test.cpp \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800123 tests/VehicleObjectPool_test.cpp \
124 tests/VehiclePropConfigIndex_test.cpp \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700125
126LOCAL_SHARED_LIBRARIES := \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700127 libbinder \
Yifan Hong6b920e42016-11-16 14:17:58 -0800128 libhidlbase \
129 libhidltransport \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700130 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800131 liblog \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700132 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800133 $(vhal_v2_0) \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700134
135LOCAL_CFLAGS += -Wall -Wextra
136LOCAL_MODULE_TAGS := tests
137
138include $(BUILD_NATIVE_TEST)
139
140
141###############################################################################
142# Vehicle HAL service
143###############################################################################
144include $(CLEAR_VARS)
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800145LOCAL_MODULE := $(vhal_v2_0)-service
146LOCAL_INIT_RC := $(vhal_v2_0)-service.rc
Steven Morelanda0da1a12017-02-13 09:59:06 -0800147LOCAL_PROPRIETARY_MODULE := true
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700148LOCAL_MODULE_RELATIVE_PATH := hw
Pavel Maltseve2603e32016-10-25 16:03:23 -0700149
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700150LOCAL_SRC_FILES := \
151 VehicleService.cpp
152
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700153LOCAL_SHARED_LIBRARIES := \
Steve Paika59644a2017-02-08 13:51:55 -0800154 libbase \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700155 libbinder \
Yifan Hong6b920e42016-11-16 14:17:58 -0800156 libhidlbase \
157 libhidltransport \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700158 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800159 liblog \
Steve Paik56c0c842017-01-24 18:08:38 -0800160 libprotobuf-cpp-lite \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700161 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800162 $(vhal_v2_0) \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700163
Steve Paik56c0c842017-01-24 18:08:38 -0800164LOCAL_STATIC_LIBRARIES := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800165 $(vhal_v2_0)-manager-lib \
166 $(vhal_v2_0)-default-impl-lib \
167 $(vhal_v2_0)-libproto-native \
Steve Paik56c0c842017-01-24 18:08:38 -0800168
Steve Paika59644a2017-02-08 13:51:55 -0800169LOCAL_CFLAGS += -Wall -Wextra -Werror
170
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700171include $(BUILD_EXECUTABLE)