platform_build/core/host_java_library.mk
Ying Wang 6d76cad5fe resolved conflicts for merge of 31d4f53b to master
Change-Id: I87eff140bf68908d009e45687aff26f447a9b9b4
2010-09-10 17:38:54 -07:00

54 lines
1.9 KiB
Makefile

#
# Copyright (C) 2008 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Standard rules for building a host java library.
#
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
LOCAL_IS_HOST_MODULE := true
LOCAL_BUILT_MODULE_STEM := javalib.jar
include $(BUILD_SYSTEM)/base_rules.mk
ifeq ($(LOCAL_BUILD_HOST_DEX),true)
full_classes_jar := $(intermediates.COMMON)/classes.jar
built_dex := $(intermediates.COMMON)/classes.dex
$(full_classes_jar): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS)
$(full_classes_jar): $(java_sources) $(java_resource_sources) $(full_java_lib_deps)
$(transform-host-java-to-package)
$(built_dex): PRIVATE_INTERMEDIATES_DIR := $(intermediates.COMMON)
$(built_dex): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS)
$(built_dex): $(full_classes_jar) $(DX)
$(transform-classes.jar-to-dex)
$(LOCAL_BUILT_MODULE): PRIVATE_DEX_FILE := $(built_dex)
$(LOCAL_BUILT_MODULE): $(built_dex) $(java_resource_sources) | $(AAPT)
@echo "Host Jar: $(PRIVATE_MODULE) ($@)"
$(create-empty-package)
$(add-dex-to-package)
ifneq ($(extra_jar_args),)
$(add-java-resources-to-package)
endif
else
$(LOCAL_BUILT_MODULE): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS)
$(LOCAL_BUILT_MODULE): $(java_sources) $(java_resource_sources) $(full_java_lib_deps) $(jar_manifest_file)
$(transform-host-java-to-package)
endif # LOCAL_BUILD_HOST_DEX