OSDN Git Service

Bump Security Patch Level to 2019-01-05
[android-x86/build.git] / core / pathmap.mk
1 #
2 # Copyright (C) 2008 The Android Open Source Project
3 #
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
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
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.
15 #
16
17 #
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!
21 #
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.
25 #
26
27 #
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
30 #       list.
31 #
32
33 #
34 # A mapping from shorthand names to include directories.
35 #
36 pathmap_INCL := \
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
53
54 #
55 # Returns the path to the requested module's include directory,
56 # relative to the root of the source tree.  Does not handle external
57 # modules.
58 #
59 # $(1): a list of modules (or other named entities) to find the includes for
60 #
61 define include-path-for
62 $(foreach n,$(1),$(patsubst $(n):%,%,$(filter $(n):%,$(pathmap_INCL))))
63 endef
64
65 # Enter project path into pathmap
66 #
67 # $(1): name
68 # $(2): path
69 #
70 define project-set-path
71 $(eval pathmap_PROJ += $(1):$(2))
72 endef
73
74 # Enter variant project path into pathmap
75 #
76 # $(1): name
77 # $(2): variable to check
78 # $(3): base path
79 #
80 define project-set-path-variant
81     $(call project-set-path,$(1),$(strip \
82         $(if $($(2)), \
83             $(3)-$($(2)), \
84             $(3))))
85 endef
86
87 # Returns the path to the requested module's include directory,
88 # relative to the root of the source tree.
89 #
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))))
93 endef
94
95 #
96 # Many modules expect to be able to say "#include <jni.h>",
97 # so make it easy for them to find the correct path.
98 #
99 JNI_H_INCLUDE := libnativehelper/include/nativehelper
100
101 #
102 # A list of all source roots under frameworks/base, which will be
103 # built into the android.jar.
104 #
105 FRAMEWORKS_BASE_SUBDIRS := \
106         $(addsuffix /java, \
107             core \
108             graphics \
109             location \
110             media \
111             media/mca/effect \
112             media/mca/filterfw \
113             media/mca/filterpacks \
114             drm \
115             opengl \
116             sax \
117             telecomm \
118             telephony \
119             wifi \
120             keystore \
121             rs \
122          )
123
124 #
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.
129 #
130 FRAMEWORKS_BASE_JAVA_SRC_DIRS := \
131         $(addprefix frameworks/base/,$(FRAMEWORKS_BASE_SUBDIRS))
132
133 #
134 # A list of all source roots under frameworks/support.
135 #
136 FRAMEWORKS_SUPPORT_SUBDIRS := \
137         annotations \
138         compat \
139         media-compat \
140         fragment \
141         core-ui \
142         core-utils \
143         v7/gridlayout \
144         v7/cardview \
145         v7/mediarouter \
146         v7/palette \
147         v8/renderscript \
148         v13 \
149         v17/leanback \
150         design \
151         percent \
152         recommendation \
153         transition \
154         v7/preference \
155         v14/preference \
156         v17/preference-leanback \
157         documents-archive \
158         customtabs
159
160 #
161 # A list of all source roots under frameworks/multidex.
162 #
163 FRAMEWORKS_MULTIDEX_SUBDIRS := \
164         multidex/library/src \
165         multidex/instrumentation/src
166
167 #
168 # A version of FRAMEWORKS_SUPPORT_SUBDIRS that is expanded to full paths from
169 # the root of the tree.
170 #
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
178
179 #
180 # A list of support library modules.
181 #
182 FRAMEWORKS_SUPPORT_JAVA_LIBRARIES := \
183     $(foreach dir,$(FRAMEWORKS_SUPPORT_SUBDIRS),android-support-$(subst /,-,$(dir))) \
184     android-support-v4 \
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
191
192 #
193 # A list of all documented source roots under frameworks/data-binding.
194 #
195 FRAMEWORKS_DATA_BINDING_SUBDIRS := \
196         baseLibrary/src/main \
197         extensions/library/src/main \
198         extensions/library/src/doc
199
200 #
201 # A version of FRAMEWORKS_DATA_BINDING_SUBDIRS that is expanded to full paths from
202 # the root of the tree.
203 #
204 FRAMEWORKS_DATA_BINDING_JAVA_SRC_DIRS := \
205         $(addprefix frameworks/data-binding/,$(FRAMEWORKS_DATA_BINDING_SUBDIRS))
206