The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 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 := $(my-dir) |
| 17 | include $(CLEAR_VARS) |
| 18 | |
Deepanshu Gupta | f4058c8 | 2014-06-07 11:19:03 -0700 | [diff] [blame] | 19 | LOCAL_JAVACFLAGS := -source 6 -target 6 |
| 20 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 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. |
Jeff Brown | b9ff713 | 2013-07-18 16:37:44 -0700 | [diff] [blame] | 30 | built_framework_dep := $(call java-lib-deps,framework-base) |
| 31 | built_framework_classes := $(call java-lib-files,framework-base) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 32 | |
Brian Carlstrom | dbcae5c | 2014-06-18 15:11:01 -0700 | [diff] [blame] | 33 | built_core_dep := $(call java-lib-deps,core-libart) |
| 34 | built_core_classes := $(call java-lib-files,core-libart) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 35 | |
Deepanshu Gupta | 1f92d7f | 2013-11-13 17:22:22 +0530 | [diff] [blame] | 36 | built_ext_dep := $(call java-lib-deps,ext) |
| 37 | built_ext_classes := $(call java-lib-files,ext) |
Deepanshu Gupta | 58037a4 | 2014-01-16 14:16:23 -0800 | [diff] [blame] | 38 | built_ext_data := $(call intermediates-dir-for, \ |
| 39 | JAVA_LIBRARIES,ext,,COMMON)/javalib.jar |
Deepanshu Gupta | 1f92d7f | 2013-11-13 17:22:22 +0530 | [diff] [blame] | 40 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 41 | built_layoutlib_create_jar := $(call intermediates-dir-for, \ |
| 42 | JAVA_LIBRARIES,layoutlib_create,HOST)/javalib.jar |
| 43 | |
| 44 | # This is mostly a copy of config/host_java_library.mk |
| 45 | LOCAL_MODULE := temp_layoutlib |
| 46 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 47 | LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX) |
| 48 | LOCAL_IS_HOST_MODULE := true |
| 49 | LOCAL_BUILT_MODULE_STEM := javalib.jar |
| 50 | |
| 51 | ####################################### |
| 52 | include $(BUILD_SYSTEM)/base_rules.mk |
| 53 | ####################################### |
| 54 | |
| 55 | $(LOCAL_BUILT_MODULE): $(built_core_dep) \ |
| 56 | $(built_framework_dep) \ |
Deepanshu Gupta | 1f92d7f | 2013-11-13 17:22:22 +0530 | [diff] [blame] | 57 | $(built_ext_dep) \ |
Deepanshu Gupta | 411b9691 | 2014-03-31 16:11:13 -0700 | [diff] [blame] | 58 | $(built_ext_data) \ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 59 | $(built_layoutlib_create_jar) |
Joe Onorato | 80a60ba | 2010-07-14 19:58:30 -0700 | [diff] [blame] | 60 | $(hide) echo "host layoutlib_create: $@" |
| 61 | $(hide) mkdir -p $(dir $@) |
| 62 | $(hide) rm -f $@ |
| 63 | $(hide) ls -l $(built_framework_classes) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 64 | $(hide) java -jar $(built_layoutlib_create_jar) \ |
| 65 | $@ \ |
| 66 | $(built_core_classes) \ |
Deepanshu Gupta | 1f92d7f | 2013-11-13 17:22:22 +0530 | [diff] [blame] | 67 | $(built_framework_classes) \ |
Deepanshu Gupta | 58037a4 | 2014-01-16 14:16:23 -0800 | [diff] [blame] | 68 | $(built_ext_classes) \ |
| 69 | $(built_ext_data) |
Joe Onorato | 80a60ba | 2010-07-14 19:58:30 -0700 | [diff] [blame] | 70 | $(hide) ls -l $(built_framework_classes) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 71 | |
| 72 | |
| 73 | # |
| 74 | # Include the subdir makefiles. |
| 75 | # |
| 76 | include $(call all-makefiles-under,$(LOCAL_PATH)) |