pathmap.mk revision b6c1cf6de79035f58b512f4400db458c8401379a
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    bluez-libs:external/bluez/libs/include \
31    bluez-utils:external/bluez/utils \
32    bootloader:bootloader/legacy/include \
33    corecg:external/skia/include/corecg \
34    dbus:external/dbus \
35    frameworks-base:frameworks/base/include \
36    graphics:external/skia/include/graphics \
37    libc:bionic/libc/include \
38    libdrm1:frameworks/base/media/libdrm/mobile1/include \
39    libdrm2:frameworks/base/media/libdrm/mobile2/include \
40    libhardware:hardware/libhardware/include \
41    libhost:build/libs/host/include \
42    libm:bionic/libm/include \
43    libnativehelper:dalvik/libnativehelper/include \
44    libpagemap:system/extras/libpagemap/include \
45    libril:hardware/ril/include \
46    libstdc++:bionic/libstdc++/include \
47    libthread_db:bionic/libthread_db/include \
48    mkbootimg:system/core/mkbootimg \
49    recovery:recovery \
50    system-core:system/core/include
51
52#
53# Returns the path to the requested module's include directory,
54# relative to the root of the source tree.  Does not handle external
55# modules.
56#
57# $(1): a list of modules (or other named entities) to find the includes for
58#
59define include-path-for
60$(foreach n,$(1),$(patsubst $(n):%,%,$(filter $(n):%,$(pathmap_INCL))))
61endef
62
63#
64# Many modules expect to be able to say "#include <jni.h>",
65# so make it easy for them to find the correct path.
66#
67JNI_H_INCLUDE := $(call include-path-for,libnativehelper)/nativehelper
68
69FRAMEWORKS_BASE_SUBDIRS := \
70	core \
71	graphics \
72	location \
73	media \
74	opengl \
75	sax \
76	services \
77	telephony \
78	wifi
79
80FRAMEWORKS_BASE_JAVA_SRC_DIRS := \
81	$(patsubst %,frameworks/base/%/java,$(FRAMEWORKS_BASE_SUBDIRS))
82