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 dx script 13# ============================================================ 14include $(CLEAR_VARS) 15LOCAL_IS_HOST_MODULE := true 16LOCAL_MODULE_CLASS := EXECUTABLES 17LOCAL_MODULE_TAGS := optional 18LOCAL_MODULE := dx 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/dx | $(ACP) 24 @echo "Copy: $(PRIVATE_MODULE) ($@)" 25 $(copy-file-to-new-target) 26 $(hide) chmod 755 $@ 27 28INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE) 29 30# the mainDexClasses rules 31# ============================================================ 32include $(CLEAR_VARS) 33LOCAL_IS_HOST_MODULE := true 34LOCAL_MODULE_CLASS := EXECUTABLES 35LOCAL_MODULE_TAGS := optional 36LOCAL_MODULE := mainDexClasses.rules 37 38include $(BUILD_SYSTEM)/base_rules.mk 39 40$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/dx$(COMMON_JAVA_PACKAGE_SUFFIX) 41$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/mainDexClasses.rules | $(ACP) 42 @echo "Copy: $(PRIVATE_MODULE) ($@)" 43 $(copy-file-to-new-target) 44 45INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE) 46 47installed_mainDexClasses.rules := $(LOCAL_INSTALLED_MODULE) 48 49# the shrinkedAndroid jar is a library used by the mainDexClasses script 50# ============================================================ 51include $(CLEAR_VARS) 52LOCAL_IS_HOST_MODULE := true 53LOCAL_MODULE_CLASS := JAVA_LIBRARIES 54LOCAL_MODULE_TAGS := optional 55LOCAL_MODULE := shrinkedAndroid 56LOCAL_BUILT_MODULE_STEM := shrinkedAndroid.jar 57LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX) 58 59include $(BUILD_SYSTEM)/base_rules.mk 60 61$(LOCAL_BUILT_MODULE): PRIVATE_PROGUARD_FLAGS:= \ 62 -include $(addprefix $(LOCAL_PATH)/, shrinkedAndroid.proguard.flags) 63$(LOCAL_BUILT_MODULE): $(call java-lib-files,android_stubs_current) \ 64 $(addprefix $(LOCAL_PATH)/, shrinkedAndroid.proguard.flags)| $(PROGUARD) 65 @echo Proguard: $@ 66 $(hide) $(PROGUARD) -injars "$<(**/*.class)" -outjars $@ $(PRIVATE_PROGUARD_FLAGS) 67 68INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE) 69 70installed_shrinkedAndroid := $(LOCAL_INSTALLED_MODULE) 71 72# the mainDexClasses script 73# ============================================================ 74include $(CLEAR_VARS) 75LOCAL_IS_HOST_MODULE := true 76LOCAL_MODULE_CLASS := EXECUTABLES 77LOCAL_MODULE_TAGS := optional 78LOCAL_MODULE := mainDexClasses 79 80include $(BUILD_SYSTEM)/base_rules.mk 81 82$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/dx$(COMMON_JAVA_PACKAGE_SUFFIX) 83$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/mainDexClasses | $(ACP) 84 @echo "Copy: $(PRIVATE_MODULE) ($@)" 85 $(copy-file-to-new-target) 86 $(hide) chmod 755 $@ 87 88$(LOCAL_INSTALLED_MODULE): | $(installed_shrinkedAndroid) $(installed_mainDexClasses.rules) 89INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE) 90 91endif # No TARGET_BUILD_APPS or TARGET_BUILD_PDK 92 93# the dexmerger script 94# ============================================================ 95include $(CLEAR_VARS) 96LOCAL_IS_HOST_MODULE := true 97LOCAL_MODULE_CLASS := EXECUTABLES 98LOCAL_MODULE_TAGS := optional 99LOCAL_MODULE := dexmerger 100 101include $(BUILD_SYSTEM)/base_rules.mk 102 103$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/dx$(COMMON_JAVA_PACKAGE_SUFFIX) 104$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/dexmerger | $(ACP) 105 @echo "Copy: $(PRIVATE_MODULE) ($@)" 106 $(copy-file-to-new-target) 107 $(hide) chmod 755 $@ 108 109INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE) 110 111# the jasmin script 112# ============================================================ 113include $(CLEAR_VARS) 114LOCAL_IS_HOST_MODULE := true 115LOCAL_MODULE_CLASS := EXECUTABLES 116LOCAL_MODULE_TAGS := optional 117LOCAL_MODULE := jasmin 118 119include $(BUILD_SYSTEM)/base_rules.mk 120 121$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/jasmin.jar 122$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/jasmin | $(ACP) 123 @echo "Copy: $(PRIVATE_MODULE) ($@)" 124 $(copy-file-to-new-target) 125 $(hide) chmod 755 $@ 126 127INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE) 128 129# the jasmin lib 130# ============================================================ 131include $(CLEAR_VARS) 132LOCAL_IS_HOST_MODULE := true 133LOCAL_MODULE_CLASS := JAVA_LIBRARIES 134LOCAL_MODULE_TAGS := optional 135LOCAL_MODULE := jasmin.jar 136 137include $(BUILD_SYSTEM)/base_rules.mk 138 139$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/jasmin.jar | $(ACP) 140 @echo "Copy: $(PRIVATE_MODULE) ($@)" 141 $(copy-file-to-target) 142 $(hide) chmod 644 $@ 143 144INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE) 145 146# the other stuff 147# ============================================================ 148subdirs := $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, \ 149 junit-tests \ 150 src \ 151 )) 152 153include $(subdirs) 154