blob: 324be512a54093d6ca2d873c93893ca0174711c5 [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 \
26 common/src/Obd2SensorStore.cpp \
27 common/src/SubscriptionManager.cpp \
28 common/src/VehicleHalManager.cpp \
29 common/src/VehicleObjectPool.cpp \
30 common/src/VehicleUtils.cpp \
31
32LOCAL_C_INCLUDES := \
33 $(LOCAL_PATH)/common/include/vhal_v2_0
34
35LOCAL_EXPORT_C_INCLUDE_DIRS := \
36 $(LOCAL_PATH)/common/include
Pavel Maltseva2f426a2016-10-04 10:17:05 -070037
38LOCAL_SHARED_LIBRARIES := \
Pavel Maltseve2603e32016-10-25 16:03:23 -070039 libbinder \
Yifan Hong6b920e42016-11-16 14:17:58 -080040 libhidlbase \
41 libhidltransport \
Pavel Maltseva2f426a2016-10-04 10:17:05 -070042 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -080043 liblog \
Pavel Maltseva2f426a2016-10-04 10:17:05 -070044 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080045 $(vhal_v2_0) \
Pavel Maltseva2f426a2016-10-04 10:17:05 -070046
Pavel Maltseve2603e32016-10-25 16:03:23 -070047include $(BUILD_STATIC_LIBRARY)
Pavel Maltseva2f426a2016-10-04 10:17:05 -070048
Pavel Maltseve2603e32016-10-25 16:03:23 -070049###############################################################################
Steve Paik56c0c842017-01-24 18:08:38 -080050# Vehicle HAL Protobuf library
51###############################################################################
52include $(CLEAR_VARS)
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080053LOCAL_SRC_FILES := $(call all-proto-files-under, impl/vhal_v2_0/proto)
Steve Paik56c0c842017-01-24 18:08:38 -080054
55LOCAL_PROTOC_OPTIMIZE_TYPE := nano
56
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080057LOCAL_MODULE := $(vhal_v2_0)-libproto-native
Steve Paik56c0c842017-01-24 18:08:38 -080058LOCAL_MODULE_CLASS := STATIC_LIBRARIES
59
60LOCAL_MODULE_TAGS := optional
61
62LOCAL_STRIP_MODULE := keep_symbols
63
64generated_sources_dir := $(call local-generated-sources-dir)
65LOCAL_EXPORT_C_INCLUDE_DIRS := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080066 $(generated_sources_dir)/proto/$(LOCAL_PATH)/impl/vhal_v2_0/proto
Steve Paik56c0c842017-01-24 18:08:38 -080067
68include $(BUILD_STATIC_LIBRARY)
69
70
71###############################################################################
Pavel Maltseve2603e32016-10-25 16:03:23 -070072# Vehicle default VehicleHAL implementation
73###############################################################################
Pavel Maltseva2f426a2016-10-04 10:17:05 -070074include $(CLEAR_VARS)
Pavel Maltseve2603e32016-10-25 16:03:23 -070075
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080076LOCAL_MODULE:= $(vhal_v2_0)-default-impl-lib
Pavel Maltseve2603e32016-10-25 16:03:23 -070077LOCAL_SRC_FILES:= \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080078 impl/vhal_v2_0/DefaultVehicleHal.cpp \
79
80LOCAL_C_INCLUDES := \
81 $(LOCAL_PATH)/impl/vhal_v2_0
82
83LOCAL_EXPORT_C_INCLUDE_DIRS := \
84 $(LOCAL_PATH)/impl
85
86LOCAL_WHOLE_STATIC_LIBRARIES := \
87 $(vhal_v2_0)-manager-lib \
Pavel Maltseve2603e32016-10-25 16:03:23 -070088
89LOCAL_SHARED_LIBRARIES := \
Pavel Maltseve2603e32016-10-25 16:03:23 -070090 libbinder \
Yifan Hong6b920e42016-11-16 14:17:58 -080091 libhidlbase \
92 libhidltransport \
Pavel Maltseve2603e32016-10-25 16:03:23 -070093 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -080094 liblog \
Steve Paik56c0c842017-01-24 18:08:38 -080095 libprotobuf-cpp-lite \
Pavel Maltseve2603e32016-10-25 16:03:23 -070096 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080097 $(vhal_v2_0) \
Pavel Maltseve2603e32016-10-25 16:03:23 -070098
Steve Paik56c0c842017-01-24 18:08:38 -080099LOCAL_STATIC_LIBRARIES := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800100 $(vhal_v2_0)-libproto-native \
Steve Paik56c0c842017-01-24 18:08:38 -0800101
Pavel Maltseve2603e32016-10-25 16:03:23 -0700102include $(BUILD_STATIC_LIBRARY)
103
104
105###############################################################################
106# Vehicle reference implementation unit tests
107###############################################################################
108include $(CLEAR_VARS)
109
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800110LOCAL_MODULE:= $(vhal_v2_0)-manager-unit-tests
Pavel Maltseve2603e32016-10-25 16:03:23 -0700111
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800112LOCAL_WHOLE_STATIC_LIBRARIES := \
113 $(vhal_v2_0)-manager-lib \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700114
115LOCAL_SRC_FILES:= \
Pavel Maltsev7cb0bf32016-12-02 16:52:39 -0800116 tests/AccessControlConfigParser_test.cpp \
Enrico Granataadcb7c72017-01-25 12:07:15 -0800117 tests/Obd2SensorStore_test.cpp \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700118 tests/SubscriptionManager_test.cpp \
119 tests/VehicleHalManager_test.cpp \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800120 tests/VehicleObjectPool_test.cpp \
121 tests/VehiclePropConfigIndex_test.cpp \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700122
123LOCAL_SHARED_LIBRARIES := \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700124 libbinder \
Yifan Hong6b920e42016-11-16 14:17:58 -0800125 libhidlbase \
126 libhidltransport \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700127 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800128 liblog \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700129 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800130 $(vhal_v2_0) \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700131
132LOCAL_CFLAGS += -Wall -Wextra
133LOCAL_MODULE_TAGS := tests
134
135include $(BUILD_NATIVE_TEST)
136
137
138###############################################################################
139# Vehicle HAL service
140###############################################################################
141include $(CLEAR_VARS)
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800142LOCAL_MODULE := $(vhal_v2_0)-service
143LOCAL_INIT_RC := $(vhal_v2_0)-service.rc
Steven Morelanda0da1a12017-02-13 09:59:06 -0800144LOCAL_PROPRIETARY_MODULE := true
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700145LOCAL_MODULE_RELATIVE_PATH := hw
Pavel Maltseve2603e32016-10-25 16:03:23 -0700146
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700147LOCAL_SRC_FILES := \
148 VehicleService.cpp
149
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700150LOCAL_SHARED_LIBRARIES := \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700151 libbinder \
Yifan Hong6b920e42016-11-16 14:17:58 -0800152 libhidlbase \
153 libhidltransport \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700154 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800155 liblog \
Steve Paik56c0c842017-01-24 18:08:38 -0800156 libprotobuf-cpp-lite \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700157 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800158 $(vhal_v2_0) \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700159
Steve Paik56c0c842017-01-24 18:08:38 -0800160LOCAL_STATIC_LIBRARIES := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800161 $(vhal_v2_0)-manager-lib \
162 $(vhal_v2_0)-default-impl-lib \
163 $(vhal_v2_0)-libproto-native \
Steve Paik56c0c842017-01-24 18:08:38 -0800164
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700165include $(BUILD_EXECUTABLE)