blob: ee6d134150ce89d2d717a9ab3f29d59cbee577c3 [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 := \
bohu48e40022017-03-29 12:21:27 -0700101 libqemu_pipe \
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 Maltsev8ab96e32017-01-27 11:48:29 -0800120 tests/RecurrentTimer_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 := \
Yifan Hong6b920e42016-11-16 14:17:58 -0800127 libhidlbase \
128 libhidltransport \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700129 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800130 liblog \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700131 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800132 $(vhal_v2_0) \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700133
Pavel Maltsevff89b0e2017-03-08 09:49:04 -0800134LOCAL_CFLAGS += -Wall -Wextra -Werror
Pavel Maltseve2603e32016-10-25 16:03:23 -0700135LOCAL_MODULE_TAGS := tests
136
137include $(BUILD_NATIVE_TEST)
138
139
140###############################################################################
141# Vehicle HAL service
142###############################################################################
143include $(CLEAR_VARS)
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800144LOCAL_MODULE := $(vhal_v2_0)-service
145LOCAL_INIT_RC := $(vhal_v2_0)-service.rc
Steven Morelanda0da1a12017-02-13 09:59:06 -0800146LOCAL_PROPRIETARY_MODULE := true
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700147LOCAL_MODULE_RELATIVE_PATH := hw
Pavel Maltseve2603e32016-10-25 16:03:23 -0700148
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700149LOCAL_SRC_FILES := \
150 VehicleService.cpp
151
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700152LOCAL_SHARED_LIBRARIES := \
Steve Paika59644a2017-02-08 13:51:55 -0800153 libbase \
Yifan Hong6b920e42016-11-16 14:17:58 -0800154 libhidlbase \
155 libhidltransport \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700156 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800157 liblog \
Steve Paik56c0c842017-01-24 18:08:38 -0800158 libprotobuf-cpp-lite \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700159 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800160 $(vhal_v2_0) \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700161
Steve Paik56c0c842017-01-24 18:08:38 -0800162LOCAL_STATIC_LIBRARIES := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800163 $(vhal_v2_0)-manager-lib \
164 $(vhal_v2_0)-default-impl-lib \
165 $(vhal_v2_0)-libproto-native \
bohu48e40022017-03-29 12:21:27 -0700166 libqemu_pipe \
Steve Paik56c0c842017-01-24 18:08:38 -0800167
Steve Paika59644a2017-02-08 13:51:55 -0800168LOCAL_CFLAGS += -Wall -Wextra -Werror
169
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700170include $(BUILD_EXECUTABLE)