blob: 3c56159e7828f117714148dd9bb2d981a7d2cb50 [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 Maltseva2f426a2016-10-04 10:17:05 -070040 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -080041 liblog \
Pavel Maltseva2f426a2016-10-04 10:17:05 -070042 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080043 $(vhal_v2_0) \
Pavel Maltseva2f426a2016-10-04 10:17:05 -070044
Pavel Maltseve2603e32016-10-25 16:03:23 -070045include $(BUILD_STATIC_LIBRARY)
Pavel Maltseva2f426a2016-10-04 10:17:05 -070046
Pavel Maltseve2603e32016-10-25 16:03:23 -070047###############################################################################
Steve Paik56c0c842017-01-24 18:08:38 -080048# Vehicle HAL Protobuf library
49###############################################################################
50include $(CLEAR_VARS)
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080051LOCAL_SRC_FILES := $(call all-proto-files-under, impl/vhal_v2_0/proto)
Steve Paik56c0c842017-01-24 18:08:38 -080052
53LOCAL_PROTOC_OPTIMIZE_TYPE := nano
54
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080055LOCAL_MODULE := $(vhal_v2_0)-libproto-native
Steve Paik56c0c842017-01-24 18:08:38 -080056LOCAL_MODULE_CLASS := STATIC_LIBRARIES
57
58LOCAL_MODULE_TAGS := optional
59
60LOCAL_STRIP_MODULE := keep_symbols
61
62generated_sources_dir := $(call local-generated-sources-dir)
63LOCAL_EXPORT_C_INCLUDE_DIRS := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080064 $(generated_sources_dir)/proto/$(LOCAL_PATH)/impl/vhal_v2_0/proto
Steve Paik56c0c842017-01-24 18:08:38 -080065
66include $(BUILD_STATIC_LIBRARY)
67
68
69###############################################################################
Pavel Maltseve2603e32016-10-25 16:03:23 -070070# Vehicle default VehicleHAL implementation
71###############################################################################
Pavel Maltseva2f426a2016-10-04 10:17:05 -070072include $(CLEAR_VARS)
Pavel Maltseve2603e32016-10-25 16:03:23 -070073
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080074LOCAL_MODULE:= $(vhal_v2_0)-default-impl-lib
Pavel Maltseve2603e32016-10-25 16:03:23 -070075LOCAL_SRC_FILES:= \
Pavel Maltsev33676522017-03-31 13:45:54 -070076 impl/vhal_v2_0/EmulatedVehicleHal.cpp \
77 impl/vhal_v2_0/VehicleEmulator.cpp \
Steve Paika59644a2017-02-08 13:51:55 -080078 impl/vhal_v2_0/PipeComm.cpp \
Pavel Maltsev33676522017-03-31 13:45:54 -070079 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 \
Yifan Hong6b920e42016-11-16 14:17:58 -080092 libhidlbase \
93 libhidltransport \
Pavel Maltseve2603e32016-10-25 16:03:23 -070094 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -080095 liblog \
Steve Paik56c0c842017-01-24 18:08:38 -080096 libprotobuf-cpp-lite \
Pavel Maltseve2603e32016-10-25 16:03:23 -070097 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080098 $(vhal_v2_0) \
Pavel Maltseve2603e32016-10-25 16:03:23 -070099
Steve Paik56c0c842017-01-24 18:08:38 -0800100LOCAL_STATIC_LIBRARIES := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800101 $(vhal_v2_0)-libproto-native \
Steve Paik56c0c842017-01-24 18:08:38 -0800102
Steve Paika59644a2017-02-08 13:51:55 -0800103LOCAL_CFLAGS += -Wall -Wextra -Werror
104
Pavel Maltseve2603e32016-10-25 16:03:23 -0700105include $(BUILD_STATIC_LIBRARY)
106
107
108###############################################################################
109# Vehicle reference implementation unit tests
110###############################################################################
111include $(CLEAR_VARS)
112
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800113LOCAL_MODULE:= $(vhal_v2_0)-manager-unit-tests
Pavel Maltseve2603e32016-10-25 16:03:23 -0700114
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800115LOCAL_WHOLE_STATIC_LIBRARIES := \
116 $(vhal_v2_0)-manager-lib \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700117
118LOCAL_SRC_FILES:= \
Pavel Maltsev8ab96e32017-01-27 11:48:29 -0800119 tests/RecurrentTimer_test.cpp \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700120 tests/SubscriptionManager_test.cpp \
121 tests/VehicleHalManager_test.cpp \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800122 tests/VehicleObjectPool_test.cpp \
123 tests/VehiclePropConfigIndex_test.cpp \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700124
125LOCAL_SHARED_LIBRARIES := \
Yifan Hong6b920e42016-11-16 14:17:58 -0800126 libhidlbase \
127 libhidltransport \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700128 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800129 liblog \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700130 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800131 $(vhal_v2_0) \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700132
Pavel Maltsevff89b0e2017-03-08 09:49:04 -0800133LOCAL_CFLAGS += -Wall -Wextra -Werror
Pavel Maltseve2603e32016-10-25 16:03:23 -0700134LOCAL_MODULE_TAGS := tests
135
136include $(BUILD_NATIVE_TEST)
137
138
139###############################################################################
140# Vehicle HAL service
141###############################################################################
142include $(CLEAR_VARS)
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800143LOCAL_MODULE := $(vhal_v2_0)-service
144LOCAL_INIT_RC := $(vhal_v2_0)-service.rc
Steven Morelanda0da1a12017-02-13 09:59:06 -0800145LOCAL_PROPRIETARY_MODULE := true
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700146LOCAL_MODULE_RELATIVE_PATH := hw
Pavel Maltseve2603e32016-10-25 16:03:23 -0700147
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700148LOCAL_SRC_FILES := \
149 VehicleService.cpp
150
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700151LOCAL_SHARED_LIBRARIES := \
Steve Paika59644a2017-02-08 13:51:55 -0800152 libbase \
Yifan Hong6b920e42016-11-16 14:17:58 -0800153 libhidlbase \
154 libhidltransport \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700155 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800156 liblog \
Steve Paik56c0c842017-01-24 18:08:38 -0800157 libprotobuf-cpp-lite \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700158 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800159 $(vhal_v2_0) \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700160
Steve Paik56c0c842017-01-24 18:08:38 -0800161LOCAL_STATIC_LIBRARIES := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800162 $(vhal_v2_0)-manager-lib \
163 $(vhal_v2_0)-default-impl-lib \
164 $(vhal_v2_0)-libproto-native \
Steve Paik56c0c842017-01-24 18:08:38 -0800165
Steve Paika59644a2017-02-08 13:51:55 -0800166LOCAL_CFLAGS += -Wall -Wextra -Werror
167
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700168include $(BUILD_EXECUTABLE)