Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 1 | # |
| 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 | # |
| 16 | LOCAL_PATH := $(call my-dir) |
| 17 | |
Colin Cross | cf3a0b5 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 18 | # Load framework-specific path mappings used later in the build. |
| 19 | include $(LOCAL_PATH)/pathmap.mk |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 20 | |
| 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 |
| 28 | ifneq ($(ANDROID_BUILD_EMBEDDED),true) |
| 29 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 30 | # Copy AIDL files to be preprocessed and included in the SDK, |
| 31 | # specified relative to the root of the build tree. |
| 32 | # ============================================================ |
| 33 | include $(CLEAR_VARS) |
| 34 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 35 | # This is used by ide.mk as the list of source files that are |
| 36 | # always included. |
| 37 | INTERNAL_SDK_SOURCE_DIRS := $(addprefix $(LOCAL_PATH)/,$(dirs_to_document)) |
| 38 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 39 | $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE)) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 40 | $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE)) |
Michael Wright | b2b2c0e | 2015-11-06 15:21:13 +0000 | [diff] [blame] | 41 | $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE)) |
Sundong Ahn | c21f78e | 2018-08-31 18:19:12 +0900 | [diff] [blame] | 42 | $(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) |
Anton Hansson | 7b0414b | 2020-03-19 15:09:44 +0000 | [diff] [blame] | 45 | $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_MODULE_LIB_API_FILE):apistubs/android/module-lib/api/android.txt) |
| 46 | $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_SERVER_API_FILE):apistubs/android/system-server/api/android.txt) |
Michael Wright | b2b2c0e | 2015-11-06 15:21:13 +0000 | [diff] [blame] | 47 | |
Nan Zhang | e9a76f7 | 2018-07-11 15:19:22 -0700 | [diff] [blame] | 48 | # sdk.atree needs to copy the whole dir: $(OUT_DOCS)/offline-sdk to the final zip. |
| 49 | # So keep offline-sdk-timestamp target here, and unzip offline-sdk-docs.zip to |
| 50 | # $(OUT_DOCS)/offline-sdk. |
| 51 | $(OUT_DOCS)/offline-sdk-timestamp: $(OUT_DOCS)/offline-sdk-docs-docs.zip |
| 52 | $(hide) rm -rf $(OUT_DOCS)/offline-sdk |
| 53 | $(hide) mkdir -p $(OUT_DOCS)/offline-sdk |
| 54 | ( unzip -qo $< -d $(OUT_DOCS)/offline-sdk && touch -f $@ ) || exit 1 |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 55 | |
Colin Cross | c07f3823 | 2019-02-08 11:33:33 -0800 | [diff] [blame] | 56 | .PHONY: docs offline-sdk-docs |
| 57 | docs offline-sdk-docs: $(OUT_DOCS)/offline-sdk-timestamp |
| 58 | |
Jerome Gaillard | b59a1cd | 2019-10-10 19:09:21 +0100 | [diff] [blame] | 59 | SDK_METADATA_DIR :=$= $(call intermediates-dir-for,PACKAGING,framework-doc-stubs-metadata,,COMMON) |
| 60 | SDK_METADATA_FILES :=$= $(addprefix $(SDK_METADATA_DIR)/,\ |
| 61 | activity_actions.txt \ |
| 62 | broadcast_actions.txt \ |
| 63 | categories.txt \ |
| 64 | features.txt \ |
| 65 | service_actions.txt \ |
| 66 | widgets.txt) |
| 67 | SDK_METADATA :=$= $(firstword $(SDK_METADATA_FILES)) |
| 68 | $(SDK_METADATA): .KATI_IMPLICIT_OUTPUTS := $(filter-out $(SDK_METADATA),$(SDK_METADATA_FILES)) |
| 69 | $(SDK_METADATA): $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/framework-doc-stubs-metadata.zip |
| 70 | rm -rf $(SDK_METADATA_DIR) |
| 71 | mkdir -p $(SDK_METADATA_DIR) |
| 72 | unzip -qo $< -d $(SDK_METADATA_DIR) |
| 73 | |
| 74 | .PHONY: framework-doc-stubs |
| 75 | framework-doc-stubs: $(SDK_METADATA) |
| 76 | |
Nan Zhang | 96bb1ba | 2018-11-30 11:43:31 -0800 | [diff] [blame] | 77 | # Run this for checkbuild |
| 78 | checkbuild: doc-comment-check-docs |
Nan Zhang | 96bb1ba | 2018-11-30 11:43:31 -0800 | [diff] [blame] | 79 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 80 | # Include subdirectory makefiles |
| 81 | # ============================================================ |
| 82 | |
| 83 | # If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework |
| 84 | # team really wants is to build the stuff defined by this makefile. |
| 85 | ifeq (,$(ONE_SHOT_MAKEFILE)) |
| 86 | include $(call first-makefiles-under,$(LOCAL_PATH)) |
| 87 | endif |
| 88 | |
Holly Jiuyu Sun | bbc8580 | 2017-12-21 18:44:59 -0800 | [diff] [blame] | 89 | endif # ANDROID_BUILD_EMBEDDED |