blob: 815a169f388051fc29270c6cc87bdcaac5fa964c [file] [log] [blame]
Bart Searsa8cc0582015-05-07 03:23:20 +00001#
2# Copyright (C) 2008 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16LOCAL_PATH := $(call my-dir)
17
Colin Crosscf3a0b52017-11-16 00:15:28 -080018# Load framework-specific path mappings used later in the build.
19include $(LOCAL_PATH)/pathmap.mk
Bart Searsa8cc0582015-05-07 03:23:20 +000020
21# Build the master framework library.
22# The framework contains too many method references (>64K) for poor old DEX.
23# So we first build the framework as a monolithic static library then split it
24# up into smaller pieces.
25# ============================================================
26
27# embedded builds use nothing in frameworks/base
28ifneq ($(ANDROID_BUILD_EMBEDDED),true)
29
Bart Searsa8cc0582015-05-07 03:23:20 +000030# Copy AIDL files to be preprocessed and included in the SDK,
31# specified relative to the root of the build tree.
32# ============================================================
33include $(CLEAR_VARS)
34
Bart Searsa8cc0582015-05-07 03:23:20 +000035# This is used by ide.mk as the list of source files that are
36# always included.
37INTERNAL_SDK_SOURCE_DIRS := $(addprefix $(LOCAL_PATH)/,$(dirs_to_document))
38
Bart Searsa8cc0582015-05-07 03:23:20 +000039$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
Bart Searsa8cc0582015-05-07 03:23:20 +000040$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE))
Michael Wrightb2b2c0e2015-11-06 15:21:13 +000041$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE))
Sundong Ahnc21f78e2018-08-31 18:19:12 +090042$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE):apistubs/android/public/api/android.txt)
43$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE):apistubs/android/system/api/android.txt)
44$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE):apistubs/android/test/api/android.txt)
Michael Wrightb2b2c0e2015-11-06 15:21:13 +000045
Nan Zhange9a76f72018-07-11 15:19:22 -070046# sdk.atree needs to copy the whole dir: $(OUT_DOCS)/offline-sdk to the final zip.
47# So keep offline-sdk-timestamp target here, and unzip offline-sdk-docs.zip to
48# $(OUT_DOCS)/offline-sdk.
49$(OUT_DOCS)/offline-sdk-timestamp: $(OUT_DOCS)/offline-sdk-docs-docs.zip
50 $(hide) rm -rf $(OUT_DOCS)/offline-sdk
51 $(hide) mkdir -p $(OUT_DOCS)/offline-sdk
52 ( unzip -qo $< -d $(OUT_DOCS)/offline-sdk && touch -f $@ ) || exit 1
Bart Searsa8cc0582015-05-07 03:23:20 +000053
Colin Crossc07f38232019-02-08 11:33:33 -080054.PHONY: docs offline-sdk-docs
55docs offline-sdk-docs: $(OUT_DOCS)/offline-sdk-timestamp
56
Jerome Gaillardb59a1cd2019-10-10 19:09:21 +010057SDK_METADATA_DIR :=$= $(call intermediates-dir-for,PACKAGING,framework-doc-stubs-metadata,,COMMON)
58SDK_METADATA_FILES :=$= $(addprefix $(SDK_METADATA_DIR)/,\
59 activity_actions.txt \
60 broadcast_actions.txt \
61 categories.txt \
62 features.txt \
63 service_actions.txt \
64 widgets.txt)
65SDK_METADATA :=$= $(firstword $(SDK_METADATA_FILES))
66$(SDK_METADATA): .KATI_IMPLICIT_OUTPUTS := $(filter-out $(SDK_METADATA),$(SDK_METADATA_FILES))
67$(SDK_METADATA): $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/framework-doc-stubs-metadata.zip
68 rm -rf $(SDK_METADATA_DIR)
69 mkdir -p $(SDK_METADATA_DIR)
70 unzip -qo $< -d $(SDK_METADATA_DIR)
71
72.PHONY: framework-doc-stubs
73framework-doc-stubs: $(SDK_METADATA)
74
Nan Zhang96bb1ba2018-11-30 11:43:31 -080075# Run this for checkbuild
76checkbuild: doc-comment-check-docs
Nan Zhang96bb1ba2018-11-30 11:43:31 -080077
David Brazdil0649c8d2018-01-22 22:23:13 +000078# ==== hiddenapi lists =======================================
Adrian Roos421ec932019-01-15 18:32:02 +010079ifneq ($(UNSAFE_DISABLE_HIDDENAPI_FLAGS),true)
David Brazdil89bf0f22018-10-30 18:21:24 +000080$(call dist-for-goals,droidcore,$(INTERNAL_PLATFORM_HIDDENAPI_FLAGS))
Mathew Inwoodea14c0c2018-10-05 14:41:03 +010081$(call dist-for-goals,droidcore,$(INTERNAL_PLATFORM_HIDDENAPI_GREYLIST_METADATA))
Adrian Roos421ec932019-01-15 18:32:02 +010082endif # UNSAFE_DISABLE_HIDDENAPI_FLAGS
Mathew Inwoodea14c0c2018-10-05 14:41:03 +010083
Bart Searsa8cc0582015-05-07 03:23:20 +000084# Include subdirectory makefiles
85# ============================================================
86
87# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
88# team really wants is to build the stuff defined by this makefile.
89ifeq (,$(ONE_SHOT_MAKEFILE))
90include $(call first-makefiles-under,$(LOCAL_PATH))
91endif
92
Holly Jiuyu Sunbbc85802017-12-21 18:44:59 -080093endif # ANDROID_BUILD_EMBEDDED