2 # Copyright (C) 2008 The Android Open Source Project
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
18 # A central place to define mappings to paths, to avoid hard-coding
19 # them in Android.mk files. Not meant for header file include directories,
20 # despite the fact that it was historically used for that!
22 # If you want this for a library's header files, use LOCAL_EXPORT_C_INCLUDES
23 # instead. Then users of the library don't have to do anything --- they'll
24 # have the correct header files added to their include path automatically.
28 # TODO: Allow each project to define stuff like this before the per-module
29 # Android.mk files are included, so we don't need to have a big central
34 # A mapping from shorthand names to include directories.
37 camera:system/media/camera/include \
38 frameworks-base:frameworks/base/include \
39 frameworks-native:frameworks/native/include \
40 libhardware:hardware/libhardware/include \
41 libhardware_legacy:hardware/libhardware_legacy/include \
42 libril:hardware/ril/include \
43 opengl-tests-includes:frameworks/native/opengl/tests/include \
44 system-core:system/core/include \
45 audio:system/media/audio/include \
46 audio-effects:system/media/audio_effects/include \
47 audio-utils:system/media/audio_utils/include \
48 audio-route:system/media/audio_route/include \
49 wilhelm:frameworks/wilhelm/include \
50 wilhelm-ut:frameworks/wilhelm/src/ut \
51 mediandk:frameworks/av/media/ndk/ \
52 speex:external/speex/include
55 # Returns the path to the requested module's include directory,
56 # relative to the root of the source tree. Does not handle external
59 # $(1): a list of modules (or other named entities) to find the includes for
61 define include-path-for
62 $(foreach n,$(1),$(patsubst $(n):%,%,$(filter $(n):%,$(pathmap_INCL))))
65 # Enter project path into pathmap
70 define project-set-path
71 $(eval pathmap_PROJ += $(1):$(2))
74 # Enter variant project path into pathmap
77 # $(2): variable to check
80 define project-set-path-variant
81 $(call project-set-path,$(1),$(strip \
87 # Returns the path to the requested module's include directory,
88 # relative to the root of the source tree.
90 # $(1): a list of modules (or other named entities) to find the projects for
91 define project-path-for
92 $(foreach n,$(1),$(patsubst $(n):%,%,$(filter $(n):%,$(pathmap_PROJ))))
96 # Many modules expect to be able to say "#include <jni.h>",
97 # so make it easy for them to find the correct path.
99 JNI_H_INCLUDE := libnativehelper/include/nativehelper
102 # A list of all source roots under frameworks/base, which will be
103 # built into the android.jar.
105 FRAMEWORKS_BASE_SUBDIRS := \
113 media/mca/filterpacks \
125 # A version of FRAMEWORKS_BASE_SUBDIRS that is expanded to full paths from
126 # the root of the tree. This currently needs to be here so that other libraries
127 # and apps can find the .aidl files in the framework, though we should really
128 # figure out a better way to do this.
130 FRAMEWORKS_BASE_JAVA_SRC_DIRS := \
131 $(addprefix frameworks/base/,$(FRAMEWORKS_BASE_SUBDIRS))
134 # A list of all source roots under frameworks/support.
136 FRAMEWORKS_SUPPORT_SUBDIRS := \
156 v17/preference-leanback \
161 # A list of all source roots under frameworks/multidex.
163 FRAMEWORKS_MULTIDEX_SUBDIRS := \
164 multidex/library/src \
165 multidex/instrumentation/src
168 # A version of FRAMEWORKS_SUPPORT_SUBDIRS that is expanded to full paths from
169 # the root of the tree.
171 FRAMEWORKS_SUPPORT_JAVA_SRC_DIRS := \
172 $(addprefix frameworks/support/,$(FRAMEWORKS_SUPPORT_SUBDIRS)) \
173 $(addprefix frameworks/,$(FRAMEWORKS_MULTIDEX_SUBDIRS)) \
174 frameworks/support/graphics/drawable/animated \
175 frameworks/support/graphics/drawable/static \
176 frameworks/support/v7/appcompat/src \
177 frameworks/support/v7/recyclerview/src
180 # A list of support library modules.
182 FRAMEWORKS_SUPPORT_JAVA_LIBRARIES := \
183 $(foreach dir,$(FRAMEWORKS_SUPPORT_SUBDIRS),android-support-$(subst /,-,$(dir))) \
185 android-support-vectordrawable \
186 android-support-animatedvectordrawable \
187 android-support-v7-appcompat \
188 android-support-v7-recyclerview \
189 android-support-multidex \
190 android-support-multidex-instrumentation
193 # A list of all documented source roots under frameworks/data-binding.
195 FRAMEWORKS_DATA_BINDING_SUBDIRS := \
196 baseLibrary/src/main \
197 extensions/library/src/main \
198 extensions/library/src/doc
201 # A version of FRAMEWORKS_DATA_BINDING_SUBDIRS that is expanded to full paths from
202 # the root of the tree.
204 FRAMEWORKS_DATA_BINDING_JAVA_SRC_DIRS := \
205 $(addprefix frameworks/data-binding/,$(FRAMEWORKS_DATA_BINDING_SUBDIRS))