blob: 90bcc12df017709186e994dea4e248f2ba23aadb [file] [log] [blame]
Narayan Kamath40dae1f2013-10-28 13:20:52 +00001#
2# Copyright (C) 2013 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
17#
18# Rules for building a host dalvik static java library.
19# These libraries will be compiled against libcore and not the host
20# JRE.
21#
Ying Wang07577682015-01-26 09:52:28 -080022ifeq ($(HOST_OS),linux)
Narayan Kamath40dae1f2013-10-28 13:20:52 +000023
Yohann Rousself09e59e2014-09-08 14:45:14 +020024LOCAL_UNINSTALLABLE_MODULE := true
25LOCAL_IS_STATIC_JAVA_LIBRARY := true
Narayan Kamath40dae1f2013-10-28 13:20:52 +000026USE_CORE_LIB_BOOTCLASSPATH := true
Brian Carlstromb1dafb12014-06-18 15:11:01 -070027LOCAL_JAVA_LIBRARIES += core-libart-hostdex
Narayan Kamath40dae1f2013-10-28 13:20:52 +000028
Yohann Rousself09e59e2014-09-08 14:45:14 +020029intermediates.COMMON := $(call intermediates-dir-for,JAVA_LIBRARIES,$(LOCAL_MODULE),true,COMMON,)
30full_classes_jack := $(intermediates.COMMON)/classes.jack
31LOCAL_INTERMEDIATE_TARGETS += \
32 $(full_classes_jack)
33
Narayan Kamath40dae1f2013-10-28 13:20:52 +000034include $(BUILD_SYSTEM)/host_java_library.mk
Yohann Rousself09e59e2014-09-08 14:45:14 +020035# proguard is not supported
36# *.proto files are not supported
37$(full_classes_jack): PRIVATE_JACK_FLAGS := $(LOCAL_JACK_FLAGS)
38$(full_classes_jack): PRIVATE_JARJAR_RULES := $(LOCAL_JARJAR_RULES)
39$(full_classes_jack): \
40 PRIVATE_JACK_INTERMEDIATES_DIR := $(intermediates.COMMON)/jack-rsc
41ifeq ($(LOCAL_JACK_ENABLED),incremental)
42$(full_classes_jack): \
43 PRIVATE_JACK_INCREMENTAL_DIR := $(intermediates.COMMON)/jack-incremental
44else
45$(full_classes_jack): \
46 PRIVATE_JACK_INCREMENTAL_DIR :=
47endif
48$(full_classes_jack): $(java_sources) $(java_resource_sources) $(full_jack_lib_deps) \
49 $(jar_manifest_file) $(layers_file) $(LOCAL_MODULE_MAKEFILE) \
50 $(LOCAL_ADDITIONAL_DEPENDENCIES) $(LOCAL_JARJAR_RULES) \
51 $(JACK_JAR) $(JACK_LAUNCHER_JAR)
52 @echo Building with Jack: $@
53 $(java-to-jack)
Narayan Kamath40dae1f2013-10-28 13:20:52 +000054
55USE_CORE_LIB_BOOTCLASSPATH :=
Yohann Rousself09e59e2014-09-08 14:45:14 +020056LOCAL_IS_STATIC_JAVA_LIBRARY :=
Ying Wang07577682015-01-26 09:52:28 -080057endif