1# Copyright (C) 2012 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 18# Build libphotoviewer linking non-statically against the libraries it needs. 19# This is to allow the library to be loaded dynamically in a context where 20# the required libraries already exist. You should only use this library 21# if you're certain that you need it; see go/extradex-design for more context. 22appcompat_res_dirs := appcompat/res res ../../../prebuilts/sdk/current/support/v7/appcompat/res 23 24include $(CLEAR_VARS) 25LOCAL_MODULE := libphotoviewer_appcompat_dynamic 26 27LOCAL_JAVA_LIBRARIES := android-support-v4 \ 28 android-support-v7-appcompat 29 30LOCAL_SDK_VERSION := current 31LOCAL_SRC_FILES := \ 32 $(call all-java-files-under, src) \ 33 $(call all-java-files-under, appcompat/src) \ 34 $(call all-logtags-files-under, src) 35 36LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(appcompat_res_dirs)) 37LOCAL_AAPT_FLAGS := --auto-add-overlay 38 39include $(BUILD_STATIC_JAVA_LIBRARY) 40 41# Dynamic version of non-appcompat library 42# You should only use this library if you're certain that you need it; see 43# go/extradex-design for more context. 44include $(CLEAR_VARS) 45 46activity_res_dirs := activity/res res 47LOCAL_MODULE := libphotoviewer_dynamic 48 49LOCAL_JAVA_LIBRARIES := android-support-v4 50 51LOCAL_SDK_VERSION := current 52LOCAL_SRC_FILES := \ 53 $(call all-java-files-under, src) \ 54 $(call all-java-files-under, activity/src) \ 55 $(call all-logtags-files-under, src) 56 57LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(activity_res_dirs)) 58LOCAL_AAPT_FLAGS := --auto-add-overlay 59 60include $(BUILD_STATIC_JAVA_LIBRARY) 61 62 63# Build the regular static libraries based on the above. 64include $(CLEAR_VARS) 65 66activity_res_dirs := activity/res res 67LOCAL_MODULE := libphotoviewer_appcompat 68 69LOCAL_STATIC_JAVA_LIBRARIES := libphotoviewer_appcompat_dynamic \ 70 android-support-v4 android-support-v7-appcompat 71 72LOCAL_SDK_VERSION := current 73LOCAL_SOURCE_FILES_ALL_GENERATED := true 74 75LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(appcompat_res_dirs)) 76LOCAL_AAPT_FLAGS := --auto-add-overlay 77 78include $(BUILD_STATIC_JAVA_LIBRARY) 79 80 81include $(CLEAR_VARS) 82 83activity_res_dirs := activity/res res 84LOCAL_MODULE := libphotoviewer 85 86LOCAL_STATIC_JAVA_LIBRARIES := libphotoviewer_dynamic android-support-v4 87 88LOCAL_SDK_VERSION := current 89LOCAL_SOURCE_FILES_ALL_GENERATED := true 90 91LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(activity_res_dirs)) 92LOCAL_AAPT_FLAGS := --auto-add-overlay 93 94include $(BUILD_STATIC_JAVA_LIBRARY) 95 96 97 98################################################## 99# Build all sub-directories 100 101include $(call all-makefiles-under,$(LOCAL_PATH)) 102