2015-04-24 06:16:27 +00:00
|
|
|
# Copyright (C) 2015 The CyanogenMod Project
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
LOCAL_PATH := $(call my-dir)
|
|
|
|
|
2015-05-06 00:37:05 +00:00
|
|
|
# We have a special case here where we build the library's resources
|
|
|
|
# independently from its code, so we need to find where the resource
|
|
|
|
# class source got placed in the course of building the resources.
|
|
|
|
# Thus, the magic here.
|
|
|
|
# Also, this module cannot depend directly on the R.java file; if it
|
|
|
|
# did, the PRIVATE_* vars for R.java wouldn't be guaranteed to be correct.
|
|
|
|
# Instead, it depends on the R.stamp file, which lists the corresponding
|
|
|
|
# R.java file as a prerequisite.
|
|
|
|
cm_platform_res := APPS/org.cyanogenmod.platform-res_intermediates/src
|
|
|
|
|
2015-04-24 06:16:27 +00:00
|
|
|
# The CyanogenMod Platform Framework Library
|
|
|
|
# ============================================================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2015-07-19 00:12:21 +00:00
|
|
|
cyanogenmod_src := src/java/cyanogenmod
|
|
|
|
cyanogenmod_internal_src := src/java/org/cyanogenmod/internal
|
2015-04-30 18:10:56 +00:00
|
|
|
library_src := cm/lib/main/java
|
2015-04-24 06:16:27 +00:00
|
|
|
|
|
|
|
LOCAL_MODULE := org.cyanogenmod.platform
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
2015-05-06 00:37:05 +00:00
|
|
|
|
|
|
|
LOCAL_JAVA_LIBRARIES := \
|
2015-08-17 05:33:30 +00:00
|
|
|
services \
|
|
|
|
org.cyanogenmod.hardware
|
2015-04-24 06:16:27 +00:00
|
|
|
|
|
|
|
LOCAL_SRC_FILES := \
|
2015-07-19 00:12:21 +00:00
|
|
|
$(call all-java-files-under, $(cyanogenmod_src)) \
|
|
|
|
$(call all-java-files-under, $(cyanogenmod_internal_src)) \
|
2015-05-06 00:37:05 +00:00
|
|
|
$(call all-java-files-under, $(library_src))
|
2015-04-24 06:16:27 +00:00
|
|
|
|
|
|
|
## READ ME: ########################################################
|
|
|
|
##
|
|
|
|
## When updating this list of aidl files, consider if that aidl is
|
|
|
|
## part of the SDK API. If it is, also add it to the list below that
|
|
|
|
## is preprocessed and distributed with the SDK. This list should
|
|
|
|
## not contain any aidl files for parcelables, but the one below should
|
|
|
|
## if you intend for 3rd parties to be able to send those objects
|
|
|
|
## across process boundaries.
|
|
|
|
##
|
|
|
|
## READ ME: ########################################################
|
|
|
|
LOCAL_SRC_FILES += \
|
2015-07-19 00:12:21 +00:00
|
|
|
$(call all-Iaidl-files-under, $(cyanogenmod_src)) \
|
|
|
|
$(call all-Iaidl-files-under, $(cyanogenmod_internal_src))
|
2015-05-06 00:37:05 +00:00
|
|
|
|
2015-05-28 23:13:04 +00:00
|
|
|
cmplat_LOCAL_INTERMEDIATE_SOURCES := \
|
2015-05-13 11:48:42 +00:00
|
|
|
$(cm_platform_res)/cyanogenmod/platform/R.java \
|
|
|
|
$(cm_platform_res)/cyanogenmod/platform/Manifest.java \
|
2015-05-06 00:37:05 +00:00
|
|
|
$(cm_platform_res)/org/cyanogenmod/platform/internal/R.java
|
2015-04-24 06:16:27 +00:00
|
|
|
|
2015-05-19 20:27:17 +00:00
|
|
|
LOCAL_INTERMEDIATE_SOURCES := \
|
2015-05-28 23:13:04 +00:00
|
|
|
$(cmplat_LOCAL_INTERMEDIATE_SOURCES)
|
2015-05-19 20:27:17 +00:00
|
|
|
|
2015-04-24 06:16:27 +00:00
|
|
|
# Include aidl files from cyanogenmod.app namespace as well as internal src aidl files
|
|
|
|
LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/src/java
|
|
|
|
|
|
|
|
include $(BUILD_JAVA_LIBRARY)
|
2015-05-06 00:37:05 +00:00
|
|
|
cm_framework_module := $(LOCAL_INSTALLED_MODULE)
|
|
|
|
|
|
|
|
# Make sure that R.java and Manifest.java are built before we build
|
|
|
|
# the source for this library.
|
|
|
|
cm_framework_res_R_stamp := \
|
|
|
|
$(call intermediates-dir-for,APPS,org.cyanogenmod.platform-res,,COMMON)/src/R.stamp
|
|
|
|
$(full_classes_compiled_jar): $(cm_framework_res_R_stamp)
|
2015-11-03 18:13:04 +00:00
|
|
|
$(built_dex_intermediate): $(cm_framework_res_R_stamp)
|
2015-05-06 00:37:05 +00:00
|
|
|
|
|
|
|
$(cm_framework_module): | $(dir $(cm_framework_module))org.cyanogenmod.platform-res.apk
|
2015-04-24 06:16:27 +00:00
|
|
|
|
|
|
|
cm_framework_built := $(call java-lib-deps, org.cyanogenmod.platform)
|
|
|
|
|
|
|
|
# ==== org.cyanogenmod.platform.xml lib def ========================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := org.cyanogenmod.platform.xml
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
|
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
|
|
|
|
# This will install the file in /system/etc/permissions
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/permissions
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := $(LOCAL_MODULE)
|
|
|
|
|
|
|
|
include $(BUILD_PREBUILT)
|
|
|
|
|
|
|
|
# the sdk
|
|
|
|
# ============================================================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE:= org.cyanogenmod.platform.sdk
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_REQUIRED_MODULES := services
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := \
|
2015-07-19 00:12:21 +00:00
|
|
|
$(call all-java-files-under, $(cyanogenmod_src)) \
|
|
|
|
$(call all-Iaidl-files-under, $(cyanogenmod_src)) \
|
|
|
|
$(call all-Iaidl-files-under, $(cyanogenmod_internal_src))
|
2015-04-24 06:16:27 +00:00
|
|
|
|
|
|
|
# Included aidl files from cyanogenmod.app namespace
|
|
|
|
LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/src/java
|
|
|
|
|
2015-08-28 22:28:23 +00:00
|
|
|
cmsdk_LOCAL_INTERMEDIATE_SOURCES := \
|
|
|
|
$(cm_platform_res)/cyanogenmod/platform/R.java \
|
|
|
|
$(cm_platform_res)/cyanogenmod/platform/Manifest.java
|
|
|
|
|
|
|
|
LOCAL_INTERMEDIATE_SOURCES := \
|
|
|
|
$(cmsdk_LOCAL_INTERMEDIATE_SOURCES)
|
|
|
|
|
2015-04-24 06:16:27 +00:00
|
|
|
$(full_target): $(cm_framework_built) $(gen)
|
|
|
|
include $(BUILD_STATIC_JAVA_LIBRARY)
|
|
|
|
|
2015-11-04 01:34:01 +00:00
|
|
|
# full target for use by platform apps
|
|
|
|
#
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE:= org.cyanogenmod.platform.internal
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_REQUIRED_MODULES := services
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := \
|
|
|
|
$(call all-java-files-under, $(cyanogenmod_src)) \
|
2015-11-30 18:57:06 +00:00
|
|
|
$(call all-java-files-under, $(cyanogenmod_internal_src)) \
|
2015-11-04 01:34:01 +00:00
|
|
|
$(call all-Iaidl-files-under, $(cyanogenmod_src)) \
|
|
|
|
$(call all-Iaidl-files-under, $(cyanogenmod_internal_src))
|
|
|
|
|
|
|
|
# Included aidl files from cyanogenmod.app namespace
|
|
|
|
LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/src/java
|
|
|
|
|
|
|
|
cmsdk_LOCAL_INTERMEDIATE_SOURCES := \
|
|
|
|
$(cm_platform_res)/cyanogenmod/platform/R.java \
|
|
|
|
$(cm_platform_res)/cyanogenmod/platform/Manifest.java \
|
|
|
|
$(cm_platform_res)/org/cyanogenmod/platform/internal/R.java \
|
|
|
|
$(cm_platform_res)/org/cyanogenmod/platform/internal/Manifest.java
|
|
|
|
|
|
|
|
LOCAL_INTERMEDIATE_SOURCES := \
|
|
|
|
$(cmsdk_LOCAL_INTERMEDIATE_SOURCES)
|
|
|
|
|
|
|
|
$(full_target): $(cm_framework_built) $(gen)
|
|
|
|
include $(BUILD_STATIC_JAVA_LIBRARY)
|
|
|
|
|
|
|
|
|
2015-04-24 06:16:27 +00:00
|
|
|
# ===========================================================
|
|
|
|
# Common Droiddoc vars
|
2015-05-28 23:13:04 +00:00
|
|
|
cmplat_docs_src_files := \
|
2015-07-19 00:12:21 +00:00
|
|
|
$(call all-java-files-under, $(cyanogenmod_src)) \
|
|
|
|
$(call all-html-files-under, $(cyanogenmod_src))
|
2015-05-28 23:13:04 +00:00
|
|
|
|
|
|
|
cmplat_docs_java_libraries := \
|
2015-04-24 06:16:27 +00:00
|
|
|
org.cyanogenmod.platform.sdk
|
|
|
|
|
2015-05-28 23:13:04 +00:00
|
|
|
# SDK version as defined
|
2015-12-22 19:04:08 +00:00
|
|
|
cmplat_docs_SDK_VERSION := 13.0
|
2015-05-28 23:13:04 +00:00
|
|
|
|
|
|
|
# release version
|
2015-12-22 19:04:08 +00:00
|
|
|
cmplat_docs_SDK_REL_ID := 4
|
2015-05-28 23:13:04 +00:00
|
|
|
|
|
|
|
cmplat_docs_LOCAL_MODULE_CLASS := JAVA_LIBRARIES
|
|
|
|
|
|
|
|
cmplat_docs_LOCAL_DROIDDOC_SOURCE_PATH := \
|
|
|
|
$(cmplat_docs_src_files)
|
|
|
|
|
|
|
|
intermediates.COMMON := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS), org.cyanogenmod.platform.sdk,,COMMON)
|
|
|
|
|
|
|
|
# ==== the api stubs and current.xml ===========================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES:= \
|
2015-12-22 19:04:08 +00:00
|
|
|
$(cmplat_docs_src_files)
|
2015-05-28 23:13:04 +00:00
|
|
|
LOCAL_INTERMEDIATE_SOURCES:= $(cmplat_LOCAL_INTERMEDIATE_SOURCES)
|
|
|
|
LOCAL_JAVA_LIBRARIES:= $(cmplat_docs_java_libraries)
|
|
|
|
LOCAL_MODULE_CLASS:= $(cmplat_docs_LOCAL_MODULE_CLASS)
|
|
|
|
LOCAL_DROIDDOC_SOURCE_PATH:= $(cmplat_docs_LOCAL_DROIDDOC_SOURCE_PATH)
|
|
|
|
LOCAL_ADDITIONAL_JAVA_DIR:= $(intermediates.COMMON)/src
|
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES:= $(cmplat_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
|
|
|
|
|
|
|
|
LOCAL_MODULE := cm-api-stubs
|
|
|
|
|
|
|
|
LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:= build/tools/droiddoc/templates-sdk
|
|
|
|
|
|
|
|
LOCAL_DROIDDOC_OPTIONS:= \
|
|
|
|
-stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/cmsdk_stubs_current_intermediates/src \
|
2015-12-22 19:04:08 +00:00
|
|
|
-stubpackages cyanogenmod.alarmclock:cyanogenmod.app:cyanogenmod.content:cyanogenmod.hardware:cyanogenmod.media:cyanogenmod.os:cyanogenmod.profiles:cyanogenmod.providers:cyanogenmod.platform:cyanogenmod.power \
|
|
|
|
-exclude org.cyanogenmod.platform.internal \
|
2015-05-28 23:13:04 +00:00
|
|
|
-api $(INTERNAL_CM_PLATFORM_API_FILE) \
|
|
|
|
-removedApi $(INTERNAL_CM_PLATFORM_REMOVED_API_FILE) \
|
2015-06-23 03:34:55 +00:00
|
|
|
-nodocs \
|
|
|
|
-verbose
|
2015-05-28 23:13:04 +00:00
|
|
|
|
|
|
|
LOCAL_UNINSTALLABLE_MODULE := true
|
|
|
|
|
|
|
|
include $(BUILD_DROIDDOC)
|
|
|
|
|
2015-12-22 19:04:08 +00:00
|
|
|
# $(gen), i.e. framework.aidl, is also needed while building against the current stub.
|
2015-05-28 23:13:04 +00:00
|
|
|
$(full_target): $(cm_framework_built) $(gen)
|
|
|
|
$(INTERNAL_CM_PLATFORM_API_FILE): $(full_target)
|
2015-12-22 19:04:08 +00:00
|
|
|
$(call dist-for-goals,sdk,$(INTERNAL_CM_PLATFORM_API_FILE))
|
2015-05-28 23:13:04 +00:00
|
|
|
|
|
|
|
# ==== the system api stubs ===================================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES:= \
|
2015-12-22 19:04:08 +00:00
|
|
|
$(cmplat_docs_src_files)
|
2015-05-28 23:13:04 +00:00
|
|
|
LOCAL_INTERMEDIATE_SOURCES:= $(cmplat_LOCAL_INTERMEDIATE_SOURCES)
|
|
|
|
LOCAL_JAVA_LIBRARIES:= $(cmplat_docs_java_libraries)
|
|
|
|
LOCAL_MODULE_CLASS:= $(cmplat_docs_LOCAL_MODULE_CLASS)
|
|
|
|
LOCAL_DROIDDOC_SOURCE_PATH:= $(cmplat_docs_LOCAL_DROIDDOC_SOURCE_PATH)
|
|
|
|
LOCAL_ADDITIONAL_JAVA_DIR:= $(intermediates.COMMON)/src
|
|
|
|
|
|
|
|
LOCAL_MODULE := cm-system-api-stubs
|
|
|
|
|
|
|
|
LOCAL_DROIDDOC_OPTIONS:=\
|
|
|
|
-stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/cmsdk_system_stubs_current_intermediates/src \
|
2015-12-22 19:04:08 +00:00
|
|
|
-stubpackages cyanogenmod.alarmclock:cyanogenmod.app:cyanogenmod.content:cyanogenmod.hardware:cyanogenmod.media:cyanogenmod.os:cyanogenmod.profiles:cyanogenmod.providers:cyanogenmod.platform:cyanogenmod.power \
|
2015-05-28 23:13:04 +00:00
|
|
|
-showAnnotation android.annotation.SystemApi \
|
2015-12-22 19:04:08 +00:00
|
|
|
-exclude org.cyanogenmod.platform.internal \
|
2015-05-28 23:13:04 +00:00
|
|
|
-api $(INTERNAL_CM_PLATFORM_SYSTEM_API_FILE) \
|
|
|
|
-removedApi $(INTERNAL_CM_PLATFORM_SYSTEM_REMOVED_API_FILE) \
|
2015-06-23 03:34:55 +00:00
|
|
|
-nodocs \
|
|
|
|
-verbose
|
2015-05-28 23:13:04 +00:00
|
|
|
|
|
|
|
LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:= build/tools/droiddoc/templates-sdk
|
|
|
|
|
|
|
|
LOCAL_UNINSTALLABLE_MODULE := true
|
|
|
|
|
|
|
|
include $(BUILD_DROIDDOC)
|
|
|
|
|
2015-12-22 19:04:08 +00:00
|
|
|
# $(gen), i.e. framework.aidl, is also needed while building against the current stub.
|
2015-05-28 23:13:04 +00:00
|
|
|
$(full_target): $(cm_framework_built) $(gen)
|
|
|
|
$(INTERNAL_CM_PLATFORM_API_FILE): $(full_target)
|
2015-12-22 19:04:08 +00:00
|
|
|
$(call dist-for-goals,sdk,$(INTERNAL_CM_PLATFORM_API_FILE))
|
2015-05-28 23:13:04 +00:00
|
|
|
|
2015-04-24 06:16:27 +00:00
|
|
|
# Documentation
|
|
|
|
# ===========================================================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := org.cyanogenmod.platform.sdk
|
2015-05-28 23:13:04 +00:00
|
|
|
LOCAL_INTERMEDIATE_SOURCES:= $(cmplat_LOCAL_INTERMEDIATE_SOURCES)
|
2015-04-24 06:16:27 +00:00
|
|
|
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
|
2015-05-28 23:13:04 +00:00
|
|
|
LOCAL_SRC_FILES := $(cmplat_docs_src_files)
|
2015-04-24 06:16:27 +00:00
|
|
|
LOCAL_ADDITONAL_JAVA_DIR := $(intermediates.COMMON)/src
|
|
|
|
|
|
|
|
LOCAL_IS_HOST_MODULE := false
|
2015-05-19 22:56:13 +00:00
|
|
|
LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := vendor/cm/build/tools/droiddoc/templates-cmsdk
|
2015-04-24 06:16:27 +00:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := \
|
2015-12-22 19:04:08 +00:00
|
|
|
services \
|
|
|
|
org.cyanogenmod.hardware
|
2015-04-24 06:16:27 +00:00
|
|
|
|
2015-05-28 23:13:04 +00:00
|
|
|
LOCAL_JAVA_LIBRARIES := $(cmplat_docs_java_libraries)
|
2015-04-24 06:16:27 +00:00
|
|
|
|
|
|
|
LOCAL_DROIDDOC_OPTIONS := \
|
2015-05-28 23:13:04 +00:00
|
|
|
-offlinemode \
|
2015-12-22 19:04:08 +00:00
|
|
|
-exclude org.cyanogenmod.platform.internal \
|
2015-05-28 23:13:04 +00:00
|
|
|
-hdf android.whichdoc offline \
|
|
|
|
-hdf sdk.version $(cmplat_docs_docs_SDK_VERSION) \
|
|
|
|
-hdf sdk.rel.id $(cmplat_docs_docs_SDK_REL_ID) \
|
|
|
|
-hdf sdk.preview 0 \
|
2015-07-13 21:52:14 +00:00
|
|
|
-since $(CM_SRC_API_DIR)/1.txt 1 \
|
2015-09-29 18:40:29 +00:00
|
|
|
-since $(CM_SRC_API_DIR)/2.txt 2 \
|
2015-10-07 18:32:41 +00:00
|
|
|
-since $(CM_SRC_API_DIR)/3.txt 3 \
|
|
|
|
-since $(CM_SRC_API_DIR)/4.txt 4
|
2015-04-24 06:16:27 +00:00
|
|
|
|
|
|
|
$(full_target): $(cm_framework_built) $(gen)
|
|
|
|
include $(BUILD_DROIDDOC)
|
|
|
|
|
2015-05-06 00:37:05 +00:00
|
|
|
include $(call first-makefiles-under,$(LOCAL_PATH))
|
|
|
|
|
2015-04-24 06:16:27 +00:00
|
|
|
# Cleanup temp vars
|
|
|
|
# ===========================================================
|
|
|
|
cmplat.docs.src_files :=
|
|
|
|
cmplat.docs.java_libraries :=
|
|
|
|
intermediates.COMMON :=
|