pathmap.mk revision 3d949bbabc669de44f603ffbe59951433ffd1fe4
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#
36pathmap_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    libhost:build/libs/host/include \
43    libnativehelper:libnativehelper/include \
44    libpagemap:system/extras/libpagemap/include \
45    libril:hardware/ril/include \
46    opengl-tests-includes:frameworks/native/opengl/tests/include \
47    recovery:bootable/recovery \
48    system-core:system/core/include \
49    audio-effects:system/media/audio_effects/include \
50    audio-utils:system/media/audio_utils/include \
51    audio-route:system/media/audio_route/include \
52    wilhelm:frameworks/wilhelm/include \
53    wilhelm-ut:frameworks/wilhelm/src/ut \
54    mediandk:frameworks/av/media/ndk/ \
55    speex:external/speex/include
56
57#
58# Returns the path to the requested module's include directory,
59# relative to the root of the source tree.  Does not handle external
60# modules.
61#
62# $(1): a list of modules (or other named entities) to find the includes for
63#
64define include-path-for
65$(foreach n,$(1),$(patsubst $(n):%,%,$(filter $(n):%,$(pathmap_INCL))))
66endef
67
68#
69# Many modules expect to be able to say "#include <jni.h>",
70# so make it easy for them to find the correct path.
71#
72JNI_H_INCLUDE := $(call include-path-for,libnativehelper)/nativehelper
73
74#
75# A list of all source roots under frameworks/base, which will be
76# built into the android.jar.
77#
78FRAMEWORKS_BASE_SUBDIRS := \
79	$(addsuffix /java, \
80	    core \
81	    graphics \
82	    location \
83	    media \
84	    media/mca/effect \
85	    media/mca/filterfw \
86	    media/mca/filterpacks \
87	    drm \
88	    opengl \
89	    sax \
90	    telecomm \
91	    telephony \
92	    wifi \
93	    keystore \
94	    rs \
95	 )
96
97#
98# A version of FRAMEWORKS_BASE_SUBDIRS that is expanded to full paths from
99# the root of the tree.  This currently needs to be here so that other libraries
100# and apps can find the .aidl files in the framework, though we should really
101# figure out a better way to do this.
102#
103FRAMEWORKS_BASE_JAVA_SRC_DIRS := \
104	$(addprefix frameworks/base/,$(FRAMEWORKS_BASE_SUBDIRS))
105
106#
107# A list of all source roots under frameworks/support.
108#
109FRAMEWORKS_SUPPORT_SUBDIRS := \
110        annotations \
111        v4 \
112        v7/gridlayout \
113        v7/appcompat \
114        v7/cardview \
115        v7/mediarouter \
116        v7/palette \
117        v7/recyclerview \
118        v8/renderscript \
119        v13 \
120        v17/leanback
121
122#
123# A list of all source roots under frameworks/multidex.
124#
125FRAMEWORKS_MULTIDEX_SUBDIRS := \
126        multidex/library/src \
127        multidex/instrumentation/src
128
129#
130# A version of FRAMEWORKS_SUPPORT_SUBDIRS that is expanded to full paths from
131# the root of the tree.
132#
133FRAMEWORKS_SUPPORT_JAVA_SRC_DIRS := \
134	$(addprefix frameworks/support/,$(FRAMEWORKS_SUPPORT_SUBDIRS)) \
135	$(addprefix frameworks/,$(FRAMEWORKS_MULTIDEX_SUBDIRS))
136
137#
138# A list of support library modules.
139#
140FRAMEWORKS_SUPPORT_JAVA_LIBRARIES := \
141    $(foreach dir,$(FRAMEWORKS_SUPPORT_SUBDIRS),android-support-$(subst /,-,$(dir))) \
142    android-support-multidex \
143    android-support-multidex-instrumentation
144
145