1# Copyright (C) 2015 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#
15#
16
17# Build the Car service.
18
19#disble build in PDK, missing aidl import breaks build
20ifneq ($(TARGET_BUILD_PDK),true)
21
22LOCAL_PATH:= $(call my-dir)
23
24car_service_sources := $(call all-java-files-under, src)
25
26include $(CLEAR_VARS)
27
28LOCAL_SRC_FILES := $(car_service_sources)
29
30LOCAL_PACKAGE_NAME := CarService
31
32# Each update should be signed by OEMs
33LOCAL_CERTIFICATE := platform
34LOCAL_PRIVILEGED_MODULE := true
35
36LOCAL_PROGUARD_FLAG_FILES := proguard.flags
37LOCAL_PROGUARD_ENABLED := disabled
38
39LOCAL_JAVA_LIBRARIES += android.car
40LOCAL_STATIC_JAVA_LIBRARIES += \
41        android.hardware.automotive.vehicle-V2.0-java-static \
42        android.hardware.automotive.vehicle-V2.1-java-static \
43        vehicle-hal-support-lib \
44        car-systemtest \
45
46include $(BUILD_PACKAGE)
47
48#####################################################################################
49# Build a static library to help mocking various car services in testing
50#####################################################################################
51include $(CLEAR_VARS)
52
53LOCAL_SRC_FILES := $(car_service_sources)
54LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
55
56LOCAL_MODULE := car-service-lib-for-test
57
58LOCAL_JAVA_LIBRARIES += android.car
59LOCAL_STATIC_JAVA_LIBRARIES += \
60        android.hardware.automotive.vehicle-V2.0-java-static \
61        android.hardware.automotive.vehicle-V2.1-java-static \
62        vehicle-hal-support-lib \
63        car-systemtest \
64
65include $(BUILD_STATIC_JAVA_LIBRARY)
66
67include $(call all-makefiles-under,$(LOCAL_PATH))
68
69endif #TARGET_BUILD_PDK
70