1#
2# Include this make file to build your application against this module.
3#
4# Make sure to include it after you've set all your desired LOCAL variables.
5# Note that you must explicitly set your LOCAL_RESOURCE_DIR before including this file.
6#
7# For example:
8#
9#   LOCAL_RESOURCE_DIR := \
10#        $(LOCAL_PATH)/res
11#
12#   include frameworks/opt/setupwizard/library/common-eclair-mr1.mk
13#
14
15# Check that LOCAL_RESOURCE_DIR is defined
16ifeq (,$(LOCAL_RESOURCE_DIR))
17$(error LOCAL_RESOURCE_DIR must be defined)
18endif
19
20# Add --auto-add-overlay flag if not present
21ifeq (,$(findstring --auto-add-overlay, $(LOCAL_AAPT_FLAGS)))
22LOCAL_AAPT_FLAGS += --auto-add-overlay
23endif
24
25# Include setup wizard library, if not already included
26ifeq (,$(findstring setup-wizard-lib-full-support,$(LOCAL_STATIC_JAVA_LIBRARIES)))
27LOCAL_RESOURCE_DIR += \
28    $(call my-dir)/main/res \
29    $(call my-dir)/eclair-mr1/res \
30    $(call my-dir)/full-support/res
31LOCAL_AAPT_FLAGS += --extra-packages com.android.setupwizardlib
32LOCAL_STATIC_JAVA_LIBRARIES += setup-wizard-lib-full-support
33endif
34
35## Include transitive dependencies below
36
37# Include support-v7-appcompat, if not already included
38ifeq (,$(findstring android-support-v7-appcompat,$(LOCAL_STATIC_JAVA_LIBRARIES)))
39LOCAL_RESOURCE_DIR += frameworks/support/v7/appcompat/res
40LOCAL_AAPT_FLAGS += --extra-packages android.support.v7.appcompat
41LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-appcompat
42endif
43
44# Include support-v7-recyclerview, if not already included
45ifeq (,$(findstring android-support-v7-recyclerview,$(LOCAL_STATIC_JAVA_LIBRARIES)))
46LOCAL_RESOURCE_DIR += frameworks/support/v7/recyclerview/res
47LOCAL_AAPT_FLAGS += --extra-packages android.support.v7.recyclerview
48LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-recyclerview
49endif
50