blob: 53bfc1581e53ffbbb87442b8deb5fa876aa0b9bb [file] [log] [blame]
The Android Open Source Project9066cfe2009-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
Deepanshu Guptaf4058c82014-06-07 11:19:03 -070019LOCAL_JAVACFLAGS := -source 6 -target 6
20
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080021#
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.
Ying Wang88e19902014-07-21 14:40:42 -070030built_framework_dep := $(call java-lib-deps,framework)
31built_framework_classes := $(call java-lib-files,framework)
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080032
Piotr Jastrzebskicfa292e2015-02-17 16:58:52 +000033built_oj_dep := $(call java-lib-deps,core-oj)
34built_oj_classes := $(call java-lib-files,core-oj)
35
Brian Carlstromdbcae5c2014-06-18 15:11:01 -070036built_core_dep := $(call java-lib-deps,core-libart)
37built_core_classes := $(call java-lib-files,core-libart)
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080038
Deepanshu Gupta1f92d7f2013-11-13 17:22:22 +053039built_ext_dep := $(call java-lib-deps,ext)
40built_ext_classes := $(call java-lib-files,ext)
Deepanshu Gupta58037a442014-01-16 14:16:23 -080041built_ext_data := $(call intermediates-dir-for, \
42 JAVA_LIBRARIES,ext,,COMMON)/javalib.jar
Deepanshu Guptaeca05692015-05-13 14:58:15 -070043built_icudata_dep := $(call java-lib-deps,icu4j-icudata-jarjar)
Deepanshu Gupta4ebbfd72015-05-13 22:18:37 -070044built_icudata_data := $(call java-lib-files,icu4j-icudata-jarjar)
Deepanshu Guptaeca05692015-05-13 14:58:15 -070045built_icutzdata_dep := $(call java-lib-deps,icu4j-icutzdata-jarjar)
Deepanshu Gupta4ebbfd72015-05-13 22:18:37 -070046built_icutzdata_data := $(call java-lib-files,icu4j-icutzdata-jarjar)
Deepanshu Gupta1f92d7f2013-11-13 17:22:22 +053047
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080048built_layoutlib_create_jar := $(call intermediates-dir-for, \
49 JAVA_LIBRARIES,layoutlib_create,HOST)/javalib.jar
50
51# This is mostly a copy of config/host_java_library.mk
52LOCAL_MODULE := temp_layoutlib
53LOCAL_MODULE_CLASS := JAVA_LIBRARIES
54LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
55LOCAL_IS_HOST_MODULE := true
56LOCAL_BUILT_MODULE_STEM := javalib.jar
57
58#######################################
59include $(BUILD_SYSTEM)/base_rules.mk
60#######################################
61
Piotr Jastrzebskicfa292e2015-02-17 16:58:52 +000062$(LOCAL_BUILT_MODULE): $(built_oj_dep) \
63 $(built_core_dep) \
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080064 $(built_framework_dep) \
Deepanshu Gupta1f92d7f2013-11-13 17:22:22 +053065 $(built_ext_dep) \
Deepanshu Gupta411b96912014-03-31 16:11:13 -070066 $(built_ext_data) \
Deepanshu Guptaeca05692015-05-13 14:58:15 -070067 $(built_icudata_dep) \
68 $(built_icutzdata_dep) \
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080069 $(built_layoutlib_create_jar)
Joe Onorato80a60ba2010-07-14 19:58:30 -070070 $(hide) echo "host layoutlib_create: $@"
71 $(hide) mkdir -p $(dir $@)
72 $(hide) rm -f $@
73 $(hide) ls -l $(built_framework_classes)
Deepanshu Gupta197d4882014-07-15 13:15:15 -070074 $(hide) java -ea -jar $(built_layoutlib_create_jar) \
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080075 $@ \
Piotr Jastrzebskicfa292e2015-02-17 16:58:52 +000076 $(built_oj_classes) \
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080077 $(built_core_classes) \
Deepanshu Gupta1f92d7f2013-11-13 17:22:22 +053078 $(built_framework_classes) \
Deepanshu Gupta58037a442014-01-16 14:16:23 -080079 $(built_ext_classes) \
Deepanshu Guptaeca05692015-05-13 14:58:15 -070080 $(built_icudata_data) \
81 $(built_icutzdata_data) \
Deepanshu Gupta58037a442014-01-16 14:16:23 -080082 $(built_ext_data)
Joe Onorato80a60ba2010-07-14 19:58:30 -070083 $(hide) ls -l $(built_framework_classes)
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080084
85
86#
87# Include the subdir makefiles.
88#
89include $(call all-makefiles-under,$(LOCAL_PATH))