keunyoung | 1ab8e18 | 2015-09-24 09:25:22 -0700 | [diff] [blame] | 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 | |
Keun-young Park | ec7b18f | 2016-02-29 16:49:53 -0800 | [diff] [blame] | 17 | #disble build in PDK, missing aidl import breaks build |
| 18 | ifneq ($(TARGET_BUILD_PDK),true) |
| 19 | |
keunyoung | 1ab8e18 | 2015-09-24 09:25:22 -0700 | [diff] [blame] | 20 | LOCAL_PATH:= $(call my-dir) |
| 21 | |
| 22 | include $(CLEAR_VARS) |
| 23 | |
Keun-young Park | e54ac27 | 2016-02-16 19:02:18 -0800 | [diff] [blame] | 24 | LOCAL_MODULE := android.car |
keunyoung | 1ab8e18 | 2015-09-24 09:25:22 -0700 | [diff] [blame] | 25 | LOCAL_MODULE_TAGS := optional |
| 26 | |
Keun-young Park | 161f69e | 2017-01-27 16:13:00 -0800 | [diff] [blame] | 27 | ifneq ($(TARGET_USES_CAR_FUTURE_FEATURES),true) |
| 28 | #TODO need a tool to generate proguard rule to drop all items under @FutureFeature |
| 29 | #LOCAL_PROGUARD_ENABLED := custom |
| 30 | #LOCAL_PROGUARD_FLAG_FILES := proguard_drop_future.flags |
| 31 | endif |
| 32 | |
Antonio Cortes | c52d5f9 | 2017-02-06 08:47:38 -0800 | [diff] [blame] | 33 | car_lib_sources := $(call all-java-files-under, src) |
| 34 | ifeq ($(TARGET_USES_CAR_FUTURE_FEATURES),true) |
| 35 | car_lib_sources += $(call all-java-files-under, src_feature_future) |
| 36 | else |
| 37 | car_lib_sources += $(call all-java-files-under, src_feature_current) |
| 38 | endif |
Enrico Granata | dbda56f | 2017-12-18 11:53:22 -0800 | [diff] [blame] | 39 | |
Antonio Cortes | c52d5f9 | 2017-02-06 08:47:38 -0800 | [diff] [blame] | 40 | car_lib_sources += $(call all-Iaidl-files-under, src) |
Enrico Granata | dbda56f | 2017-12-18 11:53:22 -0800 | [diff] [blame] | 41 | |
| 42 | # IoStats* are parcelable types (vs. interface types), but the build system uses an initial |
| 43 | # I as a magic marker to mean "interface", and due to this ends up refusing to compile |
| 44 | # these files as part of the build process. |
| 45 | # A clean solution to this is actively being worked on by the build team, but is not yet |
| 46 | # available, so for now we just filter the files out by hand. |
| 47 | car_lib_sources := $(filter-out src/android/car/storagemonitoring/IoStats.aidl,$(car_lib_sources)) |
| 48 | car_lib_sources := $(filter-out src/android/car/storagemonitoring/IoStatsEntry.aidl,$(car_lib_sources)) |
| 49 | |
Jakub Pawlowski | b4dc215 | 2017-08-08 07:48:36 -0700 | [diff] [blame] | 50 | LOCAL_AIDL_INCLUDES += system/bt/binder |
Antonio Cortes | c52d5f9 | 2017-02-06 08:47:38 -0800 | [diff] [blame] | 51 | |
| 52 | LOCAL_SRC_FILES := $(car_lib_sources) |
keunyoung | 1ab8e18 | 2015-09-24 09:25:22 -0700 | [diff] [blame] | 53 | |
Allen Hair | e315d2e | 2016-09-13 14:18:23 -0700 | [diff] [blame] | 54 | ifeq ($(EMMA_INSTRUMENT_FRAMEWORK),true) |
| 55 | LOCAL_EMMA_INSTRUMENT := true |
| 56 | endif |
| 57 | |
Keun-young Park | e54ac27 | 2016-02-16 19:02:18 -0800 | [diff] [blame] | 58 | include $(BUILD_JAVA_LIBRARY) |
Keun-young Park | ec7b18f | 2016-02-29 16:49:53 -0800 | [diff] [blame] | 59 | |
Vitalii Tomkiv | 9aef1ae | 2016-03-30 13:05:59 -0700 | [diff] [blame] | 60 | ifeq ($(BOARD_IS_AUTOMOTIVE), true) |
Dean Harding | 62950b1 | 2018-02-15 10:56:27 -0800 | [diff] [blame] | 61 | $(call dist-for-goals,dist_files,$(full_classes_jar):$(LOCAL_MODULE).jar) |
Vitalii Tomkiv | 9aef1ae | 2016-03-30 13:05:59 -0700 | [diff] [blame] | 62 | endif |
| 63 | |
Vitalii Tomkiv | 280b572 | 2016-03-17 16:17:21 -0700 | [diff] [blame] | 64 | # API Check |
| 65 | # --------------------------------------------- |
| 66 | car_module := $(LOCAL_MODULE) |
| 67 | car_module_src_files := $(LOCAL_SRC_FILES) |
| 68 | car_module_api_dir := $(LOCAL_PATH)/api |
| 69 | car_module_java_libraries := framework |
| 70 | car_module_include_systemapi := true |
| 71 | car_module_java_packages := android.car* |
| 72 | include $(CAR_API_CHECK) |
| 73 | |
Yao, Yuxing | 5c71c0d | 2018-02-06 10:12:29 -0800 | [diff] [blame] | 74 | # Build stubs jar for target android-support-car |
| 75 | # --------------------------------------------- |
| 76 | include $(CLEAR_VARS) |
| 77 | |
| 78 | LOCAL_SRC_FILES := $(call all-java-files-under, src) |
| 79 | |
| 80 | LOCAL_JAVA_LIBRARIES := android.car |
| 81 | |
| 82 | LOCAL_ADDITIONAL_JAVA_DIR := $(call intermediates-dir-for,JAVA_LIBRARIES,android.car,,COMMON)/src |
| 83 | |
| 84 | android_car_stub_packages := \ |
| 85 | android.car* |
| 86 | |
| 87 | android_car_api := \ |
| 88 | $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/android.car_api.txt |
| 89 | |
| 90 | # Note: The make target is android.car-stub-docs |
| 91 | LOCAL_MODULE := android.car-stub |
| 92 | LOCAL_DROIDDOC_OPTIONS := \ |
| 93 | -stubs $(call intermediates-dir-for,JAVA_LIBRARIES,android.car-stubs,,COMMON)/src \ |
| 94 | -stubpackages $(subst $(space),:,$(android_car_stub_packages)) \ |
| 95 | -api $(android_car_api) \ |
| 96 | -nodocs |
| 97 | |
| 98 | LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)/java/ |
| 99 | LOCAL_DROIDDOC_HTML_DIR := |
| 100 | |
| 101 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 102 | |
| 103 | LOCAL_UNINSTALLABLE_MODULE := true |
| 104 | |
| 105 | include $(BUILD_DROIDDOC) |
| 106 | |
| 107 | $(android_car_api): $(full_target) |
| 108 | |
| 109 | android.car-stubs_stamp := $(full_target) |
| 110 | |
| 111 | ############################################### |
| 112 | # Build the stubs java files into a jar. This build rule relies on the |
| 113 | # stubs_stamp make variable being set from the droiddoc rule. |
| 114 | |
| 115 | include $(CLEAR_VARS) |
| 116 | |
| 117 | # CAR_API_CHECK uses the same name to generate a module, but BUILD_DROIDDOC |
| 118 | # appends "-docs" to module name. |
| 119 | LOCAL_MODULE := android.car-stubs |
| 120 | LOCAL_SOURCE_FILES_ALL_GENERATED := true |
| 121 | |
| 122 | # Make sure to run droiddoc first to generate the stub source files. |
| 123 | LOCAL_ADDITIONAL_DEPENDENCIES := $(android.car-stubs_stamp) |
| 124 | |
| 125 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 126 | |
| 127 | android.car-stubs_stamp := |
| 128 | android_car_stub_packages := |
| 129 | android_car_api := |
| 130 | |
Steve Paik | b40de19 | 2018-03-01 18:07:38 -0800 | [diff] [blame] | 131 | include $(call all-makefiles-under,$(LOCAL_PATH)) |
| 132 | |
Anthony Chen | 7bd39e9 | 2018-04-02 13:13:53 -0700 | [diff] [blame^] | 133 | endif #TARGET_BUILD_PDK |