Android.mk revision 3c141cd9c1cfecd9352b82d9dae4d9601fabd4e6
1# Copyright (C) 2011 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15LOCAL_PATH := $(call my-dir) 16 17# A helper sub-library that makes direct use of Gingerbread APIs. 18include $(CLEAR_VARS) 19LOCAL_MODULE := android-support-compat-gingerbread 20LOCAL_SDK_VERSION := 9 21LOCAL_SRC_FILES := $(call all-java-files-under, gingerbread) 22LOCAL_STATIC_JAVA_LIBRARIES := android-support-annotations 23LOCAL_JAVA_LANGUAGE_VERSION := 1.7 24include $(BUILD_STATIC_JAVA_LIBRARY) 25 26support_module_src_files := $(LOCAL_SRC_FILES) 27support_module_java_libraries := android-support-annotations 28 29# ----------------------------------------------------------------------- 30 31# A helper sub-library that makes direct use of Honeycomb APIs. 32include $(CLEAR_VARS) 33LOCAL_MODULE := android-support-compat-honeycomb 34LOCAL_SDK_VERSION := 11 35LOCAL_SRC_FILES := $(call all-java-files-under, honeycomb) 36LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-gingerbread 37LOCAL_JAVA_LANGUAGE_VERSION := 1.7 38include $(BUILD_STATIC_JAVA_LIBRARY) 39 40support_module_src_files += $(LOCAL_SRC_FILES) 41 42# ----------------------------------------------------------------------- 43 44# A helper sub-library that makes direct use of Honeycomb MR1 APIs. 45include $(CLEAR_VARS) 46LOCAL_MODULE := android-support-compat-honeycomb-mr1 47LOCAL_SDK_VERSION := 12 48LOCAL_SRC_FILES := $(call all-java-files-under, honeycomb_mr1) 49LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-honeycomb 50LOCAL_JAVA_LANGUAGE_VERSION := 1.7 51include $(BUILD_STATIC_JAVA_LIBRARY) 52 53support_module_src_files += $(LOCAL_SRC_FILES) 54 55# ----------------------------------------------------------------------- 56 57# A helper sub-library that makes direct use of Honeycomb MR2 APIs. 58include $(CLEAR_VARS) 59LOCAL_MODULE := android-support-compat-honeycomb-mr2 60LOCAL_SDK_VERSION := 13 61LOCAL_SRC_FILES := $(call all-java-files-under, honeycomb_mr2) 62LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-honeycomb-mr1 63LOCAL_JAVA_LANGUAGE_VERSION := 1.7 64include $(BUILD_STATIC_JAVA_LIBRARY) 65 66support_module_src_files += $(LOCAL_SRC_FILES) 67 68# ----------------------------------------------------------------------- 69 70# A helper sub-library that makes direct use of Ice Cream Sandwich APIs. 71include $(CLEAR_VARS) 72LOCAL_MODULE := android-support-compat-ics 73LOCAL_SDK_VERSION := 14 74LOCAL_SRC_FILES := $(call all-java-files-under, ics) 75LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-honeycomb-mr2 76LOCAL_JAVA_LANGUAGE_VERSION := 1.7 77include $(BUILD_STATIC_JAVA_LIBRARY) 78 79support_module_src_files += $(LOCAL_SRC_FILES) 80 81# ----------------------------------------------------------------------- 82 83# A helper sub-library that makes direct use of Ice Cream Sandwich MR1 APIs. 84include $(CLEAR_VARS) 85LOCAL_MODULE := android-support-compat-ics-mr1 86LOCAL_SDK_VERSION := 15 87LOCAL_SRC_FILES := $(call all-java-files-under, ics-mr1) 88LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-ics 89LOCAL_JAVA_LANGUAGE_VERSION := 1.7 90include $(BUILD_STATIC_JAVA_LIBRARY) 91 92support_module_src_files += $(LOCAL_SRC_FILES) 93 94# ----------------------------------------------------------------------- 95 96# A helper sub-library that makes direct use of JellyBean APIs. 97include $(CLEAR_VARS) 98LOCAL_MODULE := android-support-compat-jellybean 99LOCAL_SDK_VERSION := 16 100LOCAL_SRC_FILES := $(call all-java-files-under, jellybean) 101LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-ics-mr1 102LOCAL_JAVA_LANGUAGE_VERSION := 1.7 103include $(BUILD_STATIC_JAVA_LIBRARY) 104 105support_module_src_files += $(LOCAL_SRC_FILES) 106 107# ----------------------------------------------------------------------- 108 109# A helper sub-library that makes direct use of JellyBean MR1 APIs. 110include $(CLEAR_VARS) 111LOCAL_MODULE := android-support-compat-jellybean-mr1 112LOCAL_SDK_VERSION := 17 113LOCAL_SRC_FILES := $(call all-java-files-under, jellybean-mr1) 114LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-jellybean 115LOCAL_JAVA_LANGUAGE_VERSION := 1.7 116include $(BUILD_STATIC_JAVA_LIBRARY) 117 118support_module_src_files += $(LOCAL_SRC_FILES) 119 120# ----------------------------------------------------------------------- 121 122# A helper sub-library that makes direct use of JellyBean MR2 APIs. 123include $(CLEAR_VARS) 124LOCAL_MODULE := android-support-compat-jellybean-mr2 125LOCAL_SDK_VERSION := 18 126LOCAL_SRC_FILES := $(call all-java-files-under, jellybean-mr2) 127LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-jellybean-mr1 128LOCAL_JAVA_LANGUAGE_VERSION := 1.7 129include $(BUILD_STATIC_JAVA_LIBRARY) 130 131support_module_src_files += $(LOCAL_SRC_FILES) 132 133# ----------------------------------------------------------------------- 134 135# A helper sub-library that makes direct use of KitKat APIs. 136include $(CLEAR_VARS) 137LOCAL_MODULE := android-support-compat-kitkat 138LOCAL_SDK_VERSION := 19 139LOCAL_SRC_FILES := $(call all-java-files-under, kitkat) 140LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-jellybean-mr2 141LOCAL_JAVA_LANGUAGE_VERSION := 1.7 142include $(BUILD_STATIC_JAVA_LIBRARY) 143 144support_module_src_files += $(LOCAL_SRC_FILES) 145 146# ----------------------------------------------------------------------- 147 148# A helper sub-library that makes direct use of V20 APIs. 149include $(CLEAR_VARS) 150LOCAL_MODULE := android-support-compat-api20 151LOCAL_SDK_VERSION := 20 152LOCAL_SRC_FILES := $(call all-java-files-under, api20) 153LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-kitkat 154LOCAL_JAVA_LANGUAGE_VERSION := 1.7 155include $(BUILD_STATIC_JAVA_LIBRARY) 156 157support_module_src_files += $(LOCAL_SRC_FILES) 158 159# ----------------------------------------------------------------------- 160 161# A helper sub-library that makes direct use of Lollipop APIs. 162include $(CLEAR_VARS) 163LOCAL_MODULE := android-support-compat-api21 164LOCAL_SDK_VERSION := 21 165LOCAL_SRC_FILES := $(call all-java-files-under, api21) 166LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-api20 167LOCAL_JAVA_LANGUAGE_VERSION := 1.7 168include $(BUILD_STATIC_JAVA_LIBRARY) 169 170support_module_src_files += $(LOCAL_SRC_FILES) 171 172# ----------------------------------------------------------------------- 173 174# A helper sub-library that makes direct use of V22 APIs. 175include $(CLEAR_VARS) 176LOCAL_MODULE := android-support-compat-api22 177LOCAL_SDK_VERSION := 22 178LOCAL_SRC_FILES := $(call all-java-files-under, api22) 179LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-api21 180LOCAL_JAVA_LANGUAGE_VERSION := 1.7 181include $(BUILD_STATIC_JAVA_LIBRARY) 182 183support_module_src_files += $(LOCAL_SRC_FILES) 184 185# ----------------------------------------------------------------------- 186 187# A helper sub-library that makes direct use of V23 APIs. 188include $(CLEAR_VARS) 189LOCAL_MODULE := android-support-compat-api23 190LOCAL_SDK_VERSION := 23 191LOCAL_SRC_FILES := $(call all-java-files-under, api23) 192LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-api22 193LOCAL_JAVA_LANGUAGE_VERSION := 1.7 194include $(BUILD_STATIC_JAVA_LIBRARY) 195 196support_module_src_files += $(LOCAL_SRC_FILES) 197 198# ----------------------------------------------------------------------- 199 200# A helper sub-library that makes direct use of V24 APIs. 201include $(CLEAR_VARS) 202LOCAL_MODULE := android-support-compat-api24 203LOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION) 204LOCAL_SRC_FILES := $(call all-java-files-under, api24) 205LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-api23 206LOCAL_JAVA_LANGUAGE_VERSION := 1.7 207include $(BUILD_STATIC_JAVA_LIBRARY) 208 209support_module_src_files += $(LOCAL_SRC_FILES) 210 211# ----------------------------------------------------------------------- 212 213# Here is the final static library that apps can link against. 214include $(CLEAR_VARS) 215LOCAL_USE_AAPT2 := true 216LOCAL_MODULE := android-support-compat 217LOCAL_SDK_VERSION := 9 218LOCAL_AIDL_INCLUDES := frameworks/support/compat/java 219LOCAL_SRC_FILES := $(call all-java-files-under, java) \ 220 $(call all-Iaidl-files-under, java) 221LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res 222LOCAL_STATIC_JAVA_LIBRARIES += android-support-compat-api24 223LOCAL_JAR_EXCLUDE_FILES := none 224LOCAL_JAVA_LANGUAGE_VERSION := 1.7 225include $(BUILD_STATIC_JAVA_LIBRARY) 226 227support_module_src_files += $(LOCAL_SRC_FILES) 228support_module_aidl_includes := $(LOCAL_AIDL_INCLUDES) 229 230# API Check 231# --------------------------------------------- 232support_module := $(LOCAL_MODULE) 233support_module_api_dir := $(LOCAL_PATH)/api 234support_module_java_packages := android.support.v4.* 235include $(SUPPORT_API_CHECK) 236