blob: 041a7b02e27da4d66a193a2c9172d727bf9fa3af [file] [log] [blame]
The Android Open Source Project88b60792009-03-03 19:28:42 -08001#
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 \
Jaikumar Ganesh09427682009-05-05 22:27:45 -070031 bluez:external/bluetooth/bluez \
32 glib:external/bluetooth/glib \
The Android Open Source Project88b60792009-03-03 19:28:42 -080033 bootloader:bootable/bootloader/legacy/include \
34 corecg:external/skia/include/core \
35 dbus:external/dbus \
36 frameworks-base:frameworks/base/include \
Mathias Agopianbd118e62012-03-05 16:04:31 -080037 frameworks-native:frameworks/native/include \
The Android Open Source Project88b60792009-03-03 19:28:42 -080038 graphics:external/skia/include/core \
39 libc:bionic/libc/include \
40 libdrm1:frameworks/base/media/libdrm/mobile1/include \
The Android Open Source Project88b60792009-03-03 19:28:42 -080041 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 \
Mathias Agopianfb956ef2012-03-05 18:45:37 -080051 opengl-tests-includes:frameworks/native/opengl/tests/include \
The Android Open Source Project88b60792009-03-03 19:28:42 -080052 recovery:bootable/recovery \
Eric Laurent99acb9c2011-06-16 20:53:25 -070053 system-core:system/core/include \
54 speex:external/speex/include
The Android Open Source Project88b60792009-03-03 19:28:42 -080055
56#
57# Returns the path to the requested module's include directory,
58# relative to the root of the source tree. Does not handle external
59# modules.
60#
61# $(1): a list of modules (or other named entities) to find the includes for
62#
63define include-path-for
64$(foreach n,$(1),$(patsubst $(n):%,%,$(filter $(n):%,$(pathmap_INCL))))
65endef
66
67#
68# Many modules expect to be able to say "#include <jni.h>",
69# so make it easy for them to find the correct path.
70#
71JNI_H_INCLUDE := $(call include-path-for,libnativehelper)/nativehelper
72
73#
74# A list of all source roots under frameworks/base, which will be
75# built into the android.jar.
76#
Dan Egnor81ab3c52009-11-18 14:42:40 -080077# Note - "common" is included here, even though it is also built
78# into a static library (android-common) for unbundled use. This
79# is so common and the other framework libraries can have mutual
80# interdependencies.
81#
The Android Open Source Project88b60792009-03-03 19:28:42 -080082FRAMEWORKS_BASE_SUBDIRS := \
83 $(addsuffix /java, \
84 core \
85 graphics \
The Android Open Source Project88b60792009-03-03 19:28:42 -080086 location \
87 media \
aimitakeshi2bdf2652010-07-27 08:34:47 +090088 drm \
The Android Open Source Project88b60792009-03-03 19:28:42 -080089 opengl \
90 sax \
91 telephony \
The Android Open Source Project88b60792009-03-03 19:28:42 -080092 wifi \
Chung-yih Wang67647752009-06-10 23:08:03 +080093 keystore \
Doug Felt05d27582010-04-05 14:00:48 -070094 icu4j \
Chung-yih Wangab8ed582010-08-05 11:31:07 +080095 voip \
The Android Open Source Project88b60792009-03-03 19:28:42 -080096 )
97
98#
99# A version of FRAMEWORKS_BASE_SUBDIRS that is expanded to full paths from
100# the root of the tree. This currently needs to be here so that other libraries
101# and apps can find the .aidl files in the framework, though we should really
102# figure out a better way to do this.
103#
104FRAMEWORKS_BASE_JAVA_SRC_DIRS := \
105 $(addprefix frameworks/base/,$(FRAMEWORKS_BASE_SUBDIRS))
Svetoslav Ganov155d8552011-11-17 15:13:49 -0800106
107#
108# A list of all source roots under frameworks/support.
109#
110FRAMEWORKS_SUPPORT_SUBDIRS := \
111 v4 \
112 v13 \
113
114#
115# A version of FRAMEWORKS_SUPPORT_SUBDIRS that is expanded to full paths from
116# the root of the tree.
117#
118FRAMEWORKS_SUPPORT_JAVA_SRC_DIRS := \
119 $(addprefix frameworks/support/,$(FRAMEWORKS_SUPPORT_SUBDIRS))