pathmap.mk revision fefc17ff59a27a2957d2e8eec987656523907dbb
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.
20#
21# TODO: Allow each project to define stuff like this before the per-module
22#       Android.mk files are included, so we don't need to have a big central
23#       list.
24#
25
26#
27# A mapping from shorthand names to include directories.
28#
29pathmap_INCL := \
30    bluedroid:system/bluetooth/bluedroid/include \
31    bluez:external/bluetooth/bluez \
32    glib:external/bluetooth/glib \
33    bootloader:bootable/bootloader/legacy/include \
34    corecg:external/skia/include/core \
35    dbus:external/dbus \
36    frameworks-base:frameworks/base/include \
37    frameworks-native:frameworks/native/include \
38    graphics:external/skia/include/core \
39    libc:bionic/libc/include \
40    libdrm1:frameworks/base/media/libdrm/mobile1/include \
41    libhardware:hardware/libhardware/include \
42    libhardware_legacy:hardware/libhardware_legacy/include \
43    libhost:build/libs/host/include \
44    libm:bionic/libm/include \
45    libnativehelper:dalvik/libnativehelper/include \
46    libpagemap:system/extras/libpagemap/include \
47    libril:hardware/ril/include \
48    libstdc++:bionic/libstdc++/include \
49    libthread_db:bionic/libthread_db/include \
50    mkbootimg:system/core/mkbootimg \
51    opengl-tests-includes:frameworks/native/opengl/tests/include \
52    recovery:bootable/recovery \
53    system-core:system/core/include \
54    audio-effects:system/media/audio_effects/include \
55    audio-utils:system/media/audio_utils/include \
56    wilhelm:system/media/wilhelm/include \
57    wilhelm-ut:system/media/wilhelm/src/ut \
58    speex:external/speex/include
59
60#
61# Returns the path to the requested module's include directory,
62# relative to the root of the source tree.  Does not handle external
63# modules.
64#
65# $(1): a list of modules (or other named entities) to find the includes for
66#
67define include-path-for
68$(foreach n,$(1),$(patsubst $(n):%,%,$(filter $(n):%,$(pathmap_INCL))))
69endef
70
71#
72# Many modules expect to be able to say "#include <jni.h>",
73# so make it easy for them to find the correct path.
74#
75JNI_H_INCLUDE := $(call include-path-for,libnativehelper)/nativehelper
76
77#
78# A list of all source roots under frameworks/base, which will be
79# built into the android.jar.
80#
81# Note - "common" is included here, even though it is also built
82# into a static library (android-common) for unbundled use.  This
83# is so common and the other framework libraries can have mutual
84# interdependencies.
85#
86FRAMEWORKS_BASE_SUBDIRS := \
87	$(addsuffix /java, \
88	    core \
89	    graphics \
90	    location \
91	    media \
92	    drm \
93	    opengl \
94	    sax \
95	    telephony \
96	    wifi \
97	    keystore \
98	    icu4j \
99	    voip \
100	 )
101
102#
103# A version of FRAMEWORKS_BASE_SUBDIRS that is expanded to full paths from
104# the root of the tree.  This currently needs to be here so that other libraries
105# and apps can find the .aidl files in the framework, though we should really
106# figure out a better way to do this.
107#
108FRAMEWORKS_BASE_JAVA_SRC_DIRS := \
109	$(addprefix frameworks/base/,$(FRAMEWORKS_BASE_SUBDIRS))
110
111#
112# A list of all source roots under frameworks/support.
113#
114FRAMEWORKS_SUPPORT_SUBDIRS := \
115	v4 \
116	v13 \
117
118#
119# A version of FRAMEWORKS_SUPPORT_SUBDIRS that is expanded to full paths from
120# the root of the tree.
121#
122FRAMEWORKS_SUPPORT_JAVA_SRC_DIRS := \
123	$(addprefix frameworks/support/,$(FRAMEWORKS_SUPPORT_SUBDIRS))
124