• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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-gingerbread.mk
13#
14
15# Path to directory of setup wizard lib (e.g. frameworks/opt/setupwizard/library)
16suwlib_dir := $(dir $(lastword $(MAKEFILE_LIST)))
17
18ifneq ($(LOCAL_USE_AAPT2),true)
19
20# Check that LOCAL_RESOURCE_DIR is defined
21ifeq (,$(LOCAL_RESOURCE_DIR))
22$(error LOCAL_RESOURCE_DIR must be defined)
23endif
24
25# Add --auto-add-overlay flag if not present
26ifeq (,$(findstring --auto-add-overlay, $(LOCAL_AAPT_FLAGS)))
27LOCAL_AAPT_FLAGS += --auto-add-overlay
28endif
29
30# Include setup wizard library, if not already included
31ifeq (,$(findstring setup-wizard-lib-gingerbread-compat,$(LOCAL_STATIC_JAVA_LIBRARIES)))
32LOCAL_RESOURCE_DIR += \
33    $(suwlib_dir)/main/res \
34    $(suwlib_dir)/eclair-mr1/res \
35    $(suwlib_dir)/full-support/res
36LOCAL_AAPT_FLAGS += --extra-packages com.android.setupwizardlib
37LOCAL_STATIC_JAVA_LIBRARIES += setup-wizard-lib-gingerbread-compat
38endif
39
40## Include transitive dependencies below
41
42# Include support-v7-appcompat, if not already included
43ifeq (,$(findstring android-support-v7-appcompat,$(LOCAL_STATIC_JAVA_LIBRARIES)))
44LOCAL_RESOURCE_DIR += frameworks/support/v7/appcompat/res
45LOCAL_AAPT_FLAGS += --extra-packages android.support.v7.appcompat
46LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-appcompat
47endif
48
49# Include support-v7-recyclerview, if not already included
50ifeq (,$(findstring android-support-v7-recyclerview,$(LOCAL_STATIC_JAVA_LIBRARIES)))
51LOCAL_RESOURCE_DIR += frameworks/support/v7/recyclerview/res
52LOCAL_AAPT_FLAGS += --extra-packages android.support.v7.recyclerview
53LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-recyclerview
54endif
55
56else # LOCAL_USE_AAPT2 := true
57
58ifeq (,$(findstring setup-wizard-lib-gingerbread-compat,$(LOCAL_STATIC_ANDROID_LIBRARIES)))
59  LOCAL_STATIC_ANDROID_LIBRARIES += setup-wizard-lib-gingerbread-compat
60endif
61
62ifeq (,$(findstring android-support-v7-appcompat,$(LOCAL_STATIC_ANDROID_LIBRARIES)))
63  LOCAL_STATIC_ANDROID_LIBRARIES += android-support-v7-appcompat
64endif
65
66ifeq (,$(findstring android-support-v7-recyclerview,$(LOCAL_STATIC_ANDROID_LIBRARIES)))
67  LOCAL_STATIC_ANDROID_LIBRARIES += android-support-v7-recyclerview
68endif
69
70endif # LOCAL_USE_AAPT2
71