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