Narayan Kamath | 40dae1f | 2013-10-28 13:20:52 +0000 | [diff] [blame] | 1 | # |
| 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 Wang | 0757768 | 2015-01-26 09:52:28 -0800 | [diff] [blame] | 22 | ifeq ($(HOST_OS),linux) |
Narayan Kamath | 40dae1f | 2013-10-28 13:20:52 +0000 | [diff] [blame] | 23 | |
Yohann Roussel | d2a76c1 | 2015-02-05 16:10:58 +0100 | [diff] [blame] | 24 | LOCAL_UNINSTALLABLE_MODULE := true |
| 25 | LOCAL_IS_STATIC_JAVA_LIBRARY := true |
Narayan Kamath | 40dae1f | 2013-10-28 13:20:52 +0000 | [diff] [blame] | 26 | USE_CORE_LIB_BOOTCLASSPATH := true |
Ying Wang | c6a3017 | 2015-11-23 14:57:26 -0800 | [diff] [blame^] | 27 | LOCAL_JAVA_LIBRARIES += core-oj-hostdex core-libart-hostdex |
Narayan Kamath | 40dae1f | 2013-10-28 13:20:52 +0000 | [diff] [blame] | 28 | |
Yohann Roussel | b4c49cb | 2014-09-08 14:45:14 +0200 | [diff] [blame] | 29 | intermediates.COMMON := $(call intermediates-dir-for,JAVA_LIBRARIES,$(LOCAL_MODULE),true,COMMON,) |
| 30 | full_classes_jack := $(intermediates.COMMON)/classes.jack |
| 31 | LOCAL_INTERMEDIATE_TARGETS += \ |
| 32 | $(full_classes_jack) |
| 33 | |
Narayan Kamath | 40dae1f | 2013-10-28 13:20:52 +0000 | [diff] [blame] | 34 | include $(BUILD_SYSTEM)/host_java_library.mk |
Yohann Roussel | b4c49cb | 2014-09-08 14:45:14 +0200 | [diff] [blame] | 35 | # proguard is not supported |
| 36 | # *.proto files are not supported |
Ying Wang | 447d696 | 2015-09-01 19:12:05 -0700 | [diff] [blame] | 37 | $(full_classes_jack): PRIVATE_JACK_FLAGS := $(GLOBAL_JAVAC_DEBUG_FLAGS) $(LOCAL_JACK_FLAGS) |
Yohann Roussel | b68c9a4 | 2015-07-03 15:46:51 +0200 | [diff] [blame] | 38 | $(full_classes_jack): PRIVATE_JACK_VERSION := $(LOCAL_JACK_VERSION) |
Yohann Roussel | b4c49cb | 2014-09-08 14:45:14 +0200 | [diff] [blame] | 39 | $(full_classes_jack): PRIVATE_JARJAR_RULES := $(LOCAL_JARJAR_RULES) |
| 40 | $(full_classes_jack): \ |
Yohann Roussel | 37822c4 | 2015-01-09 10:36:40 +0100 | [diff] [blame] | 41 | PRIVATE_JACK_INTERMEDIATES_DIR := $(intermediates.COMMON)/jack-rsc |
| 42 | ifeq ($(LOCAL_JACK_ENABLED),incremental) |
| 43 | $(full_classes_jack): \ |
| 44 | PRIVATE_JACK_INCREMENTAL_DIR := $(intermediates.COMMON)/jack-incremental |
| 45 | else |
| 46 | $(full_classes_jack): \ |
| 47 | PRIVATE_JACK_INCREMENTAL_DIR := |
| 48 | endif |
Yohann Roussel | b4c49cb | 2014-09-08 14:45:14 +0200 | [diff] [blame] | 49 | $(full_classes_jack): $(java_sources) $(java_resource_sources) $(full_jack_lib_deps) \ |
Colin Cross | a4447e8 | 2015-09-28 16:26:00 -0700 | [diff] [blame] | 50 | $(jar_manifest_file) $(layers_file) $(LOCAL_MODULE_MAKEFILE_DEP) \ |
Yohann Roussel | b4c49cb | 2014-09-08 14:45:14 +0200 | [diff] [blame] | 51 | $(LOCAL_ADDITIONAL_DEPENDENCIES) $(LOCAL_JARJAR_RULES) \ |
Yohann Roussel | 23f7864 | 2015-07-02 12:10:17 +0200 | [diff] [blame] | 52 | $(JACK) |
Yohann Roussel | b4c49cb | 2014-09-08 14:45:14 +0200 | [diff] [blame] | 53 | @echo Building with Jack: $@ |
| 54 | $(java-to-jack) |
Narayan Kamath | 40dae1f | 2013-10-28 13:20:52 +0000 | [diff] [blame] | 55 | |
| 56 | USE_CORE_LIB_BOOTCLASSPATH := |
Yohann Roussel | d2a76c1 | 2015-02-05 16:10:58 +0100 | [diff] [blame] | 57 | LOCAL_IS_STATIC_JAVA_LIBRARY := |
Ying Wang | 0757768 | 2015-01-26 09:52:28 -0800 | [diff] [blame] | 58 | endif |