Android.mk 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. ifeq (,$(PRODUCT_MINIMIZE_JAVA_DEBUG_INFO))
  17. LOCAL_PATH := $(my-dir)
  18. include $(CLEAR_VARS)
  19. #
  20. # Define rules to build temp_layoutlib.jar, which contains a subset of
  21. # the classes in framework.jar. The layoutlib_create tool is used to
  22. # transform the framework jar into the temp_layoutlib jar.
  23. #
  24. # We need to process the framework classes.jar file, but we can't
  25. # depend directly on it (private vars won't be inherited correctly).
  26. # So, we depend on framework's BUILT file.
  27. built_framework_dep := $(call java-lib-deps,framework)
  28. built_framework_classes := $(call java-lib-files,framework)
  29. built_core_dep := $(call java-lib-deps,core-libart)
  30. built_core_classes := $(call java-lib-files,core-libart)
  31. built_ext_dep := $(call java-lib-deps,ext)
  32. built_ext_classes := $(call java-lib-files,ext)
  33. built_icudata_dep := $(call java-lib-deps,icu4j-icudata-jarjar,HOST)
  34. built_icutzdata_dep := $(call java-lib-deps,icu4j-icutzdata-jarjar,HOST)
  35. built_layoutlib_create_jar := $(call java-lib-files,layoutlib_create,HOST)
  36. # This is mostly a copy of config/host_java_library.mk
  37. LOCAL_MODULE := temp_layoutlib
  38. LOCAL_MODULE_CLASS := JAVA_LIBRARIES
  39. LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
  40. LOCAL_IS_HOST_MODULE := true
  41. LOCAL_BUILT_MODULE_STEM := classes.jar
  42. #######################################
  43. include $(BUILD_SYSTEM)/base_rules.mk
  44. #######################################
  45. $(LOCAL_BUILT_MODULE): $(built_core_dep) \
  46. $(built_framework_dep) \
  47. $(built_ext_dep) \
  48. $(built_icudata_dep) \
  49. $(built_icutzdata_dep) \
  50. $(built_layoutlib_create_jar)
  51. $(hide) echo "host layoutlib_create: $@"
  52. $(hide) mkdir -p $(dir $@)
  53. $(hide) rm -f $@
  54. $(hide) ls -l $(built_framework_classes)
  55. $(hide) java -ea -jar $(built_layoutlib_create_jar) \
  56. --create-stub \
  57. $@ \
  58. $(built_core_classes) \
  59. $(built_framework_classes) \
  60. $(built_ext_classes) \
  61. $(built_icudata_dep) \
  62. $(built_icutzdata_dep) \
  63. $(built_ext_data)
  64. $(hide) ls -l $(built_framework_classes)
  65. my_link_type := java
  66. my_warn_types :=
  67. my_allowed_types :=
  68. my_link_deps :=
  69. my_2nd_arch_prefix :=
  70. my_common := COMMON
  71. include $(BUILD_SYSTEM)/link_type.mk
  72. #
  73. # Include the subdir makefiles.
  74. #
  75. include $(call all-makefiles-under,$(LOCAL_PATH))
  76. endif