pathmap.mk revision 5679e356d298c58e839f03c45050192e813e79f8
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 bootloader:bootable/bootloader/legacy/include \ 31 camera:system/media/camera/include \ 32 corecg:external/skia/include/core \ 33 frameworks-base:frameworks/base/include \ 34 frameworks-native:frameworks/native/include \ 35 graphics:external/skia/include/core \ 36 libc:bionic/libc/include \ 37 libhardware:hardware/libhardware/include \ 38 libhardware_legacy:hardware/libhardware_legacy/include \ 39 libhost:build/libs/host/include \ 40 libm:bionic/libm/include \ 41 libnativehelper:libnativehelper/include \ 42 libpagemap:system/extras/libpagemap/include \ 43 libril:hardware/ril/include \ 44 libstdc++:bionic/libstdc++/include \ 45 mkbootimg:system/core/mkbootimg \ 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 speex:external/speex/include 55 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# 77FRAMEWORKS_BASE_SUBDIRS := \ 78 $(addsuffix /java, \ 79 core \ 80 graphics \ 81 location \ 82 media \ 83 media/mca/effect \ 84 media/mca/filterfw \ 85 media/mca/filterpacks \ 86 drm \ 87 opengl \ 88 sax \ 89 telephony \ 90 wifi \ 91 keystore \ 92 rs \ 93 ) 94 95# 96# A version of FRAMEWORKS_BASE_SUBDIRS that is expanded to full paths from 97# the root of the tree. This currently needs to be here so that other libraries 98# and apps can find the .aidl files in the framework, though we should really 99# figure out a better way to do this. 100# 101FRAMEWORKS_BASE_JAVA_SRC_DIRS := \ 102 $(addprefix frameworks/base/,$(FRAMEWORKS_BASE_SUBDIRS)) 103 104# 105# A list of all source roots under frameworks/support. 106# 107FRAMEWORKS_SUPPORT_SUBDIRS := \ 108 v4 \ 109 v7/gridlayout \ 110 v7/appcompat \ 111 v7/mediarouter \ 112 v8/renderscript \ 113 v13 114 115# 116# A list of all source roots under frameworks/multidex. 117# 118FRAMEWORKS_MULTIDEX_SUBDIRS := \ 119 multidex/library/src \ 120 multidex/instrumentation/src 121 122# 123# A version of FRAMEWORKS_SUPPORT_SUBDIRS that is expanded to full paths from 124# the root of the tree. 125# 126FRAMEWORKS_SUPPORT_JAVA_SRC_DIRS := \ 127 $(addprefix frameworks/support/,$(FRAMEWORKS_SUPPORT_SUBDIRS)) \ 128 $(addprefix frameworks/,$(FRAMEWORKS_MULTIDEX_SUBDIRS)) 129 130# 131# A list of support library modules. 132# 133FRAMEWORKS_SUPPORT_JAVA_LIBRARIES := \ 134 $(foreach dir,$(FRAMEWORKS_SUPPORT_SUBDIRS),android-support-$(subst /,-,$(dir))) \ 135 android-support-multidex \ 136 android-support-multidex-instrumentation 137 138