blob: b8535bd7d30dac9cf14af0e63f58b587a12eb82b [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 \
28 common/src/VehicleUtils.cpp \
29
30LOCAL_C_INCLUDES := \
31 $(LOCAL_PATH)/common/include/vhal_v2_0
32
33LOCAL_EXPORT_C_INCLUDE_DIRS := \
34 $(LOCAL_PATH)/common/include
Pavel Maltseva2f426a2016-10-04 10:17:05 -070035
36LOCAL_SHARED_LIBRARIES := \
Yifan Hong6b920e42016-11-16 14:17:58 -080037 libhidlbase \
38 libhidltransport \
Pavel Maltseva2f426a2016-10-04 10:17:05 -070039 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -080040 liblog \
Pavel Maltseva2f426a2016-10-04 10:17:05 -070041 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080042 $(vhal_v2_0) \
Pavel Maltseva2f426a2016-10-04 10:17:05 -070043
Pavel Maltseve2603e32016-10-25 16:03:23 -070044include $(BUILD_STATIC_LIBRARY)
Pavel Maltseva2f426a2016-10-04 10:17:05 -070045
Pavel Maltseve2603e32016-10-25 16:03:23 -070046###############################################################################
Steve Paik56c0c842017-01-24 18:08:38 -080047# Vehicle HAL Protobuf library
48###############################################################################
49include $(CLEAR_VARS)
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080050LOCAL_SRC_FILES := $(call all-proto-files-under, impl/vhal_v2_0/proto)
Steve Paik56c0c842017-01-24 18:08:38 -080051
52LOCAL_PROTOC_OPTIMIZE_TYPE := nano
53
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080054LOCAL_MODULE := $(vhal_v2_0)-libproto-native
Steve Paik56c0c842017-01-24 18:08:38 -080055LOCAL_MODULE_CLASS := STATIC_LIBRARIES
56
57LOCAL_MODULE_TAGS := optional
58
59LOCAL_STRIP_MODULE := keep_symbols
60
61generated_sources_dir := $(call local-generated-sources-dir)
62LOCAL_EXPORT_C_INCLUDE_DIRS := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080063 $(generated_sources_dir)/proto/$(LOCAL_PATH)/impl/vhal_v2_0/proto
Steve Paik56c0c842017-01-24 18:08:38 -080064
65include $(BUILD_STATIC_LIBRARY)
66
67
68###############################################################################
Pavel Maltseve2603e32016-10-25 16:03:23 -070069# Vehicle default VehicleHAL implementation
70###############################################################################
Pavel Maltseva2f426a2016-10-04 10:17:05 -070071include $(CLEAR_VARS)
Pavel Maltseve2603e32016-10-25 16:03:23 -070072
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080073LOCAL_MODULE:= $(vhal_v2_0)-default-impl-lib
Pavel Maltseve2603e32016-10-25 16:03:23 -070074LOCAL_SRC_FILES:= \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080075 impl/vhal_v2_0/DefaultVehicleHal.cpp \
Steve Paika59644a2017-02-08 13:51:55 -080076 impl/vhal_v2_0/PipeComm.cpp \
77 impl/vhal_v2_0/SocketComm.cpp
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080078
79LOCAL_C_INCLUDES := \
80 $(LOCAL_PATH)/impl/vhal_v2_0
81
82LOCAL_EXPORT_C_INCLUDE_DIRS := \
83 $(LOCAL_PATH)/impl
84
85LOCAL_WHOLE_STATIC_LIBRARIES := \
86 $(vhal_v2_0)-manager-lib \
Pavel Maltseve2603e32016-10-25 16:03:23 -070087
88LOCAL_SHARED_LIBRARIES := \
Steve Paika59644a2017-02-08 13:51:55 -080089 libbase \
Yifan Hong6b920e42016-11-16 14:17:58 -080090 libhidlbase \
91 libhidltransport \
Pavel Maltseve2603e32016-10-25 16:03:23 -070092 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -080093 liblog \
Steve Paik56c0c842017-01-24 18:08:38 -080094 libprotobuf-cpp-lite \
Pavel Maltseve2603e32016-10-25 16:03:23 -070095 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080096 $(vhal_v2_0) \
Pavel Maltseve2603e32016-10-25 16:03:23 -070097
Steve Paik56c0c842017-01-24 18:08:38 -080098LOCAL_STATIC_LIBRARIES := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -080099 $(vhal_v2_0)-libproto-native \
Steve Paik56c0c842017-01-24 18:08:38 -0800100
Steve Paika59644a2017-02-08 13:51:55 -0800101LOCAL_CFLAGS += -Wall -Wextra -Werror
102
Pavel Maltseve2603e32016-10-25 16:03:23 -0700103include $(BUILD_STATIC_LIBRARY)
104
105
106###############################################################################
107# Vehicle reference implementation unit tests
108###############################################################################
109include $(CLEAR_VARS)
110
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800111LOCAL_MODULE:= $(vhal_v2_0)-manager-unit-tests
Pavel Maltseve2603e32016-10-25 16:03:23 -0700112
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800113LOCAL_WHOLE_STATIC_LIBRARIES := \
114 $(vhal_v2_0)-manager-lib \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700115
116LOCAL_SRC_FILES:= \
Pavel Maltsev8ab96e32017-01-27 11:48:29 -0800117 tests/RecurrentTimer_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 := \
Yifan Hong6b920e42016-11-16 14:17:58 -0800124 libhidlbase \
125 libhidltransport \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700126 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800127 liblog \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700128 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800129 $(vhal_v2_0) \
Pavel Maltseve2603e32016-10-25 16:03:23 -0700130
Pavel Maltsevff89b0e2017-03-08 09:49:04 -0800131LOCAL_CFLAGS += -Wall -Wextra -Werror
Pavel Maltseve2603e32016-10-25 16:03:23 -0700132LOCAL_MODULE_TAGS := tests
133
134include $(BUILD_NATIVE_TEST)
135
136
137###############################################################################
138# Vehicle HAL service
139###############################################################################
140include $(CLEAR_VARS)
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800141LOCAL_MODULE := $(vhal_v2_0)-service
142LOCAL_INIT_RC := $(vhal_v2_0)-service.rc
Steven Morelanda0da1a12017-02-13 09:59:06 -0800143LOCAL_PROPRIETARY_MODULE := true
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700144LOCAL_MODULE_RELATIVE_PATH := hw
Pavel Maltseve2603e32016-10-25 16:03:23 -0700145
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700146LOCAL_SRC_FILES := \
147 VehicleService.cpp
148
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700149LOCAL_SHARED_LIBRARIES := \
Steve Paika59644a2017-02-08 13:51:55 -0800150 libbase \
Yifan Hong6b920e42016-11-16 14:17:58 -0800151 libhidlbase \
152 libhidltransport \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700153 libhwbinder \
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800154 liblog \
Steve Paik56c0c842017-01-24 18:08:38 -0800155 libprotobuf-cpp-lite \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700156 libutils \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800157 $(vhal_v2_0) \
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700158
Steve Paik56c0c842017-01-24 18:08:38 -0800159LOCAL_STATIC_LIBRARIES := \
Pavel Maltsevc5344ac2017-02-08 12:33:46 -0800160 $(vhal_v2_0)-manager-lib \
161 $(vhal_v2_0)-default-impl-lib \
162 $(vhal_v2_0)-libproto-native \
Steve Paik56c0c842017-01-24 18:08:38 -0800163
Steve Paika59644a2017-02-08 13:51:55 -0800164LOCAL_CFLAGS += -Wall -Wextra -Werror
165
Pavel Maltseva2f426a2016-10-04 10:17:05 -0700166include $(BUILD_EXECUTABLE)