Use -Werror in hardware/interfaces/automotive/vehicle
[android/platform-hardware-interfaces.git] / automotive / vehicle / 2.0 / default / Android.mk
1 # 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.
15 LOCAL_PATH := $(call my-dir)
17 vhal_v2_0 = android.hardware.automotive.vehicle@2.0
19 ###############################################################################
20 # Vehicle reference implementation lib
21 ###############################################################################
22 include $(CLEAR_VARS)
23 LOCAL_MODULE := $(vhal_v2_0)-manager-lib
24 LOCAL_SRC_FILES := \
25     common/src/SubscriptionManager.cpp \
26     common/src/VehicleHalManager.cpp \
27     common/src/VehicleObjectPool.cpp \
28     common/src/VehiclePropertyStore.cpp \
29     common/src/VehicleUtils.cpp \
31 LOCAL_CFLAGS := -Wall -Werror
33 LOCAL_C_INCLUDES := \
34     $(LOCAL_PATH)/common/include/vhal_v2_0
36 LOCAL_EXPORT_C_INCLUDE_DIRS := \
37     $(LOCAL_PATH)/common/include
39 LOCAL_SHARED_LIBRARIES := \
40     libhidlbase \
41     libhidltransport \
42     liblog \
43     libutils \
44     $(vhal_v2_0) \
46 include $(BUILD_STATIC_LIBRARY)
49 include $(CLEAR_VARS)
50 LOCAL_MODULE := $(vhal_v2_0)-manager-lib-shared
51 LOCAL_SRC_FILES := \
52     common/src/SubscriptionManager.cpp \
53     common/src/VehicleHalManager.cpp \
54     common/src/VehicleObjectPool.cpp \
55     common/src/VehiclePropertyStore.cpp \
56     common/src/VehicleUtils.cpp \
58 LOCAL_CFLAGS := -Wall -Werror
60 LOCAL_C_INCLUDES := \
61     $(LOCAL_PATH)/common/include/vhal_v2_0
63 LOCAL_EXPORT_C_INCLUDE_DIRS := \
64     $(LOCAL_PATH)/common/include
66 LOCAL_SHARED_LIBRARIES := \
67     libhidlbase \
68     libhidltransport \
69     liblog \
70     libutils \
71     $(vhal_v2_0) \
73 include $(BUILD_SHARED_LIBRARY)
75 ###############################################################################
76 # Vehicle HAL Protobuf library
77 ###############################################################################
78 include $(CLEAR_VARS)
79 LOCAL_SRC_FILES := $(call all-proto-files-under, impl/vhal_v2_0/proto)
81 LOCAL_PROTOC_OPTIMIZE_TYPE := nano
83 LOCAL_MODULE := $(vhal_v2_0)-libproto-native
84 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
86 LOCAL_MODULE_TAGS := optional
88 LOCAL_STRIP_MODULE := keep_symbols
90 generated_sources_dir := $(call local-generated-sources-dir)
91 LOCAL_EXPORT_C_INCLUDE_DIRS := \
92     $(generated_sources_dir)/proto/$(LOCAL_PATH)/impl/vhal_v2_0/proto
94 include $(BUILD_STATIC_LIBRARY)
97 ###############################################################################
98 # Vehicle default VehicleHAL implementation
99 ###############################################################################
100 include $(CLEAR_VARS)
102 LOCAL_MODULE:= $(vhal_v2_0)-default-impl-lib
103 LOCAL_SRC_FILES:= \
104     impl/vhal_v2_0/EmulatedVehicleHal.cpp \
105     impl/vhal_v2_0/VehicleEmulator.cpp \
106     impl/vhal_v2_0/PipeComm.cpp \
107     impl/vhal_v2_0/SocketComm.cpp \
109 LOCAL_C_INCLUDES := \
110     $(LOCAL_PATH)/impl/vhal_v2_0
112 LOCAL_EXPORT_C_INCLUDE_DIRS := \
113     $(LOCAL_PATH)/impl
115 LOCAL_WHOLE_STATIC_LIBRARIES := \
116     $(vhal_v2_0)-manager-lib \
118 LOCAL_SHARED_LIBRARIES := \
119     libbase \
120     libhidlbase \
121     libhidltransport \
122     liblog \
123     libprotobuf-cpp-lite \
124     libutils \
125     $(vhal_v2_0) \
127 LOCAL_STATIC_LIBRARIES := \
128     libqemu_pipe \
129     $(vhal_v2_0)-libproto-native \
131 LOCAL_CFLAGS += -Wall -Wextra -Werror
133 include $(BUILD_STATIC_LIBRARY)
136 ###############################################################################
137 # Vehicle reference implementation unit tests
138 ###############################################################################
139 include $(CLEAR_VARS)
141 LOCAL_MODULE:= $(vhal_v2_0)-manager-unit-tests
143 LOCAL_WHOLE_STATIC_LIBRARIES := \
144     $(vhal_v2_0)-manager-lib \
146 LOCAL_SRC_FILES:= \
147     tests/RecurrentTimer_test.cpp \
148     tests/SubscriptionManager_test.cpp \
149     tests/VehicleHalManager_test.cpp \
150     tests/VehicleObjectPool_test.cpp \
151     tests/VehiclePropConfigIndex_test.cpp \
153 LOCAL_HEADER_LIBRARIES := \
154     libbase_headers
156 LOCAL_SHARED_LIBRARIES := \
157     libhidlbase \
158     libhidltransport \
159     liblog \
160     libutils \
161     $(vhal_v2_0) \
163 LOCAL_CFLAGS += -Wall -Wextra -Werror
164 LOCAL_MODULE_TAGS := tests
166 include $(BUILD_NATIVE_TEST)
169 ###############################################################################
170 # Vehicle HAL service
171 ###############################################################################
172 include $(CLEAR_VARS)
173 LOCAL_MODULE := $(vhal_v2_0)-service
174 LOCAL_INIT_RC := $(vhal_v2_0)-service.rc
175 LOCAL_PROPRIETARY_MODULE := true
176 LOCAL_MODULE_RELATIVE_PATH := hw
178 LOCAL_SRC_FILES := \
179     VehicleService.cpp
181 LOCAL_SHARED_LIBRARIES := \
182     libbase \
183     libhidlbase \
184     libhidltransport \
185     liblog \
186     libprotobuf-cpp-lite \
187     libutils \
188     $(vhal_v2_0) \
190 LOCAL_STATIC_LIBRARIES := \
191     $(vhal_v2_0)-manager-lib \
192     $(vhal_v2_0)-default-impl-lib \
193     $(vhal_v2_0)-libproto-native \
194     libqemu_pipe \
196 LOCAL_CFLAGS += -Wall -Wextra -Werror
198 include $(BUILD_EXECUTABLE)