You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Android.mk 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. # Load framework-specific path mappings used later in the build.
  18. include $(LOCAL_PATH)/pathmap.mk
  19. # Build the master framework library.
  20. # The framework contains too many method references (>64K) for poor old DEX.
  21. # So we first build the framework as a monolithic static library then split it
  22. # up into smaller pieces.
  23. # ============================================================
  24. # embedded builds use nothing in frameworks/base
  25. ifneq ($(ANDROID_BUILD_EMBEDDED),true)
  26. # Copy AIDL files to be preprocessed and included in the SDK,
  27. # specified relative to the root of the build tree.
  28. # ============================================================
  29. include $(CLEAR_VARS)
  30. # This is used by ide.mk as the list of source files that are
  31. # always included.
  32. INTERNAL_SDK_SOURCE_DIRS := $(addprefix $(LOCAL_PATH)/,$(dirs_to_document))
  33. $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
  34. $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE))
  35. $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE))
  36. $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE):apistubs/android/public/api/android.txt)
  37. $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE):apistubs/android/system/api/android.txt)
  38. $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE):apistubs/android/test/api/android.txt)
  39. # sdk.atree needs to copy the whole dir: $(OUT_DOCS)/offline-sdk to the final zip.
  40. # So keep offline-sdk-timestamp target here, and unzip offline-sdk-docs.zip to
  41. # $(OUT_DOCS)/offline-sdk.
  42. $(OUT_DOCS)/offline-sdk-timestamp: $(OUT_DOCS)/offline-sdk-docs-docs.zip
  43. $(hide) rm -rf $(OUT_DOCS)/offline-sdk
  44. $(hide) mkdir -p $(OUT_DOCS)/offline-sdk
  45. ( unzip -qo $< -d $(OUT_DOCS)/offline-sdk && touch -f $@ ) || exit 1
  46. .PHONY: docs offline-sdk-docs
  47. docs offline-sdk-docs: $(OUT_DOCS)/offline-sdk-timestamp
  48. SDK_METADATA_DIR :=$= $(call intermediates-dir-for,PACKAGING,framework-doc-stubs-metadata,,COMMON)
  49. SDK_METADATA_FILES :=$= $(addprefix $(SDK_METADATA_DIR)/,\
  50. activity_actions.txt \
  51. broadcast_actions.txt \
  52. categories.txt \
  53. features.txt \
  54. service_actions.txt \
  55. widgets.txt)
  56. SDK_METADATA :=$= $(firstword $(SDK_METADATA_FILES))
  57. $(SDK_METADATA): .KATI_IMPLICIT_OUTPUTS := $(filter-out $(SDK_METADATA),$(SDK_METADATA_FILES))
  58. $(SDK_METADATA): $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/framework-doc-stubs-metadata.zip
  59. rm -rf $(SDK_METADATA_DIR)
  60. mkdir -p $(SDK_METADATA_DIR)
  61. unzip -qo $< -d $(SDK_METADATA_DIR)
  62. .PHONY: framework-doc-stubs
  63. framework-doc-stubs: $(SDK_METADATA)
  64. # Run this for checkbuild
  65. checkbuild: doc-comment-check-docs
  66. # ==== hiddenapi lists =======================================
  67. ifneq ($(UNSAFE_DISABLE_HIDDENAPI_FLAGS),true)
  68. $(call dist-for-goals,droidcore,$(INTERNAL_PLATFORM_HIDDENAPI_FLAGS))
  69. $(call dist-for-goals,droidcore,$(INTERNAL_PLATFORM_HIDDENAPI_GREYLIST_METADATA))
  70. endif # UNSAFE_DISABLE_HIDDENAPI_FLAGS
  71. # Include subdirectory makefiles
  72. # ============================================================
  73. # If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
  74. # team really wants is to build the stuff defined by this makefile.
  75. ifeq (,$(ONE_SHOT_MAKEFILE))
  76. include $(call first-makefiles-under,$(LOCAL_PATH))
  77. endif
  78. endif # ANDROID_BUILD_EMBEDDED