Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 1 | # Copyright (C) 2015 The CyanogenMod 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. |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 14 | LOCAL_PATH := $(call my-dir) |
| 15 | |
Adnan Begovic | 37fc76f | 2015-05-05 17:37:05 -0700 | [diff] [blame] | 16 | # We have a special case here where we build the library's resources |
| 17 | # independently from its code, so we need to find where the resource |
| 18 | # class source got placed in the course of building the resources. |
| 19 | # Thus, the magic here. |
| 20 | # Also, this module cannot depend directly on the R.java file; if it |
| 21 | # did, the PRIVATE_* vars for R.java wouldn't be guaranteed to be correct. |
| 22 | # Instead, it depends on the R.stamp file, which lists the corresponding |
| 23 | # R.java file as a prerequisite. |
| 24 | cm_platform_res := APPS/org.cyanogenmod.platform-res_intermediates/src |
| 25 | |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 26 | # The CyanogenMod Platform Framework Library |
| 27 | # ============================================================ |
| 28 | include $(CLEAR_VARS) |
| 29 | |
Adnan Begovic | 5ff5e10 | 2015-07-18 17:12:21 -0700 | [diff] [blame] | 30 | cyanogenmod_src := src/java/cyanogenmod |
| 31 | cyanogenmod_internal_src := src/java/org/cyanogenmod/internal |
Adnan Begovic | a7d6fc5 | 2015-04-30 11:10:56 -0700 | [diff] [blame] | 32 | library_src := cm/lib/main/java |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 33 | |
| 34 | LOCAL_MODULE := org.cyanogenmod.platform |
| 35 | LOCAL_MODULE_TAGS := optional |
Adnan Begovic | 37fc76f | 2015-05-05 17:37:05 -0700 | [diff] [blame] | 36 | |
| 37 | LOCAL_JAVA_LIBRARIES := \ |
Steve Kondik | 5ee87cb | 2015-08-16 22:33:30 -0700 | [diff] [blame] | 38 | services \ |
| 39 | org.cyanogenmod.hardware |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 40 | |
| 41 | LOCAL_SRC_FILES := \ |
Adnan Begovic | 5ff5e10 | 2015-07-18 17:12:21 -0700 | [diff] [blame] | 42 | $(call all-java-files-under, $(cyanogenmod_src)) \ |
| 43 | $(call all-java-files-under, $(cyanogenmod_internal_src)) \ |
Adnan Begovic | 37fc76f | 2015-05-05 17:37:05 -0700 | [diff] [blame] | 44 | $(call all-java-files-under, $(library_src)) |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 45 | |
| 46 | ## READ ME: ######################################################## |
| 47 | ## |
| 48 | ## When updating this list of aidl files, consider if that aidl is |
| 49 | ## part of the SDK API. If it is, also add it to the list below that |
| 50 | ## is preprocessed and distributed with the SDK. This list should |
| 51 | ## not contain any aidl files for parcelables, but the one below should |
| 52 | ## if you intend for 3rd parties to be able to send those objects |
| 53 | ## across process boundaries. |
| 54 | ## |
| 55 | ## READ ME: ######################################################## |
| 56 | LOCAL_SRC_FILES += \ |
Adnan Begovic | 5ff5e10 | 2015-07-18 17:12:21 -0700 | [diff] [blame] | 57 | $(call all-Iaidl-files-under, $(cyanogenmod_src)) \ |
| 58 | $(call all-Iaidl-files-under, $(cyanogenmod_internal_src)) |
Adnan Begovic | 37fc76f | 2015-05-05 17:37:05 -0700 | [diff] [blame] | 59 | |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 60 | cmplat_LOCAL_INTERMEDIATE_SOURCES := \ |
Adnan Begovic | 37c4b96 | 2015-05-13 04:48:42 -0700 | [diff] [blame] | 61 | $(cm_platform_res)/cyanogenmod/platform/R.java \ |
| 62 | $(cm_platform_res)/cyanogenmod/platform/Manifest.java \ |
Adnan Begovic | 37fc76f | 2015-05-05 17:37:05 -0700 | [diff] [blame] | 63 | $(cm_platform_res)/org/cyanogenmod/platform/internal/R.java |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 64 | |
Adnan Begovic | 8c36c41 | 2015-05-19 13:27:17 -0700 | [diff] [blame] | 65 | LOCAL_INTERMEDIATE_SOURCES := \ |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 66 | $(cmplat_LOCAL_INTERMEDIATE_SOURCES) |
Adnan Begovic | 8c36c41 | 2015-05-19 13:27:17 -0700 | [diff] [blame] | 67 | |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 68 | # Include aidl files from cyanogenmod.app namespace as well as internal src aidl files |
| 69 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/src/java |
| 70 | |
| 71 | include $(BUILD_JAVA_LIBRARY) |
Adnan Begovic | 37fc76f | 2015-05-05 17:37:05 -0700 | [diff] [blame] | 72 | cm_framework_module := $(LOCAL_INSTALLED_MODULE) |
| 73 | |
| 74 | # Make sure that R.java and Manifest.java are built before we build |
| 75 | # the source for this library. |
| 76 | cm_framework_res_R_stamp := \ |
| 77 | $(call intermediates-dir-for,APPS,org.cyanogenmod.platform-res,,COMMON)/src/R.stamp |
| 78 | $(full_classes_compiled_jar): $(cm_framework_res_R_stamp) |
Steve Kondik | 1a5c249 | 2015-11-03 10:13:04 -0800 | [diff] [blame] | 79 | $(built_dex_intermediate): $(cm_framework_res_R_stamp) |
Adnan Begovic | 37fc76f | 2015-05-05 17:37:05 -0700 | [diff] [blame] | 80 | |
| 81 | $(cm_framework_module): | $(dir $(cm_framework_module))org.cyanogenmod.platform-res.apk |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 82 | |
| 83 | cm_framework_built := $(call java-lib-deps, org.cyanogenmod.platform) |
| 84 | |
| 85 | # ==== org.cyanogenmod.platform.xml lib def ======================== |
| 86 | include $(CLEAR_VARS) |
| 87 | |
| 88 | LOCAL_MODULE := org.cyanogenmod.platform.xml |
| 89 | LOCAL_MODULE_TAGS := optional |
| 90 | |
| 91 | LOCAL_MODULE_CLASS := ETC |
| 92 | |
| 93 | # This will install the file in /system/etc/permissions |
| 94 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/permissions |
| 95 | |
| 96 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 97 | |
| 98 | include $(BUILD_PREBUILT) |
| 99 | |
| 100 | # the sdk |
| 101 | # ============================================================ |
| 102 | include $(CLEAR_VARS) |
| 103 | |
| 104 | LOCAL_MODULE:= org.cyanogenmod.platform.sdk |
| 105 | LOCAL_MODULE_TAGS := optional |
| 106 | LOCAL_REQUIRED_MODULES := services |
| 107 | |
| 108 | LOCAL_SRC_FILES := \ |
Adnan Begovic | 5ff5e10 | 2015-07-18 17:12:21 -0700 | [diff] [blame] | 109 | $(call all-java-files-under, $(cyanogenmod_src)) \ |
| 110 | $(call all-Iaidl-files-under, $(cyanogenmod_src)) \ |
| 111 | $(call all-Iaidl-files-under, $(cyanogenmod_internal_src)) |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 112 | |
| 113 | # Included aidl files from cyanogenmod.app namespace |
| 114 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/src/java |
| 115 | |
Adnan Begovic | e949433 | 2015-08-28 15:28:23 -0700 | [diff] [blame] | 116 | cmsdk_LOCAL_INTERMEDIATE_SOURCES := \ |
| 117 | $(cm_platform_res)/cyanogenmod/platform/R.java \ |
| 118 | $(cm_platform_res)/cyanogenmod/platform/Manifest.java |
| 119 | |
| 120 | LOCAL_INTERMEDIATE_SOURCES := \ |
| 121 | $(cmsdk_LOCAL_INTERMEDIATE_SOURCES) |
| 122 | |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 123 | $(full_target): $(cm_framework_built) $(gen) |
| 124 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 125 | |
Steve Kondik | 5e522e6 | 2015-11-03 17:34:01 -0800 | [diff] [blame] | 126 | # full target for use by platform apps |
| 127 | # |
| 128 | include $(CLEAR_VARS) |
| 129 | |
| 130 | LOCAL_MODULE:= org.cyanogenmod.platform.internal |
| 131 | LOCAL_MODULE_TAGS := optional |
| 132 | LOCAL_REQUIRED_MODULES := services |
| 133 | |
| 134 | LOCAL_SRC_FILES := \ |
| 135 | $(call all-java-files-under, $(cyanogenmod_src)) \ |
Adnan Begovic | 33fecfb | 2015-11-30 10:57:06 -0800 | [diff] [blame] | 136 | $(call all-java-files-under, $(cyanogenmod_internal_src)) \ |
Steve Kondik | 5e522e6 | 2015-11-03 17:34:01 -0800 | [diff] [blame] | 137 | $(call all-Iaidl-files-under, $(cyanogenmod_src)) \ |
| 138 | $(call all-Iaidl-files-under, $(cyanogenmod_internal_src)) |
| 139 | |
| 140 | # Included aidl files from cyanogenmod.app namespace |
| 141 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/src/java |
| 142 | |
| 143 | cmsdk_LOCAL_INTERMEDIATE_SOURCES := \ |
| 144 | $(cm_platform_res)/cyanogenmod/platform/R.java \ |
| 145 | $(cm_platform_res)/cyanogenmod/platform/Manifest.java \ |
| 146 | $(cm_platform_res)/org/cyanogenmod/platform/internal/R.java \ |
| 147 | $(cm_platform_res)/org/cyanogenmod/platform/internal/Manifest.java |
| 148 | |
| 149 | LOCAL_INTERMEDIATE_SOURCES := \ |
| 150 | $(cmsdk_LOCAL_INTERMEDIATE_SOURCES) |
| 151 | |
| 152 | $(full_target): $(cm_framework_built) $(gen) |
| 153 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 154 | |
| 155 | |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 156 | # =========================================================== |
| 157 | # Common Droiddoc vars |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 158 | cmplat_docs_src_files := \ |
Adnan Begovic | 5ff5e10 | 2015-07-18 17:12:21 -0700 | [diff] [blame] | 159 | $(call all-java-files-under, $(cyanogenmod_src)) \ |
| 160 | $(call all-html-files-under, $(cyanogenmod_src)) |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 161 | |
| 162 | cmplat_docs_java_libraries := \ |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 163 | org.cyanogenmod.platform.sdk |
| 164 | |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 165 | # SDK version as defined |
| 166 | cmplat_docs_SDK_VERSION := 0.1 |
| 167 | |
| 168 | # release version |
| 169 | cmplat_docs_SDK_REL_ID := 0 |
| 170 | |
| 171 | cmplat_docs_LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 172 | |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 173 | cmplat_docs_LOCAL_DROIDDOC_SOURCE_PATH := \ |
| 174 | $(cmplat_docs_src_files) |
| 175 | |
| 176 | intermediates.COMMON := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS), org.cyanogenmod.platform.sdk,,COMMON) |
| 177 | |
| 178 | # ==== the api stubs and current.xml =========================== |
| 179 | include $(CLEAR_VARS) |
| 180 | |
| 181 | LOCAL_SRC_FILES:= \ |
| 182 | $(cmplat_docs_src_files) \ |
| 183 | $(call all-java-files-under, $(library_src)) |
| 184 | LOCAL_INTERMEDIATE_SOURCES:= $(cmplat_LOCAL_INTERMEDIATE_SOURCES) |
| 185 | LOCAL_JAVA_LIBRARIES:= $(cmplat_docs_java_libraries) |
| 186 | LOCAL_MODULE_CLASS:= $(cmplat_docs_LOCAL_MODULE_CLASS) |
| 187 | LOCAL_DROIDDOC_SOURCE_PATH:= $(cmplat_docs_LOCAL_DROIDDOC_SOURCE_PATH) |
| 188 | LOCAL_ADDITIONAL_JAVA_DIR:= $(intermediates.COMMON)/src |
| 189 | LOCAL_ADDITIONAL_DEPENDENCIES:= $(cmplat_docs_LOCAL_ADDITIONAL_DEPENDENCIES) |
| 190 | |
| 191 | LOCAL_MODULE := cm-api-stubs |
| 192 | |
| 193 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:= build/tools/droiddoc/templates-sdk |
| 194 | |
| 195 | LOCAL_DROIDDOC_OPTIONS:= \ |
| 196 | -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/cmsdk_stubs_current_intermediates/src \ |
Steve Kondik | 620c35b | 2015-11-02 17:43:44 -0800 | [diff] [blame] | 197 | -stubpackages cyanogenmod.alarmclock:cyanogenmod.app:cyanogenmod.content:cyanogenmod.hardware:cyanogenmod.media:cyanogenmod.os:cyanogenmod.profiles:cyanogenmod.providers:cyanogenmod.platform:cyanogenmod.power:org.cyanogenmod.platform \ |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 198 | -api $(INTERNAL_CM_PLATFORM_API_FILE) \ |
| 199 | -removedApi $(INTERNAL_CM_PLATFORM_REMOVED_API_FILE) \ |
Adnan Begovic | f1f9f25 | 2015-06-22 20:34:55 -0700 | [diff] [blame] | 200 | -nodocs \ |
| 201 | -verbose |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 202 | |
| 203 | LOCAL_UNINSTALLABLE_MODULE := true |
| 204 | |
| 205 | include $(BUILD_DROIDDOC) |
| 206 | |
| 207 | $(full_target): $(cm_framework_built) $(gen) |
| 208 | $(INTERNAL_CM_PLATFORM_API_FILE): $(full_target) |
| 209 | |
| 210 | # ==== the system api stubs =================================== |
| 211 | include $(CLEAR_VARS) |
| 212 | |
| 213 | LOCAL_SRC_FILES:= \ |
| 214 | $(cmplat_docs_src_files) \ |
| 215 | $(call all-java-files-under, $(library_src)) |
| 216 | LOCAL_INTERMEDIATE_SOURCES:= $(cmplat_LOCAL_INTERMEDIATE_SOURCES) |
| 217 | LOCAL_JAVA_LIBRARIES:= $(cmplat_docs_java_libraries) |
| 218 | LOCAL_MODULE_CLASS:= $(cmplat_docs_LOCAL_MODULE_CLASS) |
| 219 | LOCAL_DROIDDOC_SOURCE_PATH:= $(cmplat_docs_LOCAL_DROIDDOC_SOURCE_PATH) |
| 220 | LOCAL_ADDITIONAL_JAVA_DIR:= $(intermediates.COMMON)/src |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 221 | |
| 222 | LOCAL_MODULE := cm-system-api-stubs |
| 223 | |
| 224 | LOCAL_DROIDDOC_OPTIONS:=\ |
| 225 | -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/cmsdk_system_stubs_current_intermediates/src \ |
Steve Kondik | 620c35b | 2015-11-02 17:43:44 -0800 | [diff] [blame] | 226 | -stubpackages cyanogenmod.alarmclock:cyanogenmod.app:cyanogenmod.content:cyanogenmod.hardware:cyanogenmod.media:cyanogenmod.os:cyanogenmod.profiles:cyanogenmod.providers:cyanogenmod.platform:cyanogenmod.power:org.cyanogenmod.platform \ |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 227 | -showAnnotation android.annotation.SystemApi \ |
| 228 | -api $(INTERNAL_CM_PLATFORM_SYSTEM_API_FILE) \ |
| 229 | -removedApi $(INTERNAL_CM_PLATFORM_SYSTEM_REMOVED_API_FILE) \ |
Adnan Begovic | f1f9f25 | 2015-06-22 20:34:55 -0700 | [diff] [blame] | 230 | -nodocs \ |
| 231 | -verbose |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 232 | |
| 233 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:= build/tools/droiddoc/templates-sdk |
| 234 | |
| 235 | LOCAL_UNINSTALLABLE_MODULE := true |
| 236 | |
| 237 | include $(BUILD_DROIDDOC) |
| 238 | |
| 239 | $(full_target): $(cm_framework_built) $(gen) |
| 240 | $(INTERNAL_CM_PLATFORM_API_FILE): $(full_target) |
| 241 | |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 242 | # Documentation |
| 243 | # =========================================================== |
| 244 | include $(CLEAR_VARS) |
| 245 | |
| 246 | LOCAL_MODULE := org.cyanogenmod.platform.sdk |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 247 | LOCAL_INTERMEDIATE_SOURCES:= $(cmplat_LOCAL_INTERMEDIATE_SOURCES) |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 248 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 249 | LOCAL_MODULE_TAGS := optional |
| 250 | |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 251 | LOCAL_SRC_FILES := $(cmplat_docs_src_files) |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 252 | LOCAL_ADDITONAL_JAVA_DIR := $(intermediates.COMMON)/src |
| 253 | |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 254 | LOCAL_IS_HOST_MODULE := false |
Adnan Begovic | fb07983 | 2015-05-19 15:56:13 -0700 | [diff] [blame] | 255 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := vendor/cm/build/tools/droiddoc/templates-cmsdk |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 256 | LOCAL_ADDITIONAL_DEPENDENCIES := \ |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 257 | services |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 258 | |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 259 | LOCAL_JAVA_LIBRARIES := $(cmplat_docs_java_libraries) |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 260 | |
| 261 | LOCAL_DROIDDOC_OPTIONS := \ |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 262 | -offlinemode \ |
| 263 | -hidePackage org.cyanogenmod.platform.internal \ |
| 264 | -hdf android.whichdoc offline \ |
| 265 | -hdf sdk.version $(cmplat_docs_docs_SDK_VERSION) \ |
| 266 | -hdf sdk.rel.id $(cmplat_docs_docs_SDK_REL_ID) \ |
| 267 | -hdf sdk.preview 0 \ |
Adnan Begovic | e3ad391 | 2015-07-13 14:52:14 -0700 | [diff] [blame] | 268 | -since $(CM_SRC_API_DIR)/1.txt 1 \ |
Adnan Begovic | 38e8b11 | 2015-09-29 11:40:29 -0700 | [diff] [blame] | 269 | -since $(CM_SRC_API_DIR)/2.txt 2 \ |
Adnan Begovic | 4e53461 | 2015-10-07 11:32:41 -0700 | [diff] [blame] | 270 | -since $(CM_SRC_API_DIR)/3.txt 3 \ |
| 271 | -since $(CM_SRC_API_DIR)/4.txt 4 |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 272 | |
| 273 | $(full_target): $(cm_framework_built) $(gen) |
| 274 | include $(BUILD_DROIDDOC) |
| 275 | |
Adnan Begovic | 37fc76f | 2015-05-05 17:37:05 -0700 | [diff] [blame] | 276 | include $(call first-makefiles-under,$(LOCAL_PATH)) |
| 277 | |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 278 | # Cleanup temp vars |
| 279 | # =========================================================== |
| 280 | cmplat.docs.src_files := |
| 281 | cmplat.docs.java_libraries := |
| 282 | intermediates.COMMON := |