1# Copyright 2006 The Android Open Source Project 2# 3LOCAL_PATH := $(call my-dir) 4 5# We use copy-file-to-new-target so that the installed 6# script files' timestamps are at least as new as the 7# .jar files they wrap. 8 9# This tool is prebuilt if we're doing an app-only build. 10ifeq ($(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK)),) 11 12# the mainDexClasses rules 13# ============================================================ 14include $(CLEAR_VARS) 15LOCAL_IS_HOST_MODULE := true 16LOCAL_MODULE_CLASS := EXECUTABLES 17LOCAL_MODULE_TAGS := optional 18LOCAL_MODULE := mainDexClasses.rules 19 20include $(BUILD_SYSTEM)/base_rules.mk 21 22$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/dx$(COMMON_JAVA_PACKAGE_SUFFIX) 23$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/mainDexClasses.rules | $(ACP) 24 @echo "Copy: $(PRIVATE_MODULE) ($@)" 25 $(copy-file-to-new-target) 26 27INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE) 28 29installed_mainDexClasses.rules := $(LOCAL_INSTALLED_MODULE) 30 31# the mainDexClassesNoAapt rules 32# ============================================================ 33include $(CLEAR_VARS) 34LOCAL_IS_HOST_MODULE := true 35LOCAL_MODULE_CLASS := EXECUTABLES 36LOCAL_MODULE_TAGS := optional 37LOCAL_MODULE := mainDexClassesNoAapt.rules 38 39include $(BUILD_SYSTEM)/base_rules.mk 40 41$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/dx$(COMMON_JAVA_PACKAGE_SUFFIX) 42$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/mainDexClassesNoAapt.rules | $(ACP) 43 @echo "Copy: $(PRIVATE_MODULE) ($@)" 44 $(copy-file-to-new-target) 45 46INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE) 47 48installed_mainDexClassesNoAapt.rules := $(LOCAL_INSTALLED_MODULE) 49 50# the shrinkedAndroid jar is a library used by the mainDexClasses script 51# ============================================================ 52include $(CLEAR_VARS) 53LOCAL_IS_HOST_MODULE := true 54LOCAL_MODULE_CLASS := JAVA_LIBRARIES 55LOCAL_MODULE_TAGS := optional 56LOCAL_MODULE := shrinkedAndroid 57LOCAL_BUILT_MODULE_STEM := shrinkedAndroid.jar 58LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX) 59 60include $(BUILD_SYSTEM)/base_rules.mk 61 62$(LOCAL_BUILT_MODULE): PRIVATE_PROGUARD_FLAGS:= \ 63 -include $(addprefix $(LOCAL_PATH)/, shrinkedAndroid.proguard.flags) 64$(LOCAL_BUILT_MODULE): $(call java-lib-files,$(call resolve-prebuilt-sdk-module,20)) \ 65 $(addprefix $(LOCAL_PATH)/, shrinkedAndroid.proguard.flags)| $(PROGUARD) 66 @echo Proguard: $@ 67 $(hide) $(PROGUARD) -injars "$<(**/*.class)" -outjars $@ $(PRIVATE_PROGUARD_FLAGS) 68 69INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE) 70 71installed_shrinkedAndroid := $(LOCAL_INSTALLED_MODULE) 72 73# the mainDexClasses script 74# ============================================================ 75include $(CLEAR_VARS) 76LOCAL_IS_HOST_MODULE := true 77LOCAL_MODULE_CLASS := EXECUTABLES 78LOCAL_MODULE_TAGS := optional 79LOCAL_MODULE := mainDexClasses 80 81include $(BUILD_SYSTEM)/base_rules.mk 82 83$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/dx$(COMMON_JAVA_PACKAGE_SUFFIX) 84$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/mainDexClasses | $(ACP) 85 @echo "Copy: $(PRIVATE_MODULE) ($@)" 86 $(copy-file-to-new-target) 87 $(hide) chmod 755 $@ 88 89$(LOCAL_INSTALLED_MODULE): | $(installed_shrinkedAndroid) $(installed_mainDexClasses.rules) \ 90 $(installed_mainDexClassesNoAapt.rules) 91INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE) 92 93endif # No TARGET_BUILD_APPS or TARGET_BUILD_PDK 94 95# the jasmin script 96# ============================================================ 97include $(CLEAR_VARS) 98LOCAL_IS_HOST_MODULE := true 99LOCAL_MODULE_CLASS := EXECUTABLES 100LOCAL_MODULE_TAGS := optional 101LOCAL_MODULE := jasmin 102 103include $(BUILD_SYSTEM)/base_rules.mk 104 105$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/jasmin.jar 106$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/jasmin | $(ACP) 107 @echo "Copy: $(PRIVATE_MODULE) ($@)" 108 $(copy-file-to-new-target) 109 $(hide) chmod 755 $@ 110 111INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE) 112 113# the jasmin lib 114# ============================================================ 115include $(CLEAR_VARS) 116LOCAL_IS_HOST_MODULE := true 117LOCAL_MODULE_CLASS := JAVA_LIBRARIES 118LOCAL_MODULE_TAGS := optional 119LOCAL_MODULE := jasmin.jar 120 121include $(BUILD_SYSTEM)/base_rules.mk 122 123$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/jasmin.jar | $(ACP) 124 @echo "Copy: $(PRIVATE_MODULE) ($@)" 125 $(copy-file-to-target) 126 $(hide) chmod 644 $@ 127 128INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE) 129 130 131