2009-03-04 04:28:42 +01:00
|
|
|
# This is included by the top-level Makefile.
|
|
|
|
# It sets up standard variables based on the
|
|
|
|
# current configuration and platform, which
|
|
|
|
# are not specific to what is being built.
|
|
|
|
|
2010-03-31 01:42:15 +02:00
|
|
|
# Only use ANDROID_BUILD_SHELL to wrap around bash.
|
|
|
|
# DO NOT use other shells such as zsh.
|
2010-03-30 21:55:13 +02:00
|
|
|
ifdef ANDROID_BUILD_SHELL
|
|
|
|
SHELL := $(ANDROID_BUILD_SHELL)
|
|
|
|
else
|
2009-03-04 04:28:42 +01:00
|
|
|
# Use bash, not whatever shell somebody has installed as /bin/sh
|
|
|
|
# This is repeated from main.mk, since envsetup.sh runs this file
|
|
|
|
# directly.
|
|
|
|
SHELL := /bin/bash
|
2010-03-30 21:55:13 +02:00
|
|
|
endif
|
2009-03-04 04:28:42 +01:00
|
|
|
|
2010-01-04 21:57:38 +01:00
|
|
|
# Tell python not to spam the source tree with .pyc files. This
|
|
|
|
# only has an effect on python 2.6 and above.
|
|
|
|
export PYTHONDONTWRITEBYTECODE := 1
|
|
|
|
|
2009-03-04 04:28:42 +01:00
|
|
|
# Standard source directories.
|
|
|
|
SRC_DOCS:= $(TOPDIR)docs
|
|
|
|
# TODO: Enforce some kind of layering; only add include paths
|
|
|
|
# when a module links against a particular library.
|
|
|
|
# TODO: See if we can remove most of these from the global list.
|
|
|
|
SRC_HEADERS := \
|
|
|
|
$(TOPDIR)system/core/include \
|
|
|
|
$(TOPDIR)hardware/libhardware/include \
|
|
|
|
$(TOPDIR)hardware/libhardware_legacy/include \
|
|
|
|
$(TOPDIR)hardware/ril/include \
|
|
|
|
$(TOPDIR)dalvik/libnativehelper/include \
|
|
|
|
$(TOPDIR)frameworks/base/include \
|
|
|
|
$(TOPDIR)frameworks/base/opengl/include \
|
2010-05-04 20:31:59 +02:00
|
|
|
$(TOPDIR)frameworks/base/native/include \
|
2009-03-04 04:28:42 +01:00
|
|
|
$(TOPDIR)external/skia/include
|
|
|
|
SRC_HOST_HEADERS:=$(TOPDIR)tools/include
|
|
|
|
SRC_LIBRARIES:= $(TOPDIR)libs
|
|
|
|
SRC_SERVERS:= $(TOPDIR)servers
|
|
|
|
SRC_TARGET_DIR := $(TOPDIR)build/target
|
|
|
|
SRC_API_DIR := $(TOPDIR)frameworks/base/api
|
|
|
|
|
|
|
|
# Some specific paths to tools
|
|
|
|
SRC_DROIDDOC_DIR := $(TOPDIR)build/tools/droiddoc
|
|
|
|
|
|
|
|
# Various mappings to avoid hard-coding paths all over the place
|
|
|
|
include $(BUILD_SYSTEM)/pathmap.mk
|
|
|
|
|
|
|
|
# ###############################################################
|
|
|
|
# Build system internal files
|
|
|
|
# ###############################################################
|
|
|
|
|
|
|
|
BUILD_COMBOS:= $(BUILD_SYSTEM)/combo
|
|
|
|
|
|
|
|
CLEAR_VARS:= $(BUILD_SYSTEM)/clear_vars.mk
|
|
|
|
BUILD_HOST_STATIC_LIBRARY:= $(BUILD_SYSTEM)/host_static_library.mk
|
|
|
|
BUILD_HOST_SHARED_LIBRARY:= $(BUILD_SYSTEM)/host_shared_library.mk
|
|
|
|
BUILD_STATIC_LIBRARY:= $(BUILD_SYSTEM)/static_library.mk
|
|
|
|
BUILD_RAW_STATIC_LIBRARY := $(BUILD_SYSTEM)/raw_static_library.mk
|
|
|
|
BUILD_SHARED_LIBRARY:= $(BUILD_SYSTEM)/shared_library.mk
|
|
|
|
BUILD_EXECUTABLE:= $(BUILD_SYSTEM)/executable.mk
|
|
|
|
BUILD_RAW_EXECUTABLE:= $(BUILD_SYSTEM)/raw_executable.mk
|
|
|
|
BUILD_HOST_EXECUTABLE:= $(BUILD_SYSTEM)/host_executable.mk
|
|
|
|
BUILD_PACKAGE:= $(BUILD_SYSTEM)/package.mk
|
2010-09-16 09:25:16 +02:00
|
|
|
BUILD_PHONY_PACKAGE:= $(BUILD_SYSTEM)/phony_package.mk
|
2009-03-04 04:28:42 +01:00
|
|
|
BUILD_HOST_PREBUILT:= $(BUILD_SYSTEM)/host_prebuilt.mk
|
|
|
|
BUILD_PREBUILT:= $(BUILD_SYSTEM)/prebuilt.mk
|
|
|
|
BUILD_MULTI_PREBUILT:= $(BUILD_SYSTEM)/multi_prebuilt.mk
|
|
|
|
BUILD_JAVA_LIBRARY:= $(BUILD_SYSTEM)/java_library.mk
|
|
|
|
BUILD_STATIC_JAVA_LIBRARY:= $(BUILD_SYSTEM)/static_java_library.mk
|
|
|
|
BUILD_HOST_JAVA_LIBRARY:= $(BUILD_SYSTEM)/host_java_library.mk
|
|
|
|
BUILD_DROIDDOC:= $(BUILD_SYSTEM)/droiddoc.mk
|
|
|
|
BUILD_COPY_HEADERS := $(BUILD_SYSTEM)/copy_headers.mk
|
2010-07-20 20:08:47 +02:00
|
|
|
BUILD_NATIVE_TEST := $(BUILD_SYSTEM)/native_test.mk
|
|
|
|
BUILD_HOST_NATIVE_TEST := $(BUILD_SYSTEM)/host_native_test.mk
|
2009-03-04 04:28:42 +01:00
|
|
|
|
|
|
|
# ###############################################################
|
|
|
|
# Parse out any modifier targets.
|
|
|
|
# ###############################################################
|
|
|
|
|
|
|
|
# The 'showcommands' goal says to show the full command
|
|
|
|
# lines being executed, instead of a short message about
|
|
|
|
# the kind of operation being done.
|
|
|
|
SHOW_COMMANDS:= $(filter showcommands,$(MAKECMDGOALS))
|
|
|
|
|
|
|
|
|
|
|
|
# ###############################################################
|
|
|
|
# Set common values
|
|
|
|
# ###############################################################
|
|
|
|
|
|
|
|
# These can be changed to modify both host and device modules.
|
2009-07-14 05:42:49 +02:00
|
|
|
COMMON_GLOBAL_CFLAGS:= -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith
|
2009-03-04 04:28:42 +01:00
|
|
|
COMMON_RELEASE_CFLAGS:= -DNDEBUG -UDEBUG
|
|
|
|
|
2009-08-13 20:13:21 +02:00
|
|
|
COMMON_GLOBAL_CPPFLAGS:= $(COMMON_GLOBAL_CFLAGS) -Wsign-promo
|
2009-07-09 02:51:18 +02:00
|
|
|
COMMON_RELEASE_CPPFLAGS:= $(COMMON_RELEASE_CFLAGS)
|
2009-03-04 04:28:42 +01:00
|
|
|
|
|
|
|
# Set the extensions used for various packages
|
|
|
|
COMMON_PACKAGE_SUFFIX := .zip
|
|
|
|
COMMON_JAVA_PACKAGE_SUFFIX := .jar
|
|
|
|
COMMON_ANDROID_PACKAGE_SUFFIX := .apk
|
|
|
|
|
|
|
|
# list of flags to turn specific warnings in to errors
|
2009-07-14 02:51:59 +02:00
|
|
|
TARGET_ERROR_FLAGS := -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point
|
2009-03-04 04:28:42 +01:00
|
|
|
|
2009-06-25 16:38:26 +02:00
|
|
|
# TODO: do symbol compression
|
|
|
|
TARGET_COMPRESS_MODULE_SYMBOLS := false
|
|
|
|
|
2011-05-18 22:49:08 +02:00
|
|
|
# Default shell is mksh. Other possible value is ash.
|
|
|
|
TARGET_SHELL := mksh
|
2010-06-03 19:57:02 +02:00
|
|
|
|
2009-03-04 04:28:42 +01:00
|
|
|
# ###############################################################
|
|
|
|
# Include sub-configuration files
|
|
|
|
# ###############################################################
|
|
|
|
|
|
|
|
# ---------------------------------------------------------------
|
|
|
|
# Try to include buildspec.mk, which will try to set stuff up.
|
|
|
|
# If this file doesn't exist, the environemnt variables will
|
|
|
|
# be used, and if that doesn't work, then the default is an
|
|
|
|
# arm build
|
2011-11-02 21:49:08 +01:00
|
|
|
ifndef ANDROID_BUILDSPEC
|
|
|
|
ANDROID_BUILDSPEC := $(TOPDIR)buildspec.mk
|
|
|
|
endif
|
|
|
|
-include $(ANDROID_BUILDSPEC)
|
2009-03-04 04:28:42 +01:00
|
|
|
|
|
|
|
# ---------------------------------------------------------------
|
|
|
|
# Define most of the global variables. These are the ones that
|
|
|
|
# are specific to the user's build configuration.
|
|
|
|
include $(BUILD_SYSTEM)/envsetup.mk
|
|
|
|
|
2009-06-23 21:25:06 +02:00
|
|
|
# Boards may be defined under $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)
|
|
|
|
# or under vendor/*/$(TARGET_DEVICE). Search in both places, but
|
|
|
|
# make sure only one exists.
|
|
|
|
# Real boards should always be associated with an OEM vendor.
|
|
|
|
board_config_mk := \
|
|
|
|
$(strip $(wildcard \
|
|
|
|
$(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)/BoardConfig.mk \
|
2010-01-22 22:25:24 +01:00
|
|
|
device/*/$(TARGET_DEVICE)/BoardConfig.mk \
|
2009-06-23 21:25:06 +02:00
|
|
|
vendor/*/$(TARGET_DEVICE)/BoardConfig.mk \
|
|
|
|
))
|
|
|
|
ifeq ($(board_config_mk),)
|
|
|
|
$(error No config file found for TARGET_DEVICE $(TARGET_DEVICE))
|
|
|
|
endif
|
|
|
|
ifneq ($(words $(board_config_mk)),1)
|
|
|
|
$(error Multiple board config files for TARGET_DEVICE $(TARGET_DEVICE): $(board_config_mk))
|
|
|
|
endif
|
|
|
|
include $(board_config_mk)
|
|
|
|
TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk)))
|
|
|
|
board_config_mk :=
|
|
|
|
|
|
|
|
# Clean up/verify variables defined by the board config file.
|
|
|
|
TARGET_BOOTLOADER_BOARD_NAME := $(strip $(TARGET_BOOTLOADER_BOARD_NAME))
|
|
|
|
TARGET_CPU_ABI := $(strip $(TARGET_CPU_ABI))
|
|
|
|
ifeq ($(TARGET_CPU_ABI),)
|
|
|
|
$(error No TARGET_CPU_ABI defined by board config: $(board_config_mk))
|
|
|
|
endif
|
2009-11-07 00:12:00 +01:00
|
|
|
TARGET_CPU_ABI2 := $(strip $(TARGET_CPU_ABI2))
|
2009-06-23 21:25:06 +02:00
|
|
|
|
2009-03-04 04:28:42 +01:00
|
|
|
# $(1): os/arch
|
|
|
|
define select-android-config-h
|
|
|
|
system/core/include/arch/$(1)/AndroidConfig.h
|
|
|
|
endef
|
|
|
|
|
|
|
|
combo_target := HOST_
|
|
|
|
include $(BUILD_SYSTEM)/combo/select.mk
|
|
|
|
|
|
|
|
# on windows, the tools have .exe at the end, and we depend on the
|
|
|
|
# host config stuff being done first
|
|
|
|
|
|
|
|
combo_target := TARGET_
|
|
|
|
include $(BUILD_SYSTEM)/combo/select.mk
|
|
|
|
|
2012-01-13 01:38:17 +01:00
|
|
|
# Compute TARGET_TOOLCHAIN_ROOT from TARGET_TOOLS_PREFIX
|
|
|
|
# if only TARGET_TOOLS_PREFIX is passed to the make command.
|
|
|
|
ifndef TARGET_TOOLCHAIN_ROOT
|
|
|
|
TARGET_TOOLCHAIN_ROOT := $(patsubst %/, %, $(dir $(TARGET_TOOLS_PREFIX)))
|
|
|
|
TARGET_TOOLCHAIN_ROOT := $(patsubst %/, %, $(dir $(TARGET_TOOLCHAIN_ROOT)))
|
|
|
|
TARGET_TOOLCHAIN_ROOT := $(wildcard $(TARGET_TOOLCHAIN_ROOT))
|
|
|
|
endif
|
|
|
|
|
2009-03-04 04:28:42 +01:00
|
|
|
# Pick a Java compiler.
|
|
|
|
include $(BUILD_SYSTEM)/combo/javac.mk
|
|
|
|
|
|
|
|
# ---------------------------------------------------------------
|
|
|
|
# Check that the configuration is current. We check that
|
|
|
|
# BUILD_ENV_SEQUENCE_NUMBER is current against this value.
|
|
|
|
# Don't fail if we're called from envsetup, so they have a
|
|
|
|
# chance to update their environment.
|
|
|
|
|
|
|
|
ifeq (,$(strip $(CALLED_FROM_SETUP)))
|
|
|
|
ifneq (,$(strip $(BUILD_ENV_SEQUENCE_NUMBER)))
|
|
|
|
ifneq ($(BUILD_ENV_SEQUENCE_NUMBER),$(CORRECT_BUILD_ENV_SEQUENCE_NUMBER))
|
|
|
|
$(warning BUILD_ENV_SEQUENCE_NUMBER is set incorrectly.)
|
|
|
|
$(info *** If you use envsetup/lunch/choosecombo:)
|
|
|
|
$(info *** - Re-execute envsetup (". envsetup.sh"))
|
|
|
|
$(info *** - Re-run lunch or choosecombo)
|
|
|
|
$(info *** If you use buildspec.mk:)
|
|
|
|
$(info *** - Look at buildspec.mk.default to see what has changed)
|
|
|
|
$(info *** - Update BUILD_ENV_SEQUENCE_NUMBER to "$(CORRECT_BUILD_ENV_SEQUENCE_NUMBER)")
|
|
|
|
$(error bailing..)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
# ---------------------------------------------------------------
|
|
|
|
# Generic tools.
|
|
|
|
|
|
|
|
LEX:= flex
|
|
|
|
YACC:= bison -d
|
|
|
|
DOXYGEN:= doxygen
|
|
|
|
AAPT := $(HOST_OUT_EXECUTABLES)/aapt$(HOST_EXECUTABLE_SUFFIX)
|
|
|
|
AIDL := $(HOST_OUT_EXECUTABLES)/aidl$(HOST_EXECUTABLE_SUFFIX)
|
2010-11-05 19:28:51 +01:00
|
|
|
PROTOC := $(HOST_OUT_EXECUTABLES)/aprotoc$(HOST_EXECUTABLE_SUFFIX)
|
2009-03-04 04:28:42 +01:00
|
|
|
ICUDATA := $(HOST_OUT_EXECUTABLES)/icudata$(HOST_EXECUTABLE_SUFFIX)
|
|
|
|
SIGNAPK_JAR := $(HOST_OUT_JAVA_LIBRARIES)/signapk$(COMMON_JAVA_PACKAGE_SUFFIX)
|
|
|
|
MKBOOTFS := $(HOST_OUT_EXECUTABLES)/mkbootfs$(HOST_EXECUTABLE_SUFFIX)
|
2009-05-27 18:14:25 +02:00
|
|
|
MINIGZIP := $(HOST_OUT_EXECUTABLES)/minigzip$(HOST_EXECUTABLE_SUFFIX)
|
2009-03-04 04:28:42 +01:00
|
|
|
MKBOOTIMG := $(HOST_OUT_EXECUTABLES)/mkbootimg$(HOST_EXECUTABLE_SUFFIX)
|
|
|
|
MKYAFFS2 := $(HOST_OUT_EXECUTABLES)/mkyaffs2image$(HOST_EXECUTABLE_SUFFIX)
|
|
|
|
APICHECK := $(HOST_OUT_EXECUTABLES)/apicheck$(HOST_EXECUTABLE_SUFFIX)
|
|
|
|
FS_GET_STATS := $(HOST_OUT_EXECUTABLES)/fs_get_stats$(HOST_EXECUTABLE_SUFFIX)
|
|
|
|
MKEXT2IMG := $(HOST_OUT_EXECUTABLES)/genext2fs$(HOST_EXECUTABLE_SUFFIX)
|
2010-08-03 23:43:15 +02:00
|
|
|
MAKE_EXT4FS := $(HOST_OUT_EXECUTABLES)/make_ext4fs$(HOST_EXECUTABLE_SUFFIX)
|
2010-11-18 00:40:38 +01:00
|
|
|
MKEXTUSERIMG := $(HOST_OUT_EXECUTABLES)/mkuserimg.sh
|
2009-03-04 04:28:42 +01:00
|
|
|
MKEXT2BOOTIMG := external/genext2fs/mkbootimg_ext2.sh
|
|
|
|
MKTARBALL := build/tools/mktarball.sh
|
2010-05-07 11:23:59 +02:00
|
|
|
TUNE2FS := $(HOST_OUT_EXECUTABLES)/tune2fs$(HOST_EXECUTABLE_SUFFIX)
|
|
|
|
E2FSCK := $(HOST_OUT_EXECUTABLES)/e2fsck$(HOST_EXECUTABLE_SUFFIX)
|
2010-05-04 00:01:38 +02:00
|
|
|
JARJAR := $(HOST_OUT_JAVA_LIBRARIES)/jarjar.jar
|
2009-08-30 22:39:24 +02:00
|
|
|
PROGUARD := external/proguard/bin/proguard.sh
|
2009-11-30 23:28:59 +01:00
|
|
|
JAVATAGS := build/tools/java-event-log-tags.py
|
2010-10-09 01:57:46 +02:00
|
|
|
LLVM_RS_CC := $(HOST_OUT_EXECUTABLES)/llvm-rs-cc$(HOST_EXECUTABLE_SUFFIX)
|
2010-10-11 19:36:42 +02:00
|
|
|
LLVM_RS_LINK := $(HOST_OUT_EXECUTABLES)/llvm-rs-link$(HOST_EXECUTABLE_SUFFIX)
|
2010-09-18 01:36:06 +02:00
|
|
|
DEXOPT := $(HOST_OUT_EXECUTABLES)/dexopt$(HOST_EXECUTABLE_SUFFIX)
|
|
|
|
DEXPREOPT := dalvik/tools/dex-preopt
|
2009-03-04 04:28:42 +01:00
|
|
|
|
2010-04-17 02:50:09 +02:00
|
|
|
# ACP is always for the build OS, not for the host OS
|
|
|
|
ACP := $(BUILD_OUT_EXECUTABLES)/acp$(BUILD_EXECUTABLE_SUFFIX)
|
|
|
|
|
2009-03-04 04:28:42 +01:00
|
|
|
# dx is java behind a shell script; no .exe necessary.
|
|
|
|
DX := $(HOST_OUT_EXECUTABLES)/dx
|
|
|
|
ZIPALIGN := $(HOST_OUT_EXECUTABLES)/zipalign$(HOST_EXECUTABLE_SUFFIX)
|
|
|
|
FINDBUGS := prebuilt/common/findbugs/bin/findbugs
|
|
|
|
LOCALIZE := $(HOST_OUT_EXECUTABLES)/localize$(HOST_EXECUTABLE_SUFFIX)
|
|
|
|
EMMA_JAR := external/emma/lib/emma$(COMMON_JAVA_PACKAGE_SUFFIX)
|
|
|
|
|
|
|
|
# Deal with archaic version of bison on Mac OS X.
|
|
|
|
ifeq ($(filter 1.28,$(shell $(YACC) -V)),)
|
|
|
|
YACC_HEADER_SUFFIX:= .hpp
|
|
|
|
else
|
|
|
|
YACC_HEADER_SUFFIX:= .cpp.h
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Don't use column under Windows, cygwin or not
|
|
|
|
ifeq ($(HOST_OS),windows)
|
|
|
|
COLUMN:= cat
|
|
|
|
else
|
|
|
|
COLUMN:= column
|
|
|
|
endif
|
|
|
|
|
|
|
|
dir := $(shell uname)
|
|
|
|
ifeq ($(HOST_OS),windows)
|
|
|
|
dir := $(HOST_OS)
|
|
|
|
endif
|
|
|
|
ifeq ($(HOST_OS),darwin)
|
|
|
|
dir := $(HOST_OS)-$(HOST_ARCH)
|
|
|
|
endif
|
|
|
|
OLD_FLEX := prebuilt/$(HOST_PREBUILT_TAG)/flex/flex-2.5.4a$(HOST_EXECUTABLE_SUFFIX)
|
|
|
|
|
|
|
|
ifeq ($(HOST_OS),darwin)
|
|
|
|
# Mac OS' screwy version of java uses a non-standard directory layout
|
|
|
|
# and doesn't even seem to have tools.jar. On the other hand, javac seems
|
|
|
|
# to be able to magically find the classes in there, wherever they are, so
|
|
|
|
# leave this blank
|
|
|
|
HOST_JDK_TOOLS_JAR :=
|
|
|
|
else
|
|
|
|
HOST_JDK_TOOLS_JAR:= $(shell $(BUILD_SYSTEM)/find-jdk-tools-jar.sh)
|
2010-04-27 03:36:52 +02:00
|
|
|
ifeq ($(wildcard $(HOST_JDK_TOOLS_JAR)),)
|
2010-09-23 02:45:35 +02:00
|
|
|
$(error Error: could not find jdk tools.jar, please install JDK6, \
|
2010-09-22 23:11:49 +02:00
|
|
|
which you can download from java.sun.com)
|
2010-04-27 03:36:52 +02:00
|
|
|
endif
|
2009-03-04 04:28:42 +01:00
|
|
|
endif
|
|
|
|
|
2011-05-25 00:46:15 +02:00
|
|
|
# Is the host JDK 64-bit version?
|
|
|
|
HOST_JDK_IS_64BIT_VERSION :=
|
|
|
|
ifneq ($(filter 64-Bit, $(shell java -version 2>&1)),)
|
|
|
|
HOST_JDK_IS_64BIT_VERSION := true
|
|
|
|
endif
|
|
|
|
|
2009-03-04 04:28:42 +01:00
|
|
|
# It's called md5 on Mac OS and md5sum on Linux
|
|
|
|
ifeq ($(HOST_OS),darwin)
|
|
|
|
MD5SUM:=md5 -q
|
|
|
|
else
|
|
|
|
MD5SUM:=md5sum
|
|
|
|
endif
|
|
|
|
|
2011-04-09 02:32:52 +02:00
|
|
|
APICHECK_CLASSPATH := $(HOST_JDK_TOOLS_JAR)
|
|
|
|
APICHECK_CLASSPATH := $(APICHECK_CLASSPATH):$(HOST_OUT_JAVA_LIBRARIES)/doclava$(COMMON_JAVA_PACKAGE_SUFFIX)
|
|
|
|
APICHECK_CLASSPATH := $(APICHECK_CLASSPATH):$(HOST_OUT_JAVA_LIBRARIES)/jsilver$(COMMON_JAVA_PACKAGE_SUFFIX)
|
|
|
|
APICHECK_COMMAND := $(APICHECK) -JXmx1024m -J"classpath $(APICHECK_CLASSPATH)"
|
|
|
|
|
2011-10-04 19:50:08 +02:00
|
|
|
# The default key if not set as LOCAL_CERTIFICATE
|
|
|
|
ifdef PRODUCT_DEFAULT_DEV_CERTIFICATE
|
|
|
|
DEFAULT_SYSTEM_DEV_CERTIFICATE := $(PRODUCT_DEFAULT_DEV_CERTIFICATE)
|
|
|
|
else
|
|
|
|
DEFAULT_SYSTEM_DEV_CERTIFICATE := build/target/product/security/testkey
|
|
|
|
endif
|
|
|
|
|
2009-03-04 04:28:42 +01:00
|
|
|
# ###############################################################
|
|
|
|
# Set up final options.
|
|
|
|
# ###############################################################
|
|
|
|
|
|
|
|
HOST_GLOBAL_CFLAGS += $(COMMON_GLOBAL_CFLAGS)
|
|
|
|
HOST_RELEASE_CFLAGS += $(COMMON_RELEASE_CFLAGS)
|
|
|
|
|
|
|
|
HOST_GLOBAL_CPPFLAGS += $(COMMON_GLOBAL_CPPFLAGS)
|
|
|
|
HOST_RELEASE_CPPFLAGS += $(COMMON_RELEASE_CPPFLAGS)
|
|
|
|
|
|
|
|
TARGET_GLOBAL_CFLAGS += $(COMMON_GLOBAL_CFLAGS)
|
|
|
|
TARGET_RELEASE_CFLAGS += $(COMMON_RELEASE_CFLAGS)
|
|
|
|
|
|
|
|
TARGET_GLOBAL_CPPFLAGS += $(COMMON_GLOBAL_CPPFLAGS)
|
|
|
|
TARGET_RELEASE_CPPFLAGS += $(COMMON_RELEASE_CPPFLAGS)
|
|
|
|
|
|
|
|
HOST_GLOBAL_LD_DIRS += -L$(HOST_OUT_INTERMEDIATE_LIBRARIES)
|
|
|
|
TARGET_GLOBAL_LD_DIRS += -L$(TARGET_OUT_INTERMEDIATE_LIBRARIES)
|
|
|
|
|
|
|
|
HOST_PROJECT_INCLUDES:= $(SRC_HEADERS) $(SRC_HOST_HEADERS) $(HOST_OUT_HEADERS)
|
|
|
|
TARGET_PROJECT_INCLUDES:= $(SRC_HEADERS) $(TARGET_OUT_HEADERS)
|
|
|
|
|
|
|
|
# Many host compilers don't support these flags, so we have to make
|
|
|
|
# sure to only specify them for the target compilers checked in to
|
2011-07-12 07:11:46 +02:00
|
|
|
# the source tree.
|
2009-03-04 04:28:42 +01:00
|
|
|
TARGET_GLOBAL_CFLAGS += $(TARGET_ERROR_FLAGS)
|
|
|
|
TARGET_GLOBAL_CPPFLAGS += $(TARGET_ERROR_FLAGS)
|
|
|
|
|
2009-04-24 03:44:55 +02:00
|
|
|
HOST_GLOBAL_CFLAGS += $(HOST_RELEASE_CFLAGS)
|
|
|
|
HOST_GLOBAL_CPPFLAGS += $(HOST_RELEASE_CPPFLAGS)
|
2009-03-04 04:28:42 +01:00
|
|
|
|
2009-04-24 03:44:55 +02:00
|
|
|
TARGET_GLOBAL_CFLAGS += $(TARGET_RELEASE_CFLAGS)
|
|
|
|
TARGET_GLOBAL_CPPFLAGS += $(TARGET_RELEASE_CPPFLAGS)
|
2009-03-04 04:28:42 +01:00
|
|
|
|
|
|
|
PREBUILT_IS_PRESENT := $(if $(wildcard prebuilt/Android.mk),true)
|
|
|
|
|
|
|
|
# ###############################################################
|
|
|
|
# Collect a list of the SDK versions that we could compile against
|
|
|
|
# For use with the LOCAL_SDK_VERSION variable for include $(BUILD_PACKAGE)
|
|
|
|
# ###############################################################
|
|
|
|
|
2011-11-29 19:24:27 +01:00
|
|
|
HISTORICAL_SDK_VERSIONS_ROOT := $(TOPDIR)prebuilts/sdk
|
2011-11-29 20:20:16 +01:00
|
|
|
HISTORICAL_NDK_VERSIONS_ROOT := $(TOPDIR)prebuilts/ndk
|
2010-06-09 19:26:26 +02:00
|
|
|
|
|
|
|
# Historical SDK version N is stored in $(HISTORICAL_SDK_VERSIONS_ROOT)/N.
|
|
|
|
# The 'current' version is whatever this source tree is.
|
2009-03-04 04:28:42 +01:00
|
|
|
#
|
|
|
|
# sgrax is the opposite of xargs. It takes the list of args and puts them
|
|
|
|
# on each line for sort to process.
|
|
|
|
# sort -g is a numeric sort, so 1 2 3 10 instead of 1 10 2 3.
|
|
|
|
|
2010-06-09 19:26:26 +02:00
|
|
|
# Numerically sort a list of numbers
|
|
|
|
# $(1): the list of numbers to be sorted
|
|
|
|
define numerically_sort
|
|
|
|
$(shell function sgrax() { \
|
|
|
|
while [ -n "$$1" ] ; do echo $$1 ; shift ; done \
|
|
|
|
} ; \
|
|
|
|
( sgrax $(1) | sort -g ) )
|
|
|
|
endef
|
|
|
|
|
|
|
|
TARGET_AVAILABLE_SDK_VERSIONS := current $(call numerically_sort,\
|
|
|
|
$(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/android.jar,%, \
|
|
|
|
$(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/android.jar)))
|
2009-03-04 04:28:42 +01:00
|
|
|
|
2010-07-13 23:55:47 +02:00
|
|
|
TARGET_AVAILABLE_NDK_VERSIONS := $(call numerically_sort,\
|
|
|
|
$(patsubst $(HISTORICAL_NDK_VERSIONS_ROOT)/android-ndk-r%,%, \
|
|
|
|
$(wildcard $(HISTORICAL_NDK_VERSIONS_ROOT)/android-ndk-r*)))
|
|
|
|
|
2011-04-09 00:03:48 +02:00
|
|
|
INTERNAL_PLATFORM_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/public_api.txt
|
2010-03-09 02:16:57 +01:00
|
|
|
|
2010-10-14 23:31:48 +02:00
|
|
|
# This is the standard way to name a directory containing prebuilt target
|
|
|
|
# objects. E.g., prebuilt/$(TARGET_PREBUILT_TAG)/libc.so
|
2011-07-12 07:11:46 +02:00
|
|
|
TARGET_PREBUILT_TAG := android-$(TARGET_ARCH)
|
2010-10-14 23:31:48 +02:00
|
|
|
|
2010-03-09 02:16:57 +01:00
|
|
|
include $(BUILD_SYSTEM)/dumpvar.mk
|