Android.mk revision 4df159e90b72b894adc70add1f4e4704e5601fe8
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# 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. 28built_framework_dep := $(call java-lib-deps,framework-base) 29built_framework_classes := $(call java-lib-files,framework-base) 30 31built_core_dep := $(call java-lib-deps,core) 32built_core_classes := $(call java-lib-files,core) 33 34built_ext_dep := $(call java-lib-deps,ext) 35built_ext_classes := $(call java-lib-files,ext) 36 37built_layoutlib_create_jar := $(call intermediates-dir-for, \ 38 JAVA_LIBRARIES,layoutlib_create,HOST)/javalib.jar 39 40# This is mostly a copy of config/host_java_library.mk 41LOCAL_MODULE := temp_layoutlib 42LOCAL_MODULE_CLASS := JAVA_LIBRARIES 43LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX) 44LOCAL_IS_HOST_MODULE := true 45LOCAL_BUILT_MODULE_STEM := javalib.jar 46 47####################################### 48include $(BUILD_SYSTEM)/base_rules.mk 49####################################### 50 51$(LOCAL_BUILT_MODULE): $(built_core_dep) \ 52 $(built_framework_dep) \ 53 $(built_ext_dep) \ 54 $(built_layoutlib_create_jar) 55 $(hide) echo "host layoutlib_create: $@" 56 $(hide) mkdir -p $(dir $@) 57 $(hide) rm -f $@ 58 $(hide) ls -l $(built_framework_classes) 59 $(hide) java -jar $(built_layoutlib_create_jar) \ 60 $@ \ 61 $(built_core_classes) \ 62 $(built_framework_classes) \ 63 $(built_ext_classes) 64 $(hide) ls -l $(built_framework_classes) 65 66 67# 68# Include the subdir makefiles. 69# 70include $(call all-makefiles-under,$(LOCAL_PATH)) 71