blob: f87f6c53c8dca564b67081cdb0840438b56c1be3 [file] [log] [blame]
The Android Open Source Project64100b32009-03-03 19:31:44 -08001#
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 := $(my-dir)
17include $(CLEAR_VARS)
18
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
25# We need to process the framework classes.jar file, but we can't
26# depend directly on it (private vars won't be inherited correctly).
27# So, we depend on framework's BUILT file.
Ying Wang29a0cff2014-07-21 14:40:42 -070028built_framework_dep := $(call java-lib-deps,framework)
29built_framework_classes := $(call java-lib-files,framework)
The Android Open Source Project64100b32009-03-03 19:31:44 -080030
Piotr Jastrzebskif76035e2015-02-17 16:58:52 +000031built_oj_dep := $(call java-lib-deps,core-oj)
32built_oj_classes := $(call java-lib-files,core-oj)
33
Brian Carlstrom4fb9efc2014-06-18 15:11:01 -070034built_core_dep := $(call java-lib-deps,core-libart)
35built_core_classes := $(call java-lib-files,core-libart)
The Android Open Source Project64100b32009-03-03 19:31:44 -080036
Deepanshu Gupta4df159e2013-11-13 17:22:22 +053037built_ext_dep := $(call java-lib-deps,ext)
38built_ext_classes := $(call java-lib-files,ext)
Deepanshu Guptafa4c9e62014-01-16 14:16:23 -080039built_ext_data := $(call intermediates-dir-for, \
40 JAVA_LIBRARIES,ext,,COMMON)/javalib.jar
Neil Fuller3027ab82016-03-01 18:46:37 +000041built_icudata_dep := $(call java-lib-deps,icu4j-icudata-host-jarjar,HOST)
42built_icutzdata_dep := $(call java-lib-deps,icu4j-icutzdata-host-jarjar,HOST)
Deepanshu Gupta4df159e2013-11-13 17:22:22 +053043
The Android Open Source Project64100b32009-03-03 19:31:44 -080044built_layoutlib_create_jar := $(call intermediates-dir-for, \
45 JAVA_LIBRARIES,layoutlib_create,HOST)/javalib.jar
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 := javalib.jar
53
54#######################################
55include $(BUILD_SYSTEM)/base_rules.mk
56#######################################
57
Piotr Jastrzebskif76035e2015-02-17 16:58:52 +000058$(LOCAL_BUILT_MODULE): $(built_oj_dep) \
59 $(built_core_dep) \
The Android Open Source Project64100b32009-03-03 19:31:44 -080060 $(built_framework_dep) \
Deepanshu Gupta4df159e2013-11-13 17:22:22 +053061 $(built_ext_dep) \
Deepanshu Guptac137a662014-03-31 16:11:13 -070062 $(built_ext_data) \
Deepanshu Guptac1e44b52015-05-13 14:58:15 -070063 $(built_icudata_dep) \
64 $(built_icutzdata_dep) \
The Android Open Source Project64100b32009-03-03 19:31:44 -080065 $(built_layoutlib_create_jar)
Joe Onorato56d21892010-07-14 19:58:30 -070066 $(hide) echo "host layoutlib_create: $@"
67 $(hide) mkdir -p $(dir $@)
68 $(hide) rm -f $@
69 $(hide) ls -l $(built_framework_classes)
Deepanshu Gupta5ef64dd2014-07-15 13:15:15 -070070 $(hide) java -ea -jar $(built_layoutlib_create_jar) \
The Android Open Source Project64100b32009-03-03 19:31:44 -080071 $@ \
Piotr Jastrzebskif76035e2015-02-17 16:58:52 +000072 $(built_oj_classes) \
The Android Open Source Project64100b32009-03-03 19:31:44 -080073 $(built_core_classes) \
Deepanshu Gupta4df159e2013-11-13 17:22:22 +053074 $(built_framework_classes) \
Deepanshu Guptafa4c9e62014-01-16 14:16:23 -080075 $(built_ext_classes) \
Neil Fuller3027ab82016-03-01 18:46:37 +000076 $(built_icudata_dep) \
77 $(built_icutzdata_dep) \
Deepanshu Guptafa4c9e62014-01-16 14:16:23 -080078 $(built_ext_data)
Joe Onorato56d21892010-07-14 19:58:30 -070079 $(hide) ls -l $(built_framework_classes)
The Android Open Source Project64100b32009-03-03 19:31:44 -080080
81
82#
83# Include the subdir makefiles.
84#
85include $(call all-makefiles-under,$(LOCAL_PATH))