diff --git a/buildspec.mk.default b/buildspec.mk.default deleted file mode 100644 index 0f75f3161..000000000 --- a/buildspec.mk.default +++ /dev/null @@ -1,95 +0,0 @@ -# -# Copyright (C) 2007 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -###################################################################### -# This is a do-nothing template file. To use it, copy it to a file -# named "buildspec.mk" in the root directory, and uncomment or change -# the variables necessary for your desired configuration. The file -# "buildspec.mk" should never be checked in to source control. -###################################################################### - -# Uncomment this if you want the simulator, otherwise, build for arm -ifndef TARGET_SIMULATOR -#TARGET_SIMULATOR:=true -endif - -# Set this to debug or release if you care. Otherwise, it defaults to -# release for arm and debug for the simulator. -ifndef TARGET_BUILD_TYPE -#TARGET_BUILD_TYPE:=release -#TARGET_BUILD_TYPE:=debug -endif - -# Uncomment this if you want the host tools built in debug mode. Otherwise -# it defaults to release. -ifndef HOST_BUILD_TYPE -#HOST_BUILD_TYPE:=debug -endif - -# Turn on debugging for selected modules. If DEBUG_MODULE_ is set -# to a non-empty value, the appropriate HOST_/TARGET_CUSTOM_DEBUG_CFLAGS -# will be added to LOCAL_CFLAGS when building the module. -#DEBUG_MODULE_ModuleName:=true - -# Specify the extra CFLAGS to use when building a module whose -# DEBUG_MODULE_ variable is set. Host and device flags are handled -# separately. -#HOST_CUSTOM_DEBUG_CFLAGS:= -#TARGET_CUSTOM_DEBUG_CFLAGS:= - -# Choose a product to build for. Look in the products directory for ones -# that work. -ifndef TARGET_PRODUCT -#TARGET_PRODUCT:=generic -endif - -# Choose additional targets to always install, even when building -# minimal targets like "make droid". This takes simple target names -# like "Browser" or "MyApp", the names used by LOCAL_MODULE or -# LOCAL_PACKAGE_NAME. Modules listed here will always be installed in -# /system, even if they'd usually go in /data. -ifndef CUSTOM_MODULES -#CUSTOM_MODULES:= -endif - -# Choose additional locales, like "en_US" or "it_IT", to add to any -# built product. Any locales that appear in CUSTOM_LOCALES but not in -# the locale list for the selected product will be added to the end -# of PRODUCT_LOCALES. -ifndef CUSTOM_LOCALES -#CUSTOM_LOCALES:= -endif - -# If you have a special place to put your ouput files, set this, otherwise -# it goes to /out -#OUT_DIR:=/tmp/stuff - -# If you want to always set certain system properties, add them to this list. -# E.g., "ADDITIONAL_BUILD_PROPERTIES += ro.prop1=5 prop2=value" -# This mechanism does not currently support values containing spaces. -#ADDITIONAL_BUILD_PROPERTIES += - -# If you want to reduce the system.img size by several meg, and are willing to -# lose access to CJK (and other) character sets, define NO_FALLBACK_FONT:=true -ifndef NO_FALLBACK_FONT -#NO_FALLBACK_FONT:=true -endif - -# when the build system changes such that this file must be updated, this -# variable will be changed. After you have modified this file with the new -# changes (see buildspec.mk.default), update this to the new value from -# buildspec.mk.default. -BUILD_ENV_SEQUENCE_NUMBER := 9 diff --git a/cleanspec.mk b/cleanspec.mk deleted file mode 100644 index 794c9cd50..000000000 --- a/cleanspec.mk +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (C) 2007 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Just bump this if you want to force a clean build. -# ********************************************************************** -# WHEN DOING SO, DELETE ANY "add-clean-step" ENTRIES THAT HAVE PILED UP. -# ********************************************************************** -# -INTERNAL_CLEAN_BUILD_VERSION := 2 -# -# *********************************************************************** -# Do not touch INTERNAL_CLEAN_BUILD_VERSION if you've added a clean step! -# *********************************************************************** - -# If you don't need to do a full clean build but would like to touch -# a file or delete some intermediate files, add a clean step to the end -# of the list. These steps will only be run once, if they haven't been -# run before. -# -# E.g.: -# $(call add-clean-step, touch -c external/sqlite/sqlite3.h) -# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/external/zlib/) -# -# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with -# files that are missing or have been moved. -# -# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory. -# Use $(OUT_DIR) to refer to the "out" directory. -# -# If you need to re-do something that's already mentioned, just copy -# the command and add it to the bottom of the list. E.g., if a change -# that you made last week required touching a file and a change you -# made today requires touching the same file, just copy the old -# touch step and add it to the end of the list. -# -# ************************************************ -# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST -# ************************************************ - -# For example: -#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates) -#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates) -#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f) -#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) - -$(call add-clean-step, rm -f $(PRODUCT_OUT)/system/etc/NOTICE.html) -# Remove generated java files after CL 126153 -$(call add-clean-step, find $(OUT_DIR) -type f -name "*.java" -print0 | xargs -0 rm -f) -$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates) -$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/sapphire/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates/led) -$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/mountd) -$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/mountd.conf) -$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Browser_intermediates) -$(call add-clean-step, rm -f vendor/google/apps/Talk/res/drawable/%*) -$(call add-clean-step, rm -rf $(OUT_DIR)/product/*/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/android_os_NetStat.o) -$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates) -$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/*/obj/SHARED_LIBRARIES/libjni_andpyime_intermediates) -$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/*/obj/SHARED_LIBRARIES/share) - -# ************************************************ -# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST -# ************************************************ diff --git a/core/Makefile b/core/Makefile deleted file mode 100644 index 298362869..000000000 --- a/core/Makefile +++ /dev/null @@ -1,1162 +0,0 @@ -# Put some miscellaneous rules here - -# Pick a reasonable string to use to identify files. -ifneq "" "$(filter eng.%,$(BUILD_NUMBER))" - # BUILD_NUMBER has a timestamp in it, which means that - # it will change every time. Pick a stable value. - FILE_NAME_TAG := eng.$(USER) -else - FILE_NAME_TAG := $(BUILD_NUMBER) -endif - -# ----------------------------------------------------------------- -# Define rules to copy PRODUCT_COPY_FILES defined by the product. -# PRODUCT_COPY_FILES contains words like :. -# is relative to $(PRODUCT_OUT), so it should look like, -# e.g., "system/etc/file.xml". -$(foreach cf,$(PRODUCT_COPY_FILES), \ - $(eval _w := $(subst :,$(space),$(cf))) \ - $(eval _src := $(word 1,$(_w))) \ - $(eval _dest := $(subst //,/,$(PRODUCT_OUT)/$(word 2,$(_w)))) \ - $(eval $(call copy-one-file,$(_src),$(_dest))) \ - $(eval ALL_DEFAULT_INSTALLED_MODULES += $(_dest)) \ - ) - -# ----------------------------------------------------------------- -# docs/index.html -gen := $(OUT_DOCS)/index.html -ALL_DOCS += $(gen) -$(gen): frameworks/base/docs/docs-redirect-index.html - @mkdir -p $(dir $@) - @cp -f $< $@ - -# ----------------------------------------------------------------- -# default.prop -INSTALLED_DEFAULT_PROP_TARGET := $(TARGET_ROOT_OUT)/default.prop -ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_DEFAULT_PROP_TARGET) -ADDITIONAL_DEFAULT_PROPERTIES := \ - $(call collapse-pairs, $(ADDITIONAL_DEFAULT_PROPERTIES)) - -$(INSTALLED_DEFAULT_PROP_TARGET): - @echo Target buildinfo: $@ - @mkdir -p $(dir $@) - $(hide) echo "#" > $@; \ - echo "# ADDITIONAL_DEFAULT_PROPERTIES" >> $@; \ - echo "#" >> $@; - $(hide) $(foreach line,$(ADDITIONAL_DEFAULT_PROPERTIES), \ - echo "$(line)" >> $@;) - -# ----------------------------------------------------------------- -# build.prop -INSTALLED_BUILD_PROP_TARGET := $(TARGET_OUT)/build.prop -ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_BUILD_PROP_TARGET) -ADDITIONAL_BUILD_PROPERTIES := \ - $(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES)) - -# A list of arbitrary tags describing the build configuration. -# Force ":=" so we can use += -BUILD_VERSION_TAGS := $(BUILD_VERSION_TAGS) -ifeq ($(TARGET_BUILD_TYPE),debug) - BUILD_VERSION_TAGS += debug -endif -# Apps are always signed with test keys, and may be re-signed in a post-build -# step. If that happens, the "test-keys" tag will be removed by that step. -BUILD_VERSION_TAGS += test-keys -ifndef INCLUDE_TEST_OTA_KEYS - BUILD_VERSION_TAGS += ota-rel-keys -endif -BUILD_VERSION_TAGS := $(subst $(space),$(comma),$(sort $(BUILD_VERSION_TAGS))) - -# A human-readable string that descibes this build in detail. -build_desc := $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT) $(PLATFORM_VERSION) $(BUILD_ID) $(BUILD_NUMBER) $(BUILD_VERSION_TAGS) -$(INSTALLED_BUILD_PROP_TARGET): PRIVATE_BUILD_DESC := $(build_desc) - -# The string used to uniquely identify this build; used by the OTA server. -ifeq (,$(strip $(BUILD_FINGERPRINT))) - BUILD_FINGERPRINT := $(PRODUCT_BRAND)/$(TARGET_PRODUCT)/$(TARGET_DEVICE)/$(TARGET_BOOTLOADER_BOARD_NAME):$(PLATFORM_VERSION)/$(BUILD_ID)/$(BUILD_NUMBER):$(TARGET_BUILD_VARIANT)/$(BUILD_VERSION_TAGS) -endif -ifneq ($(words $(BUILD_FINGERPRINT)),1) - $(error BUILD_FINGERPRINT cannot contain spaces: "$(BUILD_FINGERPRINT)") -endif - -# Selects the first locale in the list given as the argument, -# and splits it into language and region, which each may be -# empty. -define default-locale -$(subst _, , $(firstword $(1))) -endef - -# Selects the first locale in the list given as the argument -# and returns the language (or the region) -define default-locale-language -$(word 2, 2, $(call default-locale, $(1))) -endef -define default-locale-region -$(word 3, 3, $(call default-locale, $(1))) -endef - -BUILDINFO_SH := build/tools/buildinfo.sh -$(INSTALLED_BUILD_PROP_TARGET): $(BUILDINFO_SH) $(INTERNAL_BUILD_ID_MAKEFILE) - @echo Target buildinfo: $@ - @mkdir -p $(dir $@) - $(hide) TARGET_BUILD_TYPE="$(TARGET_BUILD_VARIANT)" \ - TARGET_DEVICE="$(TARGET_DEVICE)" \ - PRODUCT_NAME="$(TARGET_PRODUCT)" \ - PRODUCT_BRAND="$(PRODUCT_BRAND)" \ - PRODUCT_DEFAULT_LANGUAGE="$(call default-locale-language,$(PRODUCT_LOCALES))" \ - PRODUCT_DEFAULT_REGION="$(call default-locale-region,$(PRODUCT_LOCALES))" \ - PRODUCT_MODEL="$(PRODUCT_MODEL)" \ - PRODUCT_MANUFACTURER="$(PRODUCT_MANUFACTURER)" \ - PRIVATE_BUILD_DESC="$(PRIVATE_BUILD_DESC)" \ - BUILD_ID="$(BUILD_ID)" \ - BUILD_DISPLAY_ID="$(BUILD_DISPLAY_ID)" \ - BUILD_NUMBER="$(BUILD_NUMBER)" \ - PLATFORM_VERSION="$(PLATFORM_VERSION)" \ - PLATFORM_SDK_VERSION="$(PLATFORM_SDK_VERSION)" \ - BUILD_VERSION_TAGS="$(BUILD_VERSION_TAGS)" \ - TARGET_BOOTLOADER_BOARD_NAME="$(TARGET_BOOTLOADER_BOARD_NAME)" \ - BUILD_FINGERPRINT="$(BUILD_FINGERPRINT)" \ - TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" \ - bash $(BUILDINFO_SH) > $@ - $(hide) if [ -f $(TARGET_DEVICE_DIR)/system.prop ]; then \ - cat $(TARGET_DEVICE_DIR)/system.prop >> $@; \ - fi - $(if $(ADDITIONAL_BUILD_PROPERTIES), \ - $(hide) echo >> $@; \ - echo "#" >> $@; \ - echo "# ADDITIONAL_BUILD_PROPERTIES" >> $@; \ - echo "#" >> $@; ) - $(hide) $(foreach line,$(ADDITIONAL_BUILD_PROPERTIES), \ - echo "$(line)" >> $@;) - -build_desc := - -# ----------------------------------------------------------------- -# sdk-build.prop -# -# There are certain things in build.prop that we don't want to -# ship with the sdk; remove them. - -# This must be a list of entire property keys followed by -# "=" characters, without any internal spaces. -sdk_build_prop_remove := \ - ro.build.user= \ - ro.build.host= \ - ro.product.brand= \ - ro.product.manufacturer= \ - ro.product.device= -# TODO: Remove this soon-to-be obsolete property -sdk_build_prop_remove += ro.build.product= -INSTALLED_SDK_BUILD_PROP_TARGET := $(PRODUCT_OUT)/sdk/sdk-build.prop -$(INSTALLED_SDK_BUILD_PROP_TARGET): $(INSTALLED_BUILD_PROP_TARGET) - @echo SDK buildinfo: $@ - @mkdir -p $(dir $@) - $(hide) grep -v "$(subst $(space),\|,$(strip \ - $(sdk_build_prop_remove)))" $< > $@.tmp - $(hide) for x in $(sdk_build_prop_remove); do \ - echo "$$x"generic >> $@.tmp; done - $(hide) mv $@.tmp $@ - -# ----------------------------------------------------------------- -# package stats -PACKAGE_STATS_FILE := $(PRODUCT_OUT)/package-stats.txt -PACKAGES_TO_STAT := \ - $(sort $(filter $(TARGET_OUT)/% $(TARGET_OUT_DATA)/%, \ - $(filter %.jar %.apk, $(ALL_DEFAULT_INSTALLED_MODULES)))) -$(PACKAGE_STATS_FILE): $(PACKAGES_TO_STAT) - @echo Package stats: $@ - @mkdir -p $(dir $@) - $(hide) rm -f $@ - $(hide) build/tools/dump-package-stats $^ > $@ - -.PHONY: package-stats -package-stats: $(PACKAGE_STATS_FILE) - -# ----------------------------------------------------------------- -# Cert-to-package mapping. Used by the post-build signing tools. -name := $(TARGET_PRODUCT) -ifeq ($(TARGET_BUILD_TYPE),debug) - name := $(name)_debug -endif -name := $(name)-apkcerts-$(FILE_NAME_TAG) -intermediates := \ - $(call intermediates-dir-for,PACKAGING,apkcerts) -APKCERTS_FILE := $(intermediates)/$(name).txt -# Depending on the built packages isn't exactly right, -# but it should guarantee that the apkcerts file is rebuilt -# if any packages change which certs they're signed with. -all_built_packages := $(foreach p,$(PACKAGES),$(ALL_MODULES.$(p).BUILT)) -$(APKCERTS_FILE): $(all_built_packages) - @echo APK certs list: $@ - @mkdir -p $(dir $@) - @rm -f $@ - $(hide) $(foreach p,$(PACKAGES),\ - echo 'name="$(p).apk" certificate="$(PACKAGES.$(p).CERTIFICATE)" \ - private_key="$(PACKAGES.$(p).PRIVATE_KEY)"' >> $@;) - -.PHONY: apkcerts-list -apkcerts-list: $(APKCERTS_FILE) - -# ----------------------------------------------------------------- -# module info file -ifdef CREATE_MODULE_INFO_FILE - MODULE_INFO_FILE := $(PRODUCT_OUT)/module-info.txt - $(info Generating $(MODULE_INFO_FILE)...) - $(shell rm -f $(MODULE_INFO_FILE)) - $(foreach m,$(ALL_MODULES), \ - $(shell echo "NAME=\"$(m)\"" \ - "PATH=\"$(strip $(ALL_MODULES.$(m).PATH))\"" \ - "TAGS=\"$(strip $(filter-out _%,$(ALL_MODULES.$(m).TAGS)))\"" \ - "BUILT=\"$(strip $(ALL_MODULES.$(m).BUILT))\"" \ - "INSTALLED=\"$(strip $(ALL_MODULES.$(m).INSTALLED))\"" >> $(MODULE_INFO_FILE))) -endif - -# Rules that need to be present for the simulator, even -# if they don't do anything. -.PHONY: systemimage -systemimage: - -ifneq ($(TARGET_SIMULATOR),true) - -# ################################################################# -# Targets for boot/OS images -# ################################################################# - -# ----------------------------------------------------------------- -# the ramdisk -INTERNAL_RAMDISK_FILES := $(filter $(TARGET_ROOT_OUT)/%, \ - $(ALL_PREBUILT) \ - $(ALL_COPIED_HEADERS) \ - $(ALL_GENERATED_SOURCES) \ - $(ALL_DEFAULT_INSTALLED_MODULES)) - -INSTALLED_RAMDISK_TARGET := $(PRODUCT_OUT)/ramdisk.img -$(INSTALLED_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_RAMDISK_FILES) - $(call pretty,"Target ram disk: $@") - $(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | gzip > $@ - - -ifneq ($(strip $(TARGET_NO_KERNEL)),true) - -# ----------------------------------------------------------------- -# the boot image, which is a collection of other images. -INTERNAL_BOOTIMAGE_ARGS := \ - $(addprefix --second ,$(INSTALLED_2NDBOOTLOADER_TARGET)) \ - --kernel $(INSTALLED_KERNEL_TARGET) \ - --ramdisk $(INSTALLED_RAMDISK_TARGET) - -INTERNAL_BOOTIMAGE_FILES := $(filter-out --%,$(INTERNAL_BOOTIMAGE_ARGS)) - -BOARD_KERNEL_CMDLINE := $(strip $(BOARD_KERNEL_CMDLINE)) -ifdef BOARD_KERNEL_CMDLINE - INTERNAL_BOOTIMAGE_ARGS += --cmdline "$(BOARD_KERNEL_CMDLINE)" -endif - -INSTALLED_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/boot.img - -ifeq ($(TARGET_BOOTIMAGE_USE_EXT2),true) -tmp_dir_for_image := $(call intermediates-dir-for,EXECUTABLES,boot_img)/bootimg -INTERNAL_BOOTIMAGE_ARGS += --tmpdir $(tmp_dir_for_image) -INTERNAL_BOOTIMAGE_ARGS += --genext2fs $(MKEXT2IMG) -$(INSTALLED_BOOTIMAGE_TARGET): $(MKEXT2IMG) $(INTERNAL_BOOTIMAGE_FILES) - $(call pretty,"Target boot image: $@") - $(hide) $(MKEXT2BOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) --output $@ - -else # TARGET_BOOTIMAGE_USE_EXT2 != true - -$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) - $(call pretty,"Target boot image: $@") - $(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) --output $@ - $(hide) $(call assert-max-file-size,$@,$(BOARD_BOOTIMAGE_MAX_SIZE)) -endif # TARGET_BOOTIMAGE_USE_EXT2 - -else # TARGET_NO_KERNEL -# HACK: The top-level targets depend on the bootimage. Not all targets -# can produce a bootimage, though, and emulator targets need the ramdisk -# instead. Fake it out by calling the ramdisk the bootimage. -# TODO: make the emulator use bootimages, and make mkbootimg accept -# kernel-less inputs. -INSTALLED_BOOTIMAGE_TARGET := $(INSTALLED_RAMDISK_TARGET) -endif - -# ----------------------------------------------------------------- -# NOTICE files -# -# This needs to be before the systemimage rules, because it adds to -# ALL_DEFAULT_INSTALLED_MODULES, which those use to pick which files -# go into the systemimage. - -.PHONY: notice_files - -# Create the rule to combine the files into text and html forms -# $(1) - Plain text output file -# $(2) - HTML output file -# $(3) - File title -# $(4) - Directory to use. Notice files are all $(4)/src. Other -# directories in there will be used for scratch -# $(5) - Dependencies for the output files -# -# The algorithm here is that we go collect a hash for each of the notice -# files and write the names of the files that match that hash. Then -# to generate the real files, we go print out all of the files and their -# hashes. -# -# These rules are fairly complex, so they depend on this makefile so if -# it changes, they'll run again. -# -# TODO: We could clean this up so that we just record the locations of the -# original notice files instead of making rules to copy them somwehere. -# Then we could traverse that without quite as much bash drama. -define combine-notice-files -$(1) $(2): PRIVATE_MESSAGE := $(3) -$(1) $(2) $(4)/hash-timestamp: PRIVATE_DIR := $(4) -$(4)/hash-timestamp: $(5) $(BUILD_SYSTEM)/Makefile - @echo Finding NOTICE files: $$@ - $$(hide) rm -rf $$@ $$(PRIVATE_DIR)/hash - $$(hide) mkdir -p $$(PRIVATE_DIR)/hash - $$(hide) for file in $$$$(find $$(PRIVATE_DIR)/src -type f); do \ - hash=$$$$($(MD5SUM) $$$$file | sed -e "s/ .*//"); \ - hashfile=$$(PRIVATE_DIR)/hash/$$$$hash; \ - echo $$$$file >> $$$$hashfile; \ - done - $$(hide) touch $$@ -$(1): $(4)/hash-timestamp - @echo Combining NOTICE files: $$@ - $$(hide) mkdir -p $$(dir $$@) - $$(hide) echo $$(PRIVATE_MESSAGE) > $$@ - $$(hide) find $$(PRIVATE_DIR)/hash -type f | xargs cat | sort | \ - sed -e "s:$$(PRIVATE_DIR)/src\(.*\)\.txt: \1:" >> $$@ - $$(hide) echo >> $$@ - $$(hide) echo >> $$@ - $$(hide) echo >> $$@ - $$(hide) for hashfile in $$$$(find $$(PRIVATE_DIR)/hash -type f); do \ - echo "============================================================"\ - >> $$@; \ - echo "Notices for file(s):" >> $$@; \ - cat $$$$hashfile | sort | \ - sed -e "s:$$(PRIVATE_DIR)/src\(.*\)\.txt: \1:" >> \ - $$@; \ - echo "------------------------------------------------------------"\ - >> $$@; \ - echo >> $$@; \ - orig=$$$$(head -n 1 $$$$hashfile); \ - cat $$$$orig >> $$@; \ - echo >> $$@; \ - echo >> $$@; \ - echo >> $$@; \ - done -$(2): $(4)/hash-timestamp - @echo Combining NOTICE files: $$@ - $$(hide) mkdir -p $$(dir $$@) - $$(hide) echo "" > $$@ - $$(hide) echo "" >> $$@ - $$(hide) echo "" >> $$@ - $$(hide) echo "" \ - >> $$@ - $$(hide) for hashfile in $$$$(find $$(PRIVATE_DIR)/hash -type f); do \ - cat $$$$hashfile | sort | \ - sed -e "s:$$(PRIVATE_DIR)/src\(.*\)\.txt: :" >> \ - $$@; \ - echo "" >> $$@; \ - echo >> $$@; \ - echo >> $$@; \ - echo >> $$@; \ - done - $$(hide) echo "
" >> $$@; \ - echo "
Notices for file(s):
" >> $$@; \ - echo "
" >> $$@; \ - cat $$$$hashfile | sort | \ - sed -e "s:$$(PRIVATE_DIR)/src\(.*\)\.txt: \1
:" >> $$@; \ - echo "
" >> $$@; \ - echo >> $$@; \ - orig=$$$$(head -n 1 $$$$hashfile); \ - echo "
" >> $$@; \
-			cat $$$$orig | sed -e "s/\&/\&/g" | sed -e "s//\>/g" >> $$@; \
-			echo "
" >> $$@; \ - echo "
" >> $$@ - $$(hide) echo "" >> $$@ -notice_files: $(1) $(2) -endef - -# TODO These intermediate NOTICE.txt/NOTICE.html files should go into -# TARGET_OUT_NOTICE_FILES now that the notice files are gathered from -# the src subdirectory. - -target_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE.txt -target_notice_file_html := $(TARGET_OUT_INTERMEDIATES)/NOTICE.html -target_notice_file_html_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE.html.gz -tools_notice_file_txt := $(HOST_OUT_INTERMEDIATES)/NOTICE.txt -tools_notice_file_html := $(HOST_OUT_INTERMEDIATES)/NOTICE.html - -kernel_notice_file := $(TARGET_OUT_NOTICE_FILES)/src/kernel.txt - -$(eval $(call combine-notice-files, \ - $(target_notice_file_txt), \ - $(target_notice_file_html), \ - "Notices for files contained in the filesystem images in this directory:", \ - $(TARGET_OUT_NOTICE_FILES), \ - $(ALL_DEFAULT_INSTALLED_MODULES) $(kernel_notice_file))) - -$(eval $(call combine-notice-files, \ - $(tools_notice_file_txt), \ - $(tools_notice_file_html), \ - "Notices for files contained in the tools directory:", \ - $(HOST_OUT_NOTICE_FILES), \ - $(ALL_DEFAULT_INSTALLED_MODULES))) - -# Install the html file at /system/etc/NOTICE.html.gz. -# This is not ideal, but this is very late in the game, after a lot of -# the module processing has already been done -- in fact, we used the -# fact that all that has been done to get the list of modules that we -# need notice files for. -$(target_notice_file_html_gz): $(target_notice_file_html) - gzip -c $< > $@ -installed_notice_html_gz := $(TARGET_OUT)/etc/NOTICE.html.gz -$(installed_notice_html_gz): $(target_notice_file_html_gz) | $(ACP) - $(copy-file-to-target) -ALL_DEFAULT_INSTALLED_MODULES += $(installed_notice_html_gz) - -# The kernel isn't really a module, so to get its module file in there, we -# make the target NOTICE files depend on this particular file too, which will -# then be in the right directory for the find in combine-notice-files to work. -$(kernel_notice_file): \ - prebuilt/$(TARGET_PREBUILT_TAG)/kernel/LINUX_KERNEL_COPYING \ - | $(ACP) - @echo Copying: $@ - $(hide) mkdir -p $(dir $@) - $(hide) $(ACP) $< $@ - - -# ################################################################# -# Targets for user images -# ################################################################# - -ifeq ($(TARGET_USERIMAGES_USE_EXT2),true) -include external/genext2fs/Config.mk -INTERNAL_MKUSERFS := $(MKEXT2IMG) -else -INTERNAL_MKUSERFS := $(MKYAFFS2) -endif - -# ----------------------------------------------------------------- -# system yaffs image -# -# First, the "unoptimized" image, which contains .apk/.jar files -# that contain regular, unoptimized/unverified .dex entries. -# -systemimage_unopt_intermediates := \ - $(call intermediates-dir-for,PACKAGING,systemimage_unopt) -BUILT_SYSTEMIMAGE_UNOPT := $(systemimage_unopt_intermediates)/system.img - -INTERNAL_SYSTEMIMAGE_FILES := $(filter $(TARGET_OUT)/%, \ - $(ALL_PREBUILT) \ - $(ALL_COPIED_HEADERS) \ - $(ALL_GENERATED_SOURCES) \ - $(ALL_DEFAULT_INSTALLED_MODULES)) - -ifeq ($(TARGET_USERIMAGES_USE_EXT2),true) -## generate an ext2 image -# $(1): output file -define build-systemimage-target - @echo "Target system fs image: $(1)" - $(call build-userimage-ext2-target,$(TARGET_OUT),$(1),system,) -endef - -else # TARGET_USERIMAGES_USE_EXT2 != true - -## generate a yaffs2 image -# $(1): output file -define build-systemimage-target - @echo "Target system fs image: $(1)" - @mkdir -p $(dir $(1)) - $(hide) $(MKYAFFS2) -f $(TARGET_OUT) $(1) -endef -endif # TARGET_USERIMAGES_USE_EXT2 - -$(BUILT_SYSTEMIMAGE_UNOPT): $(INTERNAL_SYSTEMIMAGE_FILES) $(INTERNAL_MKUSERFS) - $(call build-systemimage-target,$@) - -# The installed image, which may be optimized or unoptimized. -# -INSTALLED_SYSTEMIMAGE := $(PRODUCT_OUT)/system.img - -ifdef WITH_DEXPREOPT - ifndef DISABLE_DEXPREOPT - with_dexpreopt := true - endif -endif -ifdef with_dexpreopt - # This file will set BUILT_SYSTEMIMAGE and SYSTEMIMAGE_SOURCE_DIR - include build/tools/dexpreopt/Config.mk -else - BUILT_SYSTEMIMAGE := $(BUILT_SYSTEMIMAGE_UNOPT) - SYSTEMIMAGE_SOURCE_DIR := $(TARGET_OUT) -endif - -$(INSTALLED_SYSTEMIMAGE): $(BUILT_SYSTEMIMAGE) | $(ACP) - @echo "Install system fs image: $@" - $(copy-file-to-target) - $(hide) $(call assert-max-file-size,$@,$(BOARD_SYSTEMIMAGE_MAX_SIZE)) - -systemimage: $(INSTALLED_SYSTEMIMAGE) - -.PHONY: systemimage-nodeps snod -systemimage-nodeps snod: $(filter-out systemimage-nodeps snod,$(MAKECMDGOALS)) \ - | $(INTERNAL_MKUSERFS) - @echo "make $@: ignoring dependencies" - $(call build-systemimage-target,$(INSTALLED_SYSTEMIMAGE)) - $(hide) $(call assert-max-file-size,$(INSTALLED_SYSTEMIMAGE),$(BOARD_SYSTEMIMAGE_MAX_SIZE)) - -####### -## system tarball -define build-systemtarball-target - $(call pretty,"Target system fs tarball: $(INSTALLED_SYSTEMTARBALL_TARGET)") - $(MKTARBALL) $(FS_GET_STATS) \ - $(PRODUCT_OUT) system $(PRIVATE_SYSTEM_TAR) \ - $(INSTALLED_SYSTEMTARBALL_TARGET) -endef - -system_tar := $(PRODUCT_OUT)/system.tar -INSTALLED_SYSTEMTARBALL_TARGET := $(system_tar).bz2 -$(INSTALLED_SYSTEMTARBALL_TARGET): PRIVATE_SYSTEM_TAR := $(system_tar) -$(INSTALLED_SYSTEMTARBALL_TARGET): $(FS_GET_STATS) $(INTERNAL_SYSTEMIMAGE_FILES) - $(build-systemtarball-target) - -.PHONY: systemtarball-nodeps -systemtarball-nodeps: $(FS_GET_STATS) \ - $(filter-out systemtarball-nodeps stnod,$(MAKECMDGOALS)) - $(build-systemtarball-target) - -.PHONY: stnod -stnod: systemtarball-nodeps - - -# ----------------------------------------------------------------- -# data partition image -INTERNAL_USERDATAIMAGE_FILES := \ - $(filter $(TARGET_OUT_DATA)/%,$(ALL_DEFAULT_INSTALLED_MODULES)) - -ifeq ($(TARGET_USERIMAGES_USE_EXT2),true) -## Generate an ext2 image -define build-userdataimage-target - $(call pretty,"Target userdata fs image: $(INSTALLED_USERDATAIMAGE_TARGET)") - @mkdir -p $(TARGET_OUT_DATA) - $(call build-userimage-ext2-target,$(TARGET_OUT_DATA),$(INSTALLED_USERDATAIMAGE_TARGET),userdata,) - $(hide) $(call assert-max-file-size,$(INSTALLED_USERDATAIMAGE_TARGET),$(BOARD_USERDATAIMAGE_MAX_SIZE)) -endef - -else # TARGET_USERIMAGES_USE_EXT2 != true - -## Generate a yaffs2 image -define build-userdataimage-target - $(call pretty,"Target userdata fs image: $(INSTALLED_USERDATAIMAGE_TARGET)") - @mkdir -p $(TARGET_OUT_DATA) - $(hide) $(MKYAFFS2) -f $(TARGET_OUT_DATA) $(INSTALLED_USERDATAIMAGE_TARGET) - $(hide) $(call assert-max-file-size,$(INSTALLED_USERDATAIMAGE_TARGET),$(BOARD_USERDATAIMAGE_MAX_SIZE)) -endef -endif # TARGET_USERIMAGES_USE_EXT2 - -INSTALLED_USERDATAIMAGE_TARGET := $(PRODUCT_OUT)/userdata.img -$(INSTALLED_USERDATAIMAGE_TARGET): $(INTERNAL_MKUSERFS) \ - $(INTERNAL_USERDATAIMAGE_FILES) - $(build-userdataimage-target) - -.PHONY: userdataimage-nodeps -userdataimage-nodeps: $(INTERNAL_MKUSERFS) - $(build-userdataimage-target) - -####### -## data partition tarball -define build-userdatatarball-target - $(call pretty,"Target userdata fs tarball: " \ - "$(INSTALLED_USERDATATARBALL_TARGET)") - $(MKTARBALL) $(FS_GET_STATS) \ - $(PRODUCT_OUT) data $(PRIVATE_USERDATA_TAR) \ - $(INSTALLED_USERDATATARBALL_TARGET) -endef - -userdata_tar := $(PRODUCT_OUT)/userdata.tar -INSTALLED_USERDATATARBALL_TARGET := $(userdata_tar).bz2 -$(INSTALLED_USERDATATARBALL_TARGET): PRIVATE_USERDATA_TAR := $(userdata_tar) -$(INSTALLED_USERDATATARBALL_TARGET): $(FS_GET_STATS) $(INTERNAL_USERDATAIMAGE_FILES) - $(build-userdatatarball-target) - -.PHONY: userdatatarball-nodeps -userdatatarball-nodeps: $(FS_GET_STATS) - $(build-userdatatarball-target) - - -# If neither TARGET_NO_KERNEL nor TARGET_NO_RECOVERY are true -ifeq (,$(filter true, $(TARGET_NO_KERNEL) $(TARGET_NO_RECOVERY))) - -# ----------------------------------------------------------------- -# Recovery image -INSTALLED_RECOVERYIMAGE_TARGET := $(PRODUCT_OUT)/recovery.img - -recovery_initrc := $(call include-path-for, recovery)/etc/init.rc -recovery_kernel := $(INSTALLED_KERNEL_TARGET) # same as a non-recovery system -recovery_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.img -recovery_build_prop := $(INSTALLED_BUILD_PROP_TARGET) -recovery_binary := $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery -recovery_resources_common := $(call include-path-for, recovery)/res -recovery_resources_private := $(strip $(wildcard $(TARGET_DEVICE_DIR)/recovery/res)) -recovery_resource_deps := $(shell find $(recovery_resources_common) \ - $(recovery_resources_private) -type f) - -ifeq ($(recovery_resources_private),) - $(info No private recovery resources for TARGET_DEVICE $(TARGET_DEVICE)) -endif - -INTERNAL_RECOVERYIMAGE_ARGS := \ - $(addprefix --second ,$(INSTALLED_2NDBOOTLOADER_TARGET)) \ - --kernel $(recovery_kernel) \ - --ramdisk $(recovery_ramdisk) - -# Assumes this has already been stripped -ifdef BOARD_KERNEL_CMDLINE - INTERNAL_RECOVERYIMAGE_ARGS += --cmdline "$(BOARD_KERNEL_CMDLINE)" -endif - -$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTFS) $(MKBOOTIMG) \ - $(INSTALLED_RAMDISK_TARGET) \ - $(INSTALLED_BOOTIMAGE_TARGET) \ - $(recovery_binary) \ - $(recovery_initrc) $(recovery_kernel) \ - $(INSTALLED_2NDBOOTLOADER_TARGET) \ - $(recovery_build_prop) $(recovery_resource_deps) - @echo ----- Making recovery image ------ - rm -rf $(TARGET_RECOVERY_OUT) - mkdir -p $(TARGET_RECOVERY_OUT) - mkdir -p $(TARGET_RECOVERY_ROOT_OUT) - mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/etc - mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/tmp - echo Copying baseline ramdisk... - cp -R $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT) - echo Modifying ramdisk contents... - cp -f $(recovery_initrc) $(TARGET_RECOVERY_ROOT_OUT)/ - cp -f $(recovery_binary) $(TARGET_RECOVERY_ROOT_OUT)/sbin/ - cp -rf $(recovery_resources_common) $(TARGET_RECOVERY_ROOT_OUT)/ - $(foreach item,$(recovery_resources_private), \ - cp -rf $(item) $(TARGET_RECOVERY_ROOT_OUT)/) - cat $(INSTALLED_DEFAULT_PROP_TARGET) $(recovery_build_prop) \ - > $(TARGET_RECOVERY_ROOT_OUT)/default.prop - $(MKBOOTFS) $(TARGET_RECOVERY_ROOT_OUT) | gzip > $(recovery_ramdisk) - $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) --output $@ - @echo ----- Made recovery image -------- $@ - $(hide) $(call assert-max-file-size,$@,$(BOARD_RECOVERYIMAGE_MAX_SIZE)) - -else -INSTALLED_RECOVERYIMAGE_TARGET := -endif - -.PHONY: recoveryimage -recoveryimage: $(INSTALLED_RECOVERYIMAGE_TARGET) - -# ----------------------------------------------------------------- -# bring in the installer image generation defines if necessary -ifeq ($(TARGET_USE_DISKINSTALLER),true) -include bootable/diskinstaller/config.mk -endif - -# ----------------------------------------------------------------- -# OTA update package -name := $(TARGET_PRODUCT) -ifeq ($(TARGET_BUILD_TYPE),debug) - name := $(name)_debug -endif -name := $(name)-ota-$(FILE_NAME_TAG) - -INTERNAL_OTA_PACKAGE_TARGET := $(PRODUCT_OUT)/$(name).zip -INTERNAL_OTA_INTERMEDIATES_DIR := $(call intermediates-dir-for,PACKAGING,ota) - -# If neither TARGET_NO_KERNEL nor TARGET_NO_RECOVERY are true -ifeq (,$(filter true, $(TARGET_NO_KERNEL) $(TARGET_NO_RECOVERY))) -INTERNAL_OTA_RECOVERYIMAGE_TARGET := $(INTERNAL_OTA_INTERMEDIATES_DIR)/system/recovery.img -else -INTERNAL_OTA_RECOVERYIMAGE_TARGET := -endif -INTERNAL_OTA_SCRIPT_TARGET := $(INTERNAL_OTA_INTERMEDIATES_DIR)/META-INF/com/google/android/update-script - -# Sign OTA packages with the test key by default. -# Actual product deliverables will be re-signed by hand. -private_key := $(SRC_TARGET_DIR)/product/security/testkey.pk8 -certificate := $(SRC_TARGET_DIR)/product/security/testkey.x509.pem -$(INTERNAL_OTA_PACKAGE_TARGET): $(private_key) $(certificate) $(SIGNAPK_JAR) -$(INTERNAL_OTA_PACKAGE_TARGET): PRIVATE_PRIVATE_KEY := $(private_key) -$(INTERNAL_OTA_PACKAGE_TARGET): PRIVATE_CERTIFICATE := $(certificate) - -# Depending on INSTALLED_SYSTEMIMAGE guarantees that SYSTEMIMAGE_SOURCE_DIR -# is up-to-date. We use jar instead of zip so that we can use the -C -# switch to avoid cd-ing all over the place. -# TODO: Make our own jar-creation tool to avoid all these shenanigans. -$(INTERNAL_OTA_PACKAGE_TARGET): \ - $(INTERNAL_OTA_SCRIPT_TARGET) \ - $(INTERNAL_OTA_RECOVERYIMAGE_TARGET) \ - $(INSTALLED_BOOTIMAGE_TARGET) \ - $(INSTALLED_RADIOIMAGE_TARGET) \ - $(INSTALLED_ANDROID_INFO_TXT_TARGET) \ - $(INSTALLED_SYSTEMIMAGE) - @echo "Package OTA: $@" - $(hide) rm -rf $@ - $(hide) jar cf $@ \ - $(foreach item, \ - $(INSTALLED_BOOTIMAGE_TARGET) \ - $(INSTALLED_RADIOIMAGE_TARGET) \ - $(INSTALLED_ANDROID_INFO_TXT_TARGET), \ - -C $(dir $(item)) $(notdir $(item))) \ - -C $(INTERNAL_OTA_INTERMEDIATES_DIR) . - $(hide) find $(SYSTEMIMAGE_SOURCE_DIR) -type f -print | \ - sed 's|^$(dir $(SYSTEMIMAGE_SOURCE_DIR))|-C & |' | \ - xargs jar uf $@ - $(hide) if jar tf $@ | egrep '.{65}' >&2; then \ - echo "Path too long (>64 chars) for OTA update" >&2; \ - exit 1; \ - fi - $(sign-package) - -$(INTERNAL_OTA_SCRIPT_TARGET): \ - $(HOST_OUT_EXECUTABLES)/make-update-script \ - $(INSTALLED_ANDROID_INFO_TXT_TARGET) \ - $(INSTALLED_SYSTEMIMAGE) - @mkdir -p $(dir $@) - @rm -rf $@ - @echo "Update script: $@" - $(hide) TARGET_DEVICE=$(TARGET_DEVICE) \ - $< $(SYSTEMIMAGE_SOURCE_DIR) \ - $(INSTALLED_ANDROID_INFO_TXT_TARGET) \ - > $@ - -ifneq (,$(INTERNAL_OTA_RECOVERYIMAGE_TARGET)) -# This copy is so recovery.img can be in /system within the OTA package. -# That way it gets installed into the system image, which in turn installs it. -$(INTERNAL_OTA_RECOVERYIMAGE_TARGET): $(INSTALLED_RECOVERYIMAGE_TARGET) | $(ACP) - @mkdir -p $(dir $@) - $(hide) $(ACP) $< $@ -endif - -.PHONY: otapackage -otapackage: $(INTERNAL_OTA_PACKAGE_TARGET) - -# Keys authorized to sign OTA packages this build will accept. -ifeq ($(INCLUDE_TEST_OTA_KEYS),true) - OTA_PUBLIC_KEYS := \ - $(sort $(SRC_TARGET_DIR)/product/security/testkey.x509.pem $(OTA_PUBLIC_KEYS)) -endif - -ifeq ($(OTA_PUBLIC_KEYS),) - $(error No OTA_PUBLIC_KEYS defined) -endif - -# Build a keystore with the authorized keys in it. -# java/android/android/server/checkin/UpdateVerifier.java uses this. -ALL_DEFAULT_INSTALLED_MODULES += $(TARGET_OUT_ETC)/security/otacerts.zip -$(TARGET_OUT_ETC)/security/otacerts.zip: $(OTA_PUBLIC_KEYS) - $(hide) rm -f $@ - $(hide) mkdir -p $(dir $@) - zip -qj $@ $(OTA_PUBLIC_KEYS) - -# The device does not support JKS. -# $(hide) for f in $(OTA_PUBLIC_KEYS); do \ -# echo "keytool: $@ <= $$f" && \ -# keytool -keystore $@ -storepass $(notdir $@) -noprompt \ -# -import -file $$f -alias $(notdir $$f) || exit 1; \ -# done - -ifdef RECOVERY_INSTALL_OTA_KEYS_INC -# Generate a C-includable file containing the keys. -# RECOVERY_INSTALL_OTA_KEYS_INC is defined by recovery/Android.mk. -# *** THIS IS A TOTAL HACK; EXECUTABLES MUST NOT CHANGE BETWEEN DIFFERENT -# PRODUCTS/BUILD TYPES. *** -# TODO: make recovery read the keys from an external file. -DUMPKEY_JAR := $(HOST_OUT_JAVA_LIBRARIES)/dumpkey.jar -$(RECOVERY_INSTALL_OTA_KEYS_INC): PRIVATE_OTA_PUBLIC_KEYS := $(OTA_PUBLIC_KEYS) -$(RECOVERY_INSTALL_OTA_KEYS_INC): $(OTA_PUBLIC_KEYS) $(DUMPKEY_JAR) - @echo "DumpPublicKey: $@ <= $(PRIVATE_OTA_PUBLIC_KEYS)" - @rm -rf $@ - @mkdir -p $(dir $@) - $(hide) java -jar $(DUMPKEY_JAR) $(PRIVATE_OTA_PUBLIC_KEYS) > $@ -endif - -# ----------------------------------------------------------------- -# A zip of the directories that map to the target filesystem. -# This zip can be used to create an OTA package or filesystem image -# as a post-build step. -# -name := $(TARGET_PRODUCT) -ifeq ($(TARGET_BUILD_TYPE),debug) - name := $(name)_debug -endif -name := $(name)-target_files-$(FILE_NAME_TAG) - -intermediates := $(call intermediates-dir-for,PACKAGING,target_files) -BUILT_TARGET_FILES_PACKAGE := $(intermediates)/$(name).zip -$(BUILT_TARGET_FILES_PACKAGE): intermediates := $(intermediates) -$(BUILT_TARGET_FILES_PACKAGE): \ - zip_root := $(intermediates)/$(name) - -# $(1): Directory to copy -# $(2): Location to copy it to -# The "ls -A" is to prevent "acp s/* d" from failing if s is empty. -define package_files-copy-root - if [ -d "$(strip $(1))" -a "$$(ls -A $(1))" ]; then \ - mkdir -p $(2) && \ - $(ACP) -rd $(strip $(1))/* $(2); \ - fi -endef - -built_ota_tools := \ - $(call intermediates-dir-for,EXECUTABLES,applypatch)/applypatch \ - $(call intermediates-dir-for,EXECUTABLES,check_prereq)/check_prereq -$(BUILT_TARGET_FILES_PACKAGE): PRIVATE_OTA_TOOLS := $(built_ota_tools) - -# Depending on the various images guarantees that the underlying -# directories are up-to-date. -$(BUILT_TARGET_FILES_PACKAGE): \ - $(INTERNAL_OTA_SCRIPT_TARGET) \ - $(INSTALLED_BOOTIMAGE_TARGET) \ - $(INSTALLED_RADIOIMAGE_TARGET) \ - $(INSTALLED_RECOVERYIMAGE_TARGET) \ - $(BUILT_SYSTEMIMAGE) \ - $(INSTALLED_USERDATAIMAGE_TARGET) \ - $(INSTALLED_ANDROID_INFO_TXT_TARGET) \ - $(INTERNAL_OTA_SCRIPT_TARGET) \ - $(built_ota_tools) \ - $(APKCERTS_FILE) \ - | $(ACP) - @echo "Package target files: $@" - $(hide) rm -rf $@ $(zip_root) - $(hide) mkdir -p $(dir $@) $(zip_root) - @# Components of the recovery image - $(hide) mkdir -p $(zip_root)/RECOVERY - $(hide) $(call package_files-copy-root, \ - $(TARGET_RECOVERY_ROOT_OUT),$(zip_root)/RECOVERY/RAMDISK) -ifdef INSTALLED_KERNEL_TARGET - $(hide) $(ACP) $(INSTALLED_KERNEL_TARGET) $(zip_root)/RECOVERY/kernel -endif -ifdef INSTALLED_2NDBOOTLOADER_TARGET - $(hide) $(ACP) \ - $(INSTALLED_2NDBOOTLOADER_TARGET) $(zip_root)/RECOVERY/second -endif -ifdef BOARD_KERNEL_CMDLINE - $(hide) echo "$(BOARD_KERNEL_CMDLINE)" > $(zip_root)/RECOVERY/cmdline -endif - @# Components of the boot image - $(hide) mkdir -p $(zip_root)/BOOT - $(hide) $(call package_files-copy-root, \ - $(TARGET_ROOT_OUT),$(zip_root)/BOOT/RAMDISK) -ifdef INSTALLED_KERNEL_TARGET - $(hide) $(ACP) $(INSTALLED_KERNEL_TARGET) $(zip_root)/BOOT/kernel -endif -ifdef INSTALLED_2NDBOOTLOADER_TARGET - $(hide) $(ACP) \ - $(INSTALLED_2NDBOOTLOADER_TARGET) $(zip_root)/BOOT/second -endif -ifdef BOARD_KERNEL_CMDLINE - $(hide) echo "$(BOARD_KERNEL_CMDLINE)" > $(zip_root)/BOOT/cmdline -endif -ifdef INSTALLED_RADIOIMAGE_TARGET - @# The radio image - $(hide) mkdir -p $(zip_root)/RADIO - $(hide) $(ACP) $(INSTALLED_RADIOIMAGE_TARGET) $(zip_root)/RADIO/image -endif - @# Contents of the system image - $(hide) $(call package_files-copy-root, \ - $(SYSTEMIMAGE_SOURCE_DIR),$(zip_root)/SYSTEM) - @# Contents of the data image - $(hide) $(call package_files-copy-root, \ - $(TARGET_OUT_DATA),$(zip_root)/DATA) - @# Extra contents of the OTA package - $(hide) mkdir -p $(zip_root)/OTA/bin - $(hide) $(call package_files-copy-root, \ - $(INTERNAL_OTA_INTERMEDIATES_DIR),$(zip_root)/OTA) - $(hide) $(ACP) $(INSTALLED_ANDROID_INFO_TXT_TARGET) $(zip_root)/OTA/ - $(hide) $(ACP) $(PRIVATE_OTA_TOOLS) $(zip_root)/OTA/bin/ - @# Files that don't end up in any images, but are necessary to - @# build them. - $(hide) mkdir -p $(zip_root)/META - $(hide) $(ACP) $(APKCERTS_FILE) $(zip_root)/META/apkcerts.txt - @# Zip everything up, preserving symlinks - $(hide) (cd $(zip_root) && zip -qry ../$(notdir $@) .) - -target-files-package: $(BUILT_TARGET_FILES_PACKAGE) - -# ----------------------------------------------------------------- -# installed file list -# Depending on $(INSTALLED_SYSTEMIMAGE) ensures that it -# gets the DexOpt one if we're doing that. -INSTALLED_FILES_FILE := $(PRODUCT_OUT)/installed-files.txt -$(INSTALLED_FILES_FILE): $(INSTALLED_SYSTEMIMAGE) - @echo Installed file list: $@ - @mkdir -p $(dir $@) - @rm -f $@ - $(hide) build/tools/fileslist.py $(TARGET_OUT) $(TARGET_OUT_DATA) > $@ - -.PHONY: installed-file-list -installed-file-list: $(INSTALLED_FILES_FILE) - -# ----------------------------------------------------------------- -# A zip of the tests that are built when running "make tests". -# This is very similar to BUILT_TARGET_FILES_PACKAGE, but we -# only grab SYSTEM and DATA, and it's called "*-tests-*.zip". -# -name := $(TARGET_PRODUCT) -ifeq ($(TARGET_BUILD_TYPE),debug) - name := $(name)_debug -endif -name := $(name)-tests-$(FILE_NAME_TAG) - -intermediates := $(call intermediates-dir-for,PACKAGING,tests_zip) -BUILT_TESTS_ZIP_PACKAGE := $(intermediates)/$(name).zip -$(BUILT_TESTS_ZIP_PACKAGE): intermediates := $(intermediates) -$(BUILT_TESTS_ZIP_PACKAGE): zip_root := $(intermediates)/$(name) - -# Depending on the images guarantees that the underlying -# directories are up-to-date. -$(BUILT_TESTS_ZIP_PACKAGE): \ - $(BUILT_SYSTEMIMAGE) \ - $(INSTALLED_USERDATAIMAGE_TARGET) \ - | $(ACP) - @echo "Package test files: $@" - $(hide) rm -rf $@ $(zip_root) - $(hide) mkdir -p $(dir $@) $(zip_root) - @# Some parts of the system image - $(hide) $(call package_files-copy-root, \ - $(SYSTEMIMAGE_SOURCE_DIR)/xbin,$(zip_root)/SYSTEM/xbin) - $(hide) $(call package_files-copy-root, \ - $(SYSTEMIMAGE_SOURCE_DIR)/lib,$(zip_root)/SYSTEM/lib) - $(hide) $(call package_files-copy-root, \ - $(SYSTEMIMAGE_SOURCE_DIR)/framework, \ - $(zip_root)/SYSTEM/framework) - $(hide) $(ACP) $(SYSTEMIMAGE_SOURCE_DIR)/build.prop $(zip_root)/SYSTEM - @# Contents of the data image - $(hide) $(call package_files-copy-root, \ - $(TARGET_OUT_DATA),$(zip_root)/DATA) - $(hide) (cd $(zip_root) && zip -qry ../$(notdir $@) .) - -tests-zip-package: $(BUILT_TESTS_ZIP_PACKAGE) - -# ----------------------------------------------------------------- -# A zip of the symbols directory. Keep the full paths to make it -# more obvious where these files came from. -# -name := $(TARGET_PRODUCT) -ifeq ($(TARGET_BUILD_TYPE),debug) - name := $(name)_debug -endif -name := $(name)-symbols-$(FILE_NAME_TAG) - -SYMBOLS_ZIP := $(PRODUCT_OUT)/$(name).zip -$(SYMBOLS_ZIP): $(INSTALLED_SYSTEMIMAGE) $(INSTALLED_BOOTIMAGE_TARGET) - @echo "Package symbols: $@" - $(hide) rm -rf $@ - $(hide) mkdir -p $(dir $@) - $(hide) zip -qr $@ $(TARGET_OUT_UNSTRIPPED) - -# ----------------------------------------------------------------- -# A zip of the Android Apps. Not keeping full path so that we don't -# include product names when distributing -# -name := $(TARGET_PRODUCT) -ifeq ($(TARGET_BUILD_TYPE),debug) - name := $(name)_debug -endif -name := $(name)-apps-$(FILE_NAME_TAG) - -APPS_ZIP := $(PRODUCT_OUT)/$(name).zip -$(APPS_ZIP): $(INSTALLED_SYSTEMIMAGE) - @echo "Package apps: $@" - $(hide) rm -rf $@ - $(hide) mkdir -p $(dir $@) - $(hide) zip -qj $@ $(TARGET_OUT_APPS)/* - -endif # TARGET_SIMULATOR != true - -# ----------------------------------------------------------------- -# dalvik something -.PHONY: dalvikfiles -dalvikfiles: $(INTERNAL_DALVIK_MODULES) - -# ----------------------------------------------------------------- -# The update package - -INTERNAL_UPDATE_PACKAGE_FILES += \ - $(INSTALLED_BOOTIMAGE_TARGET) \ - $(INSTALLED_RECOVERYIMAGE_TARGET) \ - $(INSTALLED_SYSTEMIMAGE) \ - $(INSTALLED_USERDATAIMAGE_TARGET) \ - $(INSTALLED_ANDROID_INFO_TXT_TARGET) - -ifneq ($(strip $(INTERNAL_UPDATE_PACKAGE_FILES)),) - -name := $(TARGET_PRODUCT) -ifeq ($(TARGET_BUILD_TYPE),debug) - name := $(name)_debug -endif -name := $(name)-img-$(FILE_NAME_TAG) - -INTERNAL_UPDATE_PACKAGE_TARGET := $(PRODUCT_OUT)/$(name).zip - -$(INTERNAL_UPDATE_PACKAGE_TARGET): $(INTERNAL_UPDATE_PACKAGE_FILES) - @echo "Package: $@" - $(hide) zip -qj $@ $(INTERNAL_UPDATE_PACKAGE_FILES) - -else -INTERNAL_UPDATE_PACKAGE_TARGET := -endif - -# ----------------------------------------------------------------- -# The emulator package - -ifneq ($(TARGET_SIMULATOR),true) - -INTERNAL_EMULATOR_PACKAGE_FILES += \ - $(HOST_OUT_EXECUTABLES)/emulator$(HOST_EXECUTABLE_SUFFIX) \ - prebuilt/android-arm/kernel/kernel-qemu \ - $(INSTALLED_RAMDISK_TARGET) \ - $(INSTALLED_SYSTEMIMAGE) \ - $(INSTALLED_USERDATAIMAGE_TARGET) - -name := $(TARGET_PRODUCT)-emulator-$(FILE_NAME_TAG) - -INTERNAL_EMULATOR_PACKAGE_TARGET := $(PRODUCT_OUT)/$(name).zip - -$(INTERNAL_EMULATOR_PACKAGE_TARGET): $(INTERNAL_EMULATOR_PACKAGE_FILES) - @echo "Package: $@" - $(hide) zip -qj $@ $(INTERNAL_EMULATOR_PACKAGE_FILES) - -endif - -# ----------------------------------------------------------------- -# The pdk package (Platform Development Kit) - -ifneq (,$(filter pdk,$(MAKECMDGOALS))) - include development/pdk/Pdk.mk -endif - -# ----------------------------------------------------------------- -# The SDK - -ifneq ($(TARGET_SIMULATOR),true) - -# The SDK includes host-specific components, so it belongs under HOST_OUT. -sdk_dir := $(HOST_OUT)/sdk - -# Build a name that looks like: -# -# linux-x86 --> android-sdk_12345_linux-x86 -# darwin-x86 --> android-sdk_12345_mac-x86 -# windows-x86 --> android-sdk_12345_windows -# -sdk_name := android-sdk_$(FILE_NAME_TAG) -ifeq ($(HOST_OS),darwin) - sdk_host_os := mac -else - sdk_host_os := $(HOST_OS) -endif -ifneq ($(HOST_OS),windows) - sdk_host_os := $(sdk_host_os)-$(HOST_ARCH) -endif -sdk_name := $(sdk_name)_$(sdk_host_os) - -sdk_dep_file := $(sdk_dir)/sdk_deps.mk - -ATREE_FILES := --include $(sdk_dep_file) - -# if we don't have a real list, then use "everything" -ifeq ($(strip $(ATREE_FILES)),) -ATREE_FILES := \ - $(ALL_PREBUILT) \ - $(ALL_COPIED_HEADERS) \ - $(ALL_GENERATED_SOURCES) \ - $(ALL_DEFAULT_INSTALLED_MODULES) \ - $(INSTALLED_RAMDISK_TARGET) \ - $(ALL_DOCS) \ - $(ALL_SDK_FILES) -endif - -atree_dir := development/build - -sdk_atree_files := \ - $(atree_dir)/sdk.exclude.atree \ - $(atree_dir)/sdk.atree \ - $(atree_dir)/sdk-$(HOST_OS)-$(HOST_ARCH).atree - -deps := \ - $(target_notice_file_txt) \ - $(tools_notice_file_txt) \ - $(OUT_DOCS)/offline-sdk-timestamp \ - $(INTERNAL_UPDATE_PACKAGE_TARGET) \ - $(INSTALLED_SDK_BUILD_PROP_TARGET) \ - $(ATREE_FILES) \ - $(atree_dir)/sdk.atree \ - $(HOST_OUT_EXECUTABLES)/atree \ - $(HOST_OUT_EXECUTABLES)/line_endings - -INTERNAL_SDK_TARGET := $(sdk_dir)/$(sdk_name).zip -$(INTERNAL_SDK_TARGET): PRIVATE_NAME := $(sdk_name) -$(INTERNAL_SDK_TARGET): PRIVATE_DIR := $(sdk_dir)/$(sdk_name) -$(INTERNAL_SDK_TARGET): PRIVATE_DEP_FILE := $(sdk_dep_file) -$(INTERNAL_SDK_TARGET): PRIVATE_INPUT_FILES := $(sdk_atree_files) - -# Set SDK_GNU_ERROR to non-empty to fail when a GNU target is built. -# -#SDK_GNU_ERROR := true - -$(INTERNAL_SDK_TARGET): $(deps) - @echo "Package SDK: $@" - $(hide) rm -rf $(PRIVATE_DIR) $@ - $(hide) for f in $(target_gnu_MODULES); do \ - if [ -f $$f ]; then \ - echo SDK: $(if $(SDK_GNU_ERROR),ERROR:,warning:) \ - including GNU target $$f >&2; \ - FAIL=$(SDK_GNU_ERROR); \ - fi; \ - done; \ - if [ $$FAIL ]; then exit 1; fi - $(hide) ( \ - $(HOST_OUT_EXECUTABLES)/atree \ - $(addprefix -f ,$(PRIVATE_INPUT_FILES)) \ - -m $(PRIVATE_DEP_FILE) \ - -I . \ - -I $(PRODUCT_OUT) \ - -I $(HOST_OUT) \ - -I $(TARGET_COMMON_OUT_ROOT) \ - -v "PLATFORM_NAME=android-$(PLATFORM_VERSION)" \ - -o $(PRIVATE_DIR) && \ - cp -f $(target_notice_file_txt) \ - $(PRIVATE_DIR)/platforms/android-$(PLATFORM_VERSION)/images/NOTICE.txt && \ - cp -f $(tools_notice_file_txt) $(PRIVATE_DIR)/tools/NOTICE.txt && \ - HOST_OUT_EXECUTABLES=$(HOST_OUT_EXECUTABLES) HOST_OS=$(HOST_OS) \ - development/tools/scripts/sdk_clean.sh $(PRIVATE_DIR) && \ - chmod -R ug+rwX $(PRIVATE_DIR) && \ - cd $(dir $@) && zip -rq $(notdir $@) $(PRIVATE_NAME) \ - ) || ( rm -rf $(PRIVATE_DIR) $@ && exit 44 ) - -endif # !simulator - -# ----------------------------------------------------------------- -# Findbugs -INTERNAL_FINDBUGS_XML_TARGET := $(PRODUCT_OUT)/findbugs.xml -INTERNAL_FINDBUGS_HTML_TARGET := $(PRODUCT_OUT)/findbugs.html -$(INTERNAL_FINDBUGS_XML_TARGET): $(ALL_FINDBUGS_FILES) - @echo UnionBugs: $@ - $(hide) prebuilt/common/findbugs/bin/unionBugs $(ALL_FINDBUGS_FILES) \ - > $@ -$(INTERNAL_FINDBUGS_HTML_TARGET): $(INTERNAL_FINDBUGS_XML_TARGET) - @echo ConvertXmlToText: $@ - $(hide) prebuilt/common/findbugs/bin/convertXmlToText -html:fancy.xsl \ - $(INTERNAL_FINDBUGS_XML_TARGET) > $@ - -# ----------------------------------------------------------------- -# Findbugs - -# ----------------------------------------------------------------- -# These are some additional build tasks that need to be run. -include $(sort $(wildcard $(BUILD_SYSTEM)/tasks/*.mk)) diff --git a/core/apicheck_msg_current.txt b/core/apicheck_msg_current.txt deleted file mode 100644 index c277ecdf9..000000000 --- a/core/apicheck_msg_current.txt +++ /dev/null @@ -1,18 +0,0 @@ - -****************************** -You have tried to change the API from what has been previously approved. - -To make these errors go away, you have two choices: - 1) You can add "@hide" javadoc comments to the methods, etc. listed in the - errors above. - - 2) You can update current.xml by executing the following commands: - - p4 edit frameworks/base/api/current.xml - make update-api - - To check in the revised current.xml, you will need OWNERS approval. -****************************** - - - diff --git a/core/apicheck_msg_last.txt b/core/apicheck_msg_last.txt deleted file mode 100644 index 2993157b1..000000000 --- a/core/apicheck_msg_last.txt +++ /dev/null @@ -1,7 +0,0 @@ - -****************************** -You have tried to change the API from what has been previously released in -an SDK. Please fix the errors listed above. -****************************** - - diff --git a/core/armelf.x b/core/armelf.x deleted file mode 100644 index 766fe8862..000000000 --- a/core/armelf.x +++ /dev/null @@ -1,198 +0,0 @@ -/* Default linker script, for normal executables */ -OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", - "elf32-littlearm") -OUTPUT_ARCH(arm) -ENTRY(_start) -SEARCH_DIR("/usr/local/armdev/arm-elf/lib"); -/* Do we need any of these for elf? - __DYNAMIC = 0; */ -SECTIONS -{ - /* Read-only sections, merged into text segment: */ -/* PROVIDE (__executable_start = 0x8000); . = 0x8000; */ -. = 0x8000 + SIZEOF_HEADERS; - .interp : { *(.interp) } - .hash : { *(.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .gnu.version : { *(.gnu.version) } - .gnu.version_d : { *(.gnu.version_d) } - .gnu.version_r : { *(.gnu.version_r) } - .rel.init : { *(.rel.init) } - .rela.init : { *(.rela.init) } - .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } - .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } - .rel.fini : { *(.rel.fini) } - .rela.fini : { *(.rela.fini) } - .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } - .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } - .rel.data.rel.ro : { *(.rel.data.rel.ro*) } - .rela.data.rel.ro : { *(.rel.data.rel.ro*) } - .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } - .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } - .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } - .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } - .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } - .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } - .rel.ctors : { *(.rel.ctors) } - .rela.ctors : { *(.rela.ctors) } - .rel.dtors : { *(.rel.dtors) } - .rela.dtors : { *(.rela.dtors) } - .rel.got : { *(.rel.got) } - .rela.got : { *(.rela.got) } - .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } - .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } - .rel.plt : { *(.rel.plt) } - .rela.plt : { *(.rela.plt) } - .init : - { - KEEP (*(.init)) - } =0 - .plt : { *(.plt) } - .text : - { - *(.text .stub .text.* .gnu.linkonce.t.*) - KEEP (*(.text.*personality*)) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - *(.glue_7t) *(.glue_7) - } =0 - .fini : - { - KEEP (*(.fini)) - } =0 - PROVIDE (__etext = .); - PROVIDE (_etext = .); - PROVIDE (etext = .); - .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } - .rodata1 : { *(.rodata1) } - /* We have to wrap extab and exidx sections with KEEP because we use - --gc-sections. */ - .ARM.extab : { KEEP (*(.ARM.extab* .gnu.linkonce.armextab.*)) } - __exidx_start = .; - .ARM.exidx : { KEEP (*(.ARM.exidx* .gnu.linkonce.armexidx.*)) } - __exidx_end = .; - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } - .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } - /* Adjust the address for the data segment. We want to align at exactly - a page boundary to make life easier for apriori. */ - . = ALIGN(4096); - /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } - .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } - /* Thread Local Storage sections */ - .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } - .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE (__preinit_array_start = .); - .preinit_array : { KEEP (*(.preinit_array)) } - PROVIDE (__preinit_array_end = .); - PROVIDE (__init_array_start = .); - .init_array : { KEEP (*(.init_array)) } - PROVIDE (__init_array_end = .); - PROVIDE (__fini_array_start = .); - .fini_array : { KEEP (*(.fini_array)) } - PROVIDE (__fini_array_end = .); - .ctors : - { - /* gcc uses crtbegin.o to find the start of - the constructors, so we make sure it is - first. Because this is a wildcard, it - doesn't matter if the user does not - actually link against crtbegin.o; the - linker won't look for a file to match a - wildcard. The wildcard also means that it - doesn't matter which directory crtbegin.o - is in. */ - KEEP (*crtbegin*.o(.ctors)) - /* We don't want to include the .ctor section from - from the crtend.o file until after the sorted ctors. - The .ctor section from the crtend file contains the - end of ctors marker and it must be last */ - KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors)) - KEEP (*(SORT(.ctors.*))) - KEEP (*(.ctors)) - } - .dtors : - { - KEEP (*crtbegin*.o(.dtors)) - KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors)) - KEEP (*(SORT(.dtors.*))) - KEEP (*(.dtors)) - } - .jcr : { KEEP (*(.jcr)) } - .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) } - .dynamic : { *(.dynamic) } - .got : { *(.got.plt) *(.got) } - .data : - { - __data_start = . ; - *(.data .data.* .gnu.linkonce.d.*) - KEEP (*(.gnu.linkonce.d.*personality*)) - SORT(CONSTRUCTORS) - } - .data1 : { *(.data1) } - _edata = .; - PROVIDE (edata = .); - __bss_start = .; - __bss_start__ = .; - .bss : - { - *(.dynbss) - *(.bss .bss.* .gnu.linkonce.b.*) - *(COMMON) - /* Align here to ensure that the .bss section occupies space up to - _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); - } - . = ALIGN(32 / 8); - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } - .stack 0x80000 : - { - _stack = .; - *(.stack) - } - .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) } -} diff --git a/core/armelf.xsc b/core/armelf.xsc deleted file mode 100644 index 425305491..000000000 --- a/core/armelf.xsc +++ /dev/null @@ -1,201 +0,0 @@ -/* Script for --shared -z combreloc: shared library, combine & sort relocs */ -OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", - "elf32-littlearm") -OUTPUT_ARCH(arm) -ENTRY(_start) -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - . = 0 + SIZEOF_HEADERS; - .hash : { *(.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .gnu.version : { *(.gnu.version) } - .gnu.version_d : { *(.gnu.version_d) } - .gnu.version_r : { *(.gnu.version_r) } - .rel.dyn : - { - *(.rel.init) - *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) - *(.rel.fini) - *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) - *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) - *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) - *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) - *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) - *(.rel.ctors) - *(.rel.dtors) - *(.rel.got) - *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) - } - .rela.dyn : - { - *(.rela.init) - *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) - *(.rela.fini) - *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) - *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) - *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) - *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) - *(.rela.ctors) - *(.rela.dtors) - *(.rela.got) - *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) - } - .rel.plt : { *(.rel.plt) } - .rela.plt : { *(.rela.plt) } - .init : - { - KEEP (*(.init)) - } =0 - .plt : { *(.plt) } - .text : - { - *(.text .stub .text.* .gnu.linkonce.t.*) - KEEP (*(.text.*personality*)) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - *(.glue_7t) *(.glue_7) - } =0 - .fini : - { - KEEP (*(.fini)) - } =0 - PROVIDE (__etext = .); - PROVIDE (_etext = .); - PROVIDE (etext = .); - .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } - .rodata1 : { *(.rodata1) } - /* We have to wrap extab and exidx sections with KEEP because we use - --gc-sections. */ - .ARM.extab : { KEEP (*(.ARM.extab* .gnu.linkonce.armextab.*)) } - __exidx_start = .; - .ARM.exidx : { KEEP (*(.ARM.exidx* .gnu.linkonce.armexidx.*)) } - __exidx_end = .; - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } - .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } - /* Adjust the address for the data segment. We want to align at exactly - a page boundary to make life easier for apriori. */ - . = ALIGN(4096); - /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } - .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } - /* Thread Local Storage sections */ - .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } - .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } - .preinit_array : - { - KEEP (*(.preinit_array)) - } - .init_array : - { - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array)) - } - .fini_array : - { - KEEP (*(.fini_array)) - KEEP (*(SORT(.fini_array.*))) - } - .ctors : - { - /* gcc uses crtbegin.o to find the start of - the constructors, so we make sure it is - first. Because this is a wildcard, it - doesn't matter if the user does not - actually link against crtbegin.o; the - linker won't look for a file to match a - wildcard. The wildcard also means that it - doesn't matter which directory crtbegin.o - is in. */ - KEEP (*crtbegin*.o(.ctors)) - /* We don't want to include the .ctor section from - the crtend.o file until after the sorted ctors. - The .ctor section from the crtend file contains the - end of ctors marker and it must be last */ - KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors)) - KEEP (*(SORT(.ctors.*))) - KEEP (*(.ctors)) - } - .dtors : - { - KEEP (*crtbegin*.o(.dtors)) - KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors)) - KEEP (*(SORT(.dtors.*))) - KEEP (*(.dtors)) - } - .jcr : { KEEP (*(.jcr)) } - .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) } - .dynamic : { *(.dynamic) } - .got : { *(.got.plt) *(.got) } - .data : - { - __data_start = . ; - *(.data .data.* .gnu.linkonce.d.*) - KEEP (*(.gnu.linkonce.d.*personality*)) - SORT(CONSTRUCTORS) - } - .data1 : { *(.data1) } - _edata = .; PROVIDE (edata = .); - __bss_start = .; - __bss_start__ = .; - .bss : - { - *(.dynbss) - *(.bss .bss.* .gnu.linkonce.b.*) - *(COMMON) - /* Align here to ensure that the .bss section occupies space up to - _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. - FIXME: Why do we need it? When there is no .bss section, we don't - pad the .data section. */ - . = ALIGN(. != 0 ? 32 / 8 : 1); - } - _bss_end__ = . ; __bss_end__ = . ; - . = ALIGN(32 / 8); - . = ALIGN(32 / 8); - __end__ = . ; - _end = .; PROVIDE (end = .); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } - .stack 0x80000 : - { - _stack = .; - *(.stack) - } - .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) } - /DISCARD/ : { *(.note.GNU-stack) } -} diff --git a/core/armelflib.x b/core/armelflib.x deleted file mode 100644 index 0150e02d1..000000000 --- a/core/armelflib.x +++ /dev/null @@ -1,164 +0,0 @@ -/* Default linker script, for normal executables */ -OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", - "elf32-littlearm") -OUTPUT_ARCH(arm) -ENTRY(_start) -SEARCH_DIR("/usr/local/armdev/arm-elf/lib"); -/* Do we need any of these for elf? - __DYNAMIC = 0; */ -SECTIONS -{ - /* Read-only sections, merged into text segment: */ -/* PROVIDE (__executable_start = 0x8000); . = 0x8000; */ -. = 0 + SIZEOF_HEADERS; - .interp : { *(.interp) } - .init : - { - KEEP (*(.init)) - } =0 - .plt : { *(.plt) } - .text : - { - *(.text .stub .text.* .gnu.linkonce.t.*) - KEEP (*(.text.*personality*)) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - *(.glue_7t) *(.glue_7) - } =0 - .fini : - { - KEEP (*(.fini)) - } =0 - PROVIDE (__etext = .); - PROVIDE (_etext = .); - PROVIDE (etext = .); - .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } - .rodata1 : { *(.rodata1) } - .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } - __exidx_start = .; - .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } - __exidx_end = .; - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } - .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } - /* Adjust the address for the data segment. We want to adjust up to - the same address within the page on the next page up. */ - . = ALIGN(256) + (. & (256 - 1)); - /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } - .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } - /* Thread Local Storage sections */ - .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } - .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE (__preinit_array_start = .); - .preinit_array : { KEEP (*(.preinit_array)) } - PROVIDE (__preinit_array_end = .); - PROVIDE (__init_array_start = .); - .init_array : { KEEP (*(.init_array)) } - PROVIDE (__init_array_end = .); - PROVIDE (__fini_array_start = .); - .fini_array : { KEEP (*(.fini_array)) } - PROVIDE (__fini_array_end = .); - .ctors : - { - /* gcc uses crtbegin.o to find the start of - the constructors, so we make sure it is - first. Because this is a wildcard, it - doesn't matter if the user does not - actually link against crtbegin.o; the - linker won't look for a file to match a - wildcard. The wildcard also means that it - doesn't matter which directory crtbegin.o - is in. */ - KEEP (*crtbegin*.o(.ctors)) - /* We don't want to include the .ctor section from - from the crtend.o file until after the sorted ctors. - The .ctor section from the crtend file contains the - end of ctors marker and it must be last */ - KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors)) - KEEP (*(SORT(.ctors.*))) - KEEP (*(.ctors)) - } - .dtors : - { - KEEP (*crtbegin*.o(.dtors)) - KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors)) - KEEP (*(SORT(.dtors.*))) - KEEP (*(.dtors)) - } - .jcr : { KEEP (*(.jcr)) } - .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) } - .got : { *(.got.plt) *(.got) } - .data : - { - __data_start = . ; - *(.data .data.* .gnu.linkonce.d.*) - KEEP (*(.gnu.linkonce.d.*personality*)) - SORT(CONSTRUCTORS) - } - .data1 : { *(.data1) } - _edata = .; - PROVIDE (edata = .); - .dynamic : { *(.dynamic) } - .hash : { *(.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } -/* .shstrtab : { *(.shstrtab) } */ - .rel.plt : { *(.rel.plt) } - .rel.dyn : { *(.rel.*) } - __bss_start = .; - __bss_start__ = .; - .bss : - { - *(.dynbss) - *(.bss .bss.* .gnu.linkonce.b.*) - *(COMMON) - /* Align here to ensure that the .bss section occupies space up to - _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); - } - . = ALIGN(32 / 8); - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } - .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.comment*) *(.stack*) *(.shstrtab) } -} diff --git a/core/base_rules.mk b/core/base_rules.mk deleted file mode 100644 index ba89c406b..000000000 --- a/core/base_rules.mk +++ /dev/null @@ -1,441 +0,0 @@ -# -# Copyright (C) 2008 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Users can define base-rules-hook in their buildspec.mk to perform -# arbitrary operations as each module is included. -ifdef base-rules-hook -$(if $(base-rules-hook),) -endif - -########################################################### -## Common instructions for a generic module. -########################################################### - -LOCAL_MODULE := $(strip $(LOCAL_MODULE)) -ifeq ($(LOCAL_MODULE),) - $(error $(LOCAL_PATH): LOCAL_MODULE is not defined) -endif - -LOCAL_IS_HOST_MODULE := $(strip $(LOCAL_IS_HOST_MODULE)) -ifdef LOCAL_IS_HOST_MODULE - ifneq ($(LOCAL_IS_HOST_MODULE),true) - $(error $(LOCAL_PATH): LOCAL_IS_HOST_MODULE must be "true" or empty, not "$(LOCAL_IS_HOST_MODULE)") - endif - my_prefix:=HOST_ - my_host:=host- -else - my_prefix:=TARGET_ - my_host:= -endif - -########################################################### -## Validate and define fallbacks for input LOCAL_* variables. -########################################################### - -## Dump a .csv file of all modules and their tags -#ifneq ($(tag-list-first-time),false) -#$(shell rm -f tag-list.csv) -#tag-list-first-time := false -#endif -#comma := , -#empty := -#space := $(empty) $(empty) -#$(shell echo $(lastword $(filter-out config/% out/%,$(MAKEFILE_LIST))),$(LOCAL_MODULE),$(strip $(LOCAL_MODULE_CLASS)),$(subst $(space),$(comma),$(sort $(LOCAL_MODULE_TAGS))) >> tag-list.csv) - -LOCAL_MODULE_TAGS := $(sort $(LOCAL_MODULE_TAGS)) -ifeq (,$(LOCAL_MODULE_TAGS)) -# Modules without tags fall back to user (which is changed to user eng below) -LOCAL_MODULE_TAGS := user -#$(warning default tags: $(lastword $(filter-out config/% out/%,$(MAKEFILE_LIST)))) -endif - -# Add implicit tags. -# -# If the local directory or one of its parents contains a MODULE_LICENSE_GPL -# file, tag the module as "gnu". Search for "*_GNU*" so that we can also -# find files like MODULE_LICENSE_GPL_AND_AFL but exclude files like -# MODULE_LICENSE_LGPL. -# -ifneq ($(call find-parent-file,$(LOCAL_PATH),MODULE_LICENSE*_GPL*),) - LOCAL_MODULE_TAGS += gnu -endif - -# -# If this module is listed on CUSTOM_MODULES, promote it to "user" -# so that it will be installed in $(TARGET_OUT). -# -ifneq (,$(filter $(LOCAL_MODULE),$(CUSTOM_MODULES))) - LOCAL_MODULE_TAGS := $(sort $(LOCAL_MODULE_TAGS) user) -endif - -# The definition of should-install-to-system will be different depending -# on which goal (e.g., user/eng/sdk) is being built. -ifdef LOCAL_IS_HOST_MODULE - use_data := -else - use_data := $(if $(call should-install-to-system,$(LOCAL_MODULE_TAGS)),,_DATA) -endif - -LOCAL_MODULE_CLASS := $(strip $(LOCAL_MODULE_CLASS)) -ifneq ($(words $(LOCAL_MODULE_CLASS)),1) - $(error $(LOCAL_PATH): LOCAL_MODULE_CLASS must contain exactly one word, not "$(LOCAL_MODULE_CLASS)") -endif - -# Add a tag like "_class@APPS" to this module so that we can filter -# based on the class. -LOCAL_MODULE_TAGS += _class@$(LOCAL_MODULE_CLASS) - -LOCAL_MODULE_PATH := $(strip $(LOCAL_MODULE_PATH)) -ifeq ($(LOCAL_MODULE_PATH),) - LOCAL_MODULE_PATH := $($(my_prefix)OUT$(use_data)_$(LOCAL_MODULE_CLASS)) - ifeq ($(strip $(LOCAL_MODULE_PATH)),) - $(error $(LOCAL_PATH): unhandled LOCAL_MODULE_CLASS "$(LOCAL_MODULE_CLASS)") - endif -endif - -ifneq ($(strip $(LOCAL_BUILT_MODULE)$(LOCAL_INSTALLED_MODULE)),) - $(error $(LOCAL_PATH): LOCAL_BUILT_MODULE and LOCAL_INSTALLED_MODULE must not be defined by component makefiles) -endif - -# Make sure that this IS_HOST/CLASS/MODULE combination is unique. -module_id := MODULE.$(if \ - $(LOCAL_IS_HOST_MODULE),HOST,TARGET).$(LOCAL_MODULE_CLASS).$(LOCAL_MODULE) -ifdef $(module_id) -$(error $(LOCAL_PATH): $(module_id) already defined by $($(module_id))) -endif -$(module_id) := $(LOCAL_PATH) - -intermediates := $(call local-intermediates-dir) -intermediates.COMMON := $(call local-intermediates-dir,COMMON) - -########################################################### -# Pick a name for the intermediate and final targets -########################################################### -LOCAL_MODULE_STEM := $(strip $(LOCAL_MODULE_STEM)) -ifeq ($(LOCAL_MODULE_STEM),) - LOCAL_MODULE_STEM := $(LOCAL_MODULE) -endif -LOCAL_INSTALLED_MODULE_STEM := $(LOCAL_MODULE_STEM)$(LOCAL_MODULE_SUFFIX) - -LOCAL_BUILT_MODULE_STEM := $(strip $(LOCAL_BUILT_MODULE_STEM)) -ifeq ($(LOCAL_BUILT_MODULE_STEM),) - LOCAL_BUILT_MODULE_STEM := $(LOCAL_INSTALLED_MODULE_STEM) -endif - -# OVERRIDE_BUILT_MODULE_PATH is only allowed to be used by the -# internal SHARED_LIBRARIES build files. -OVERRIDE_BUILT_MODULE_PATH := $(strip $(OVERRIDE_BUILT_MODULE_PATH)) -ifdef OVERRIDE_BUILT_MODULE_PATH - ifneq ($(LOCAL_MODULE_CLASS),SHARED_LIBRARIES) - $(error $(LOCAL_PATH): Illegal use of OVERRIDE_BUILT_MODULE_PATH) - endif - built_module_path := $(OVERRIDE_BUILT_MODULE_PATH) -else - built_module_path := $(intermediates) -endif -LOCAL_BUILT_MODULE := $(built_module_path)/$(LOCAL_BUILT_MODULE_STEM) -built_module_path := - -# LOCAL_UNINSTALLABLE_MODULE is only allowed to be used by the -# internal STATIC_LIBRARIES build files. -LOCAL_UNINSTALLABLE_MODULE := $(strip $(LOCAL_UNINSTALLABLE_MODULE)) -ifdef LOCAL_UNINSTALLABLE_MODULE - ifeq (,$(filter $(LOCAL_MODULE_CLASS),JAVA_LIBRARIES STATIC_LIBRARIES)) - $(error $(LOCAL_PATH): Illegal use of LOCAL_UNINSTALLABLE_MODULE) - endif -else - LOCAL_INSTALLED_MODULE := $(LOCAL_MODULE_PATH)/$(LOCAL_MODULE_SUBDIR)$(LOCAL_INSTALLED_MODULE_STEM) -endif - -# Assemble the list of targets to create PRIVATE_ variables for. -LOCAL_INTERMEDIATE_TARGETS += $(LOCAL_BUILT_MODULE) - - -########################################################### -## AIDL: Compile .aidl files to .java -########################################################### - -aidl_sources := $(filter %.aidl,$(LOCAL_SRC_FILES)) - -ifneq ($(strip $(aidl_sources)),) - -aidl_java_sources := $(patsubst %.aidl,%.java,$(addprefix $(intermediates.COMMON)/src/, $(aidl_sources))) -aidl_sources := $(addprefix $(TOP_DIR)$(LOCAL_PATH)/, $(aidl_sources)) - -$(aidl_java_sources): PRIVATE_AIDL_FLAGS := -b -I$(LOCAL_PATH) -I$(LOCAL_PATH)/src $(addprefix -I,$(LOCAL_AIDL_INCLUDES)) - -$(aidl_java_sources): $(intermediates.COMMON)/src/%.java: $(TOPDIR)$(LOCAL_PATH)/%.aidl $(PRIVATE_ADDITIONAL_DEPENDENCIES) $(AIDL) - $(transform-aidl-to-java) --include $(aidl_java_sources:%.java=%.P) - -else -aidl_java_sources := -endif - -########################################################### -## Java: Compile .java files to .class -########################################################### -#TODO: pull this into java.make once host and target are combined - -java_sources := $(addprefix $(TOP_DIR)$(LOCAL_PATH)/, $(filter %.java,$(LOCAL_SRC_FILES))) $(aidl_java_sources) -all_java_sources := $(java_sources) $(addprefix $($(my_prefix)OUT_COMMON_INTERMEDIATES)/, $(filter %.java,$(LOCAL_INTERMEDIATE_SOURCES))) - -## Java resources ######################################### - -# Look for resource files in any specified directories. -# Non-java and non-doc files will be picked up as resources -# and included in the output jar file. -java_resource_file_groups := - -LOCAL_JAVA_RESOURCE_DIRS := $(strip $(LOCAL_JAVA_RESOURCE_DIRS)) -ifneq ($(LOCAL_JAVA_RESOURCE_DIRS),) - # This makes a list of words like - # ::: :: : - # where each of the files is relative to the directory it's grouped with. - # Directories that don't contain any resource files will result in groups - # that end with a colon, and they are stripped out in the next step. - java_resource_file_groups += \ - $(foreach dir,$(LOCAL_JAVA_RESOURCE_DIRS), \ - $(subst $(space),:,$(strip \ - $(TOP_DIR)$(LOCAL_PATH)/$(dir): \ - $(patsubst ./%,%,$(shell cd $(TOP_DIR)$(LOCAL_PATH)/$(dir) && \ - find . \ - -type d -a -name ".svn" -prune -o \ - -type f \ - -a \! -name "*.java" \ - -a \! -name "package.html" \ - -a \! -name "overview.html" \ - -a \! -name ".*.swp" \ - -a \! -name ".DS_Store" \ - -a \! -name "*~" \ - -print \ - )) \ - )) \ - ) - java_resource_file_groups := $(filter-out %:,$(java_resource_file_groups)) -endif # LOCAL_JAVA_RESOURCE_DIRS - -LOCAL_JAVA_RESOURCE_FILES := $(strip $(LOCAL_JAVA_RESOURCE_FILES)) -ifneq ($(LOCAL_JAVA_RESOURCE_FILES),) - java_resource_file_groups += \ - $(foreach f,$(LOCAL_JAVA_RESOURCE_FILES), \ - $(patsubst %/,%,$(dir $(f)))::$(notdir $(f)) \ - ) -endif # LOCAL_JAVA_RESOURCE_FILES - -ifdef java_resource_file_groups - # The full paths to all resources, used for dependencies. - java_resource_sources := \ - $(foreach group,$(java_resource_file_groups), \ - $(addprefix $(word 1,$(subst :,$(space),$(group)))/, \ - $(wordlist 2,9999,$(subst :,$(space),$(group))) \ - ) \ - ) - # The arguments to jar that will include these files in a jar file. - extra_jar_args := \ - $(foreach group,$(java_resource_file_groups), \ - $(addprefix -C $(word 1,$(subst :,$(space),$(group))) , \ - $(wordlist 2,9999,$(subst :,$(space),$(group))) \ - ) \ - ) - java_resource_file_groups := -else - java_resource_sources := - extra_jar_args := -endif # java_resource_file_groups - -## PRIVATE java vars ###################################### - -ifneq ($(strip $(all_java_sources)$(all_res_assets)),) - -full_static_java_libs := \ - $(foreach lib,$(LOCAL_STATIC_JAVA_LIBRARIES), \ - $(call intermediates-dir-for, \ - JAVA_LIBRARIES,$(lib),$(LOCAL_IS_HOST_MODULE))/javalib.jar) - -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_INSTALL_DIR := $(dir $(LOCAL_INSTALLED_MODULE)) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_INTERMEDIATES_DIR := $(intermediates) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CLASS_INTERMEDIATES_DIR := $(intermediates)/classes -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_SOURCE_INTERMEDIATES_DIR := $(intermediates)/src -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAVA_SOURCES := $(all_java_sources) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAVA_OBJECTS := $(patsubst %.java,%.class,$(LOCAL_SRC_FILES)) -ifeq ($(my_prefix),TARGET_) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,core) -endif -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_RESOURCE_DIR := $(LOCAL_RESOURCE_DIR) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_EXTRA_JAR_ARGS := $(extra_jar_args) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ASSET_DIR := $(LOCAL_ASSET_DIR) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_STATIC_JAVA_LIBRARIES := $(full_static_java_libs) - -# full_java_libs: The list of files that should be used as the classpath. -# Using this list as a dependency list WILL NOT WORK. -# full_java_lib_deps: Should be specified as a prerequisite of this module -# to guarantee that the files in full_java_libs will -# be up-to-date. -ifdef LOCAL_IS_HOST_MODULE -# TODO: make prebuilt java libraries use the same -# intermediates path pattern as target java libraries. -full_java_libs := $(addprefix $(HOST_OUT_JAVA_LIBRARIES)/,$(addsuffix $(COMMON_JAVA_PACKAGE_SUFFIX),$(LOCAL_JAVA_LIBRARIES))) -full_java_lib_deps := $(full_java_libs) -else -full_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE)) -full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE)) -endif -full_java_libs += $(full_static_java_libs) $(LOCAL_CLASSPATH) -full_java_lib_deps += $(full_static_java_libs) $(LOCAL_CLASSPATH) - -# This is set by packages that contain instrumentation, allowing them to -# link against the package they are instrumenting. Currently only one such -# package is allowed. -LOCAL_INSTRUMENTATION_FOR := $(strip $(LOCAL_INSTRUMENTATION_FOR)) -ifdef LOCAL_INSTRUMENTATION_FOR - ifneq ($(words $(LOCAL_INSTRUMENTATION_FOR)),1) - $(error \ - $(LOCAL_PATH): Multiple LOCAL_INSTRUMENTATION_FOR members defined) - endif - - link_instr_intermediates_dir := $(call intermediates-dir-for, \ - APPS,$(LOCAL_INSTRUMENTATION_FOR)) - link_instr_intermediates_dir.COMMON := $(call intermediates-dir-for, \ - APPS,$(LOCAL_INSTRUMENTATION_FOR),,COMMON) - - full_java_libs += $(link_instr_intermediates_dir.COMMON)/classes.jar - - # We can't depend on the .jar file, so we depend on something that - # depends on the jar file; the final built package file. - full_java_lib_deps += $(link_instr_intermediates_dir)/package.apk -endif - -ifneq ($(strip $(LOCAL_JAR_MANIFEST)),) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAR_MANIFEST := $(LOCAL_PATH)/$(LOCAL_JAR_MANIFEST) -else -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAR_MANIFEST := -endif - -endif - - -########################################################### -## make clean- targets -########################################################### -cleantarget := clean-$(LOCAL_MODULE) -$(cleantarget) : PRIVATE_MODULE := $(LOCAL_MODULE) -$(cleantarget) : PRIVATE_CLEAN_FILES := \ - $(PRIVATE_CLEAN_FILES) \ - $(LOCAL_BUILT_MODULE) \ - $(LOCAL_INSTALLED_MODULE) \ - $(intermediates) -$(cleantarget):: - @echo "Clean: $(PRIVATE_MODULE)" - $(hide) rm -rf $(PRIVATE_CLEAN_FILES) - -########################################################### -## Common definitions for module. -########################################################### - -# Propagate local configuration options to this target. -$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_PATH:=$(LOCAL_PATH) -$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_POST_PROCESS_COMMAND:= $(LOCAL_POST_PROCESS_COMMAND) -$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_AAPT_FLAGS:= $(LOCAL_AAPT_FLAGS) -$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_JAVA_LIBRARIES:= $(LOCAL_JAVA_LIBRARIES) -#TODO: add this: $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_ADDITIONAL_DEPENDENCIES:= $(LOCAL_ADDITIONAL_DEPENDENCIES) - -$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_ALL_JAVA_LIBRARIES:= $(full_java_libs) -$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_IS_HOST_MODULE := $(LOCAL_IS_HOST_MODULE) -$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_HOST:= $(my_host) - -# Tell the module and all of its sub-modules who it is. -$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_MODULE:= $(LOCAL_MODULE) - -# Provide a short-hand for building this module. -# We name both BUILT and INSTALLED in case -# LOCAL_UNINSTALLABLE_MODULE is set. -.PHONY: $(LOCAL_MODULE) -$(LOCAL_MODULE): $(LOCAL_BUILT_MODULE) $(LOCAL_INSTALLED_MODULE) - -########################################################### -## Module installation rule -########################################################### - -# Some hosts do not have ACP; override the LOCAL version if that's the case. -ifneq ($(strip $(HOST_ACP_UNAVAILABLE)),) - LOCAL_ACP_UNAVAILABLE := $(strip $(HOST_ACP_UNAVAILABLE)) -endif - -ifndef LOCAL_UNINSTALLABLE_MODULE - # Define a copy rule to install the module. - # acp and libraries that it uses can't use acp for - # installation; hence, LOCAL_ACP_UNAVAILABLE. -ifneq ($(LOCAL_ACP_UNAVAILABLE),true) -$(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE) | $(ACP) - @echo "Install: $@" - $(copy-file-to-target) -else -$(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE) - @echo "Install: $@" - $(copy-file-to-target-with-cp) -endif - -endif # !LOCAL_UNINSTALLABLE_MODULE - -########################################################### -## Register with ALL_MODULES -########################################################### - -ALL_MODULES += $(LOCAL_MODULE) - -# Don't use += on subvars, or else they'll end up being -# recursively expanded. -ALL_MODULES.$(LOCAL_MODULE).PATH := \ - $(ALL_MODULES.$(LOCAL_MODULE).PATH) $(LOCAL_PATH) -ALL_MODULES.$(LOCAL_MODULE).TAGS := \ - $(ALL_MODULES.$(LOCAL_MODULE).TAGS) $(LOCAL_MODULE_TAGS) -ALL_MODULES.$(LOCAL_MODULE).BUILT := \ - $(ALL_MODULES.$(LOCAL_MODULE).BUILT) $(LOCAL_BUILT_MODULE) -ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ - $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(LOCAL_INSTALLED_MODULE) -ALL_MODULES.$(LOCAL_MODULE).REQUIRED := \ - $(ALL_MODULES.$(LOCAL_MODULE).REQUIRED) $(LOCAL_REQUIRED_MODULES) - -########################################################### -## Take care of LOCAL_MODULE_TAGS -########################################################### - -# Keep track of all the tags we've seen. -ALL_MODULE_TAGS := $(sort $(ALL_MODULE_TAGS) $(LOCAL_MODULE_TAGS)) - -# Add this module to the tag list of each specified tag. -# Don't use "+=". If the variable hasn't been set with ":=", -# it will default to recursive expansion. -$(foreach tag,$(LOCAL_MODULE_TAGS),\ - $(eval ALL_MODULE_TAGS.$(tag) := \ - $(ALL_MODULE_TAGS.$(tag)) \ - $(LOCAL_INSTALLED_MODULE))) - -# Add this module name to the tag list of each specified tag. -$(foreach tag,$(LOCAL_MODULE_TAGS),\ - $(eval ALL_MODULE_NAME_TAGS.$(tag) += $(LOCAL_MODULE))) - -# Always build everything, but only install a subset. -ALL_BUILT_MODULES += $(LOCAL_BUILT_MODULE) - -########################################################### -## NOTICE files -########################################################### - -include $(BUILD_SYSTEM)/notice_files.mk - -#:vi noexpandtab diff --git a/core/binary.mk b/core/binary.mk deleted file mode 100644 index 6741b4362..000000000 --- a/core/binary.mk +++ /dev/null @@ -1,399 +0,0 @@ -########################################################### -## Standard rules for building binary object files from -## asm/c/cpp/yacc/lex source files. -## -## The list of object files is exported in $(all_objects). -########################################################### - -####################################### -include $(BUILD_SYSTEM)/base_rules.mk -####################################### - -########################################################### -## Define PRIVATE_ variables used by multiple module types -########################################################### -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_NO_DEFAULT_COMPILER_FLAGS := \ - $(strip $(LOCAL_NO_DEFAULT_COMPILER_FLAGS)) - -ifeq ($(strip $(LOCAL_CC)),) - LOCAL_CC := $($(my_prefix)CC) -endif -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CC := $(LOCAL_CC) - -ifeq ($(strip $(LOCAL_CXX)),) - LOCAL_CXX := $($(my_prefix)CXX) -endif -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CXX := $(LOCAL_CXX) - -# TODO: support a mix of standard extensions so that this isn't necessary -LOCAL_CPP_EXTENSION := $(strip $(LOCAL_CPP_EXTENSION)) -ifeq ($(LOCAL_CPP_EXTENSION),) - LOCAL_CPP_EXTENSION := .cpp -endif -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CPP_EXTENSION := $(LOCAL_CPP_EXTENSION) - -# Certain modules like libdl have to have symbols resolved at runtime and blow -# up if --no-undefined is passed to the linker. -ifeq ($(strip $(LOCAL_NO_DEFAULT_COMPILER_FLAGS)),) -ifeq ($(strip $(LOCAL_ALLOW_UNDEFINED_SYMBOLS)),) - LOCAL_LDFLAGS := $(LOCAL_LDFLAGS) $($(my_prefix)NO_UNDEFINED_LDFLAGS) -endif -endif - -########################################################### -## Define arm-vs-thumb-mode flags. -########################################################### -LOCAL_ARM_MODE := $(strip $(LOCAL_ARM_MODE)) -arm_objects_mode := $(if $(LOCAL_ARM_MODE),$(LOCAL_ARM_MODE),arm) -normal_objects_mode := $(if $(LOCAL_ARM_MODE),$(LOCAL_ARM_MODE),thumb) - -# Read the values from something like TARGET_arm_release_CFLAGS or -# TARGET_thumb_debug_CFLAGS. HOST_(arm|thumb)_(release|debug)_CFLAGS -# values aren't actually used (although they are usually empty). -arm_objects_cflags := $($(my_prefix)$(arm_objects_mode)_$($(my_prefix)BUILD_TYPE)_CFLAGS) -normal_objects_cflags := $($(my_prefix)$(normal_objects_mode)_$($(my_prefix)BUILD_TYPE)_CFLAGS) - -########################################################### -## Define per-module debugging flags. Users can turn on -## debugging for a particular module by setting DEBUG_MODULE_ModuleName -## to a non-empty value in their environment or buildspec.mk, -## and setting HOST_/TARGET_CUSTOM_DEBUG_CFLAGS to the -## debug flags that they want to use. -########################################################### -ifdef DEBUG_MODULE_$(strip $(LOCAL_MODULE)) - debug_cflags := $($(my_prefix)CUSTOM_DEBUG_CFLAGS) -else - debug_cflags := -endif - -########################################################### -## Stuff source generated from one-off tools -########################################################### -$(LOCAL_GENERATED_SOURCES): PRIVATE_MODULE := $(LOCAL_MODULE) - -ALL_GENERATED_SOURCES += $(LOCAL_GENERATED_SOURCES) - - -########################################################### -## YACC: Compile .y files to .cpp and the to .o. -########################################################### - -yacc_sources := $(filter %.y,$(LOCAL_SRC_FILES)) -yacc_cpps := $(addprefix \ - $(intermediates)/,$(yacc_sources:.y=$(LOCAL_CPP_EXTENSION))) -yacc_headers := $(yacc_cpps:$(LOCAL_CPP_EXTENSION)=.h) -yacc_objects := $(yacc_cpps:$(LOCAL_CPP_EXTENSION)=.o) - -ifneq ($(strip $(yacc_cpps)),) -$(yacc_cpps): $(intermediates)/%$(LOCAL_CPP_EXTENSION): \ - $(TOPDIR)$(LOCAL_PATH)/%.y \ - $(lex_cpps) $(PRIVATE_ADDITIONAL_DEPENDENCIES) - $(call transform-y-to-cpp,$(PRIVATE_CPP_EXTENSION)) -$(yacc_headers): $(intermediates)/%.h: $(intermediates)/%$(LOCAL_CPP_EXTENSION) - -$(yacc_objects): $(intermediates)/%.o: $(intermediates)/%$(LOCAL_CPP_EXTENSION) - $(transform-$(PRIVATE_HOST)cpp-to-o) -endif - -########################################################### -## LEX: Compile .l files to .cpp and then to .o. -########################################################### - -lex_sources := $(filter %.l,$(LOCAL_SRC_FILES)) -lex_cpps := $(addprefix \ - $(intermediates)/,$(lex_sources:.l=$(LOCAL_CPP_EXTENSION))) -lex_objects := $(lex_cpps:$(LOCAL_CPP_EXTENSION)=.o) - -ifneq ($(strip $(lex_cpps)),) -$(lex_cpps): $(intermediates)/%$(LOCAL_CPP_EXTENSION): \ - $(TOPDIR)$(LOCAL_PATH)/%.l - $(transform-l-to-cpp) - -$(lex_objects): $(intermediates)/%.o: \ - $(intermediates)/%$(LOCAL_CPP_EXTENSION) \ - $(PRIVATE_ADDITIONAL_DEPENDENCIES) \ - $(yacc_headers) - $(transform-$(PRIVATE_HOST)cpp-to-o) -endif - -########################################################### -## C++: Compile .cpp files to .o. -########################################################### - -# we also do this on host modules and sim builds, even though -# it's not really arm, because there are files that are shared. -cpp_arm_sources := $(patsubst %$(LOCAL_CPP_EXTENSION).arm,%$(LOCAL_CPP_EXTENSION),$(filter %$(LOCAL_CPP_EXTENSION).arm,$(LOCAL_SRC_FILES))) -cpp_arm_objects := $(addprefix $(intermediates)/,$(cpp_arm_sources:$(LOCAL_CPP_EXTENSION)=.o)) - -cpp_normal_sources := $(filter %$(LOCAL_CPP_EXTENSION),$(LOCAL_SRC_FILES)) -cpp_normal_objects := $(addprefix $(intermediates)/,$(cpp_normal_sources:$(LOCAL_CPP_EXTENSION)=.o)) - -$(cpp_arm_objects): PRIVATE_ARM_MODE := $(arm_objects_mode) -$(cpp_arm_objects): PRIVATE_ARM_CFLAGS := $(arm_objects_cflags) -$(cpp_normal_objects): PRIVATE_ARM_MODE := $(normal_objects_mode) -$(cpp_normal_objects): PRIVATE_ARM_CFLAGS := $(normal_objects_cflags) - -cpp_objects := $(cpp_arm_objects) $(cpp_normal_objects) - -ifneq ($(strip $(cpp_objects)),) -$(cpp_objects): $(intermediates)/%.o: \ - $(TOPDIR)$(LOCAL_PATH)/%$(LOCAL_CPP_EXTENSION) \ - $(yacc_cpps) $(PRIVATE_ADDITIONAL_DEPENDENCIES) - $(transform-$(PRIVATE_HOST)cpp-to-o) --include $(cpp_objects:%.o=%.P) -endif - -########################################################### -## C++: Compile generated .cpp files to .o. -########################################################### - -gen_cpp_sources := $(filter %$(LOCAL_CPP_EXTENSION),$(LOCAL_GENERATED_SOURCES)) -gen_cpp_objects := $(gen_cpp_sources:%$(LOCAL_CPP_EXTENSION)=%.o) - -ifneq ($(strip $(gen_cpp_objects)),) -# Compile all generated files as thumb. -# TODO: support compiling certain generated files as arm. -$(gen_cpp_objects): PRIVATE_ARM_MODE := $(normal_objects_mode) -$(gen_cpp_objects): PRIVATE_ARM_CFLAGS := $(normal_objects_cflags) -$(gen_cpp_objects): $(intermediates)/%.o: $(intermediates)/%$(LOCAL_CPP_EXTENSION) $(yacc_cpps) $(PRIVATE_ADDITIONAL_DEPENDENCIES) - $(transform-$(PRIVATE_HOST)cpp-to-o) --include $(gen_cpp_objects:%.o=%.P) -endif - -########################################################### -## S: Compile generated .S and .s files to .o. -########################################################### - -gen_S_sources := $(filter %.S,$(LOCAL_GENERATED_SOURCES)) -gen_S_objects := $(gen_S_sources:%.S=%.o) - -ifneq ($(strip $(gen_S_sources)),) -$(gen_S_objects): $(intermediates)/%.o: $(intermediates)/%.S $(PRIVATE_ADDITIONAL_DEPENDENCIES) - $(transform-$(PRIVATE_HOST)s-to-o) --include $(gen_S_objects:%.o=%.P) -endif - -gen_s_sources := $(filter %.s,$(LOCAL_GENERATED_SOURCES)) -gen_s_objects := $(gen_s_sources:%.s=%.o) - -ifneq ($(strip $(gen_s_objects)),) -$(gen_s_objects): $(intermediates)/%.o: $(intermediates)/%.s $(PRIVATE_ADDITIONAL_DEPENDENCIES) - $(transform-$(PRIVATE_HOST)s-to-o-no-deps) --include $(gen_s_objects:%.o=%.P) -endif - -gen_asm_objects := $(gen_S_objects) $(gen_s_objects) - -########################################################### -## C: Compile .c files to .o. -########################################################### - -c_arm_sources := $(patsubst %.c.arm,%.c,$(filter %.c.arm,$(LOCAL_SRC_FILES))) -c_arm_objects := $(addprefix $(intermediates)/,$(c_arm_sources:.c=.o)) - -c_normal_sources := $(filter %.c,$(LOCAL_SRC_FILES)) -c_normal_objects := $(addprefix $(intermediates)/,$(c_normal_sources:.c=.o)) - -$(c_arm_objects): PRIVATE_ARM_MODE := $(arm_objects_mode) -$(c_arm_objects): PRIVATE_ARM_CFLAGS := $(arm_objects_cflags) -$(c_normal_objects): PRIVATE_ARM_MODE := $(normal_objects_mode) -$(c_normal_objects): PRIVATE_ARM_CFLAGS := $(normal_objects_cflags) - -c_objects := $(c_arm_objects) $(c_normal_objects) - -ifneq ($(strip $(c_objects)),) -$(c_objects): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.c $(yacc_cpps) $(PRIVATE_ADDITIONAL_DEPENDENCIES) - $(transform-$(PRIVATE_HOST)c-to-o) --include $(c_objects:%.o=%.P) -endif - -########################################################### -## AS: Compile .S files to .o. -########################################################### - -asm_sources_S := $(filter %.S,$(LOCAL_SRC_FILES)) -asm_objects_S := $(addprefix $(intermediates)/,$(asm_sources_S:.S=.o)) - -ifneq ($(strip $(asm_objects_S)),) -$(asm_objects_S): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.S $(PRIVATE_ADDITIONAL_DEPENDENCIES) - $(transform-$(PRIVATE_HOST)s-to-o) --include $(asm_objects_S:%.o=%.P) -endif - -asm_sources_s := $(filter %.s,$(LOCAL_SRC_FILES)) -asm_objects_s := $(addprefix $(intermediates)/,$(asm_sources_s:.s=.o)) - -ifneq ($(strip $(asm_objects_s)),) -$(asm_objects_s): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.s $(PRIVATE_ADDITIONAL_DEPENDENCIES) - $(transform-$(PRIVATE_HOST)s-to-o-no-deps) --include $(asm_objects_s:%.o=%.P) -endif - -asm_objects := $(asm_objects_S) $(asm_objects_s) - - -########################################################### -## Common object handling. -########################################################### - -# some rules depend on asm_objects being first. If your code depends on -# being first, it's reasonable to require it to be assembly -all_objects := \ - $(asm_objects) \ - $(cpp_objects) \ - $(gen_cpp_objects) \ - $(gen_asm_objects) \ - $(c_objects) \ - $(yacc_objects) \ - $(lex_objects) \ - $(addprefix $(TOPDIR)$(LOCAL_PATH)/,$(LOCAL_PREBUILT_OBJ_FILES)) - -LOCAL_C_INCLUDES += $(TOPDIR)$(LOCAL_PATH) $(intermediates) $(base_intermediates) - -$(all_objects) : | $(LOCAL_GENERATED_SOURCES) -ALL_C_CPP_ETC_OBJECTS += $(all_objects) - -########################################################### -## Copy headers to the install tree -########################################################### -include $(BUILD_COPY_HEADERS) - -########################################################### -# Standard library handling. -# -# On the target, we compile with -nostdlib, so we must add in the -# default system shared libraries, unless they have requested not -# to by supplying a LOCAL_SYSTEM_SHARED_LIBRARIES value. One would -# supply that, for example, when building libc itself. -########################################################### -ifndef LOCAL_IS_HOST_MODULE - ifeq ($(LOCAL_SYSTEM_SHARED_LIBRARIES),none) - LOCAL_SHARED_LIBRARIES += $($(my_prefix)DEFAULT_SYSTEM_SHARED_LIBRARIES) - else - LOCAL_SHARED_LIBRARIES += $(LOCAL_SYSTEM_SHARED_LIBRARIES) - endif -endif - -# Logging used to be part of libcutils (target) and libutils (sim); -# hack modules that use those other libs to also include liblog. -# All of this complexity is to make sure that liblog only appears -# once, and appears just before libcutils or libutils on the link -# line. -# TODO: remove this hack and change all modules to use liblog -# when necessary. -define insert-liblog - $(if $(filter liblog,$(1)),$(1), \ - $(if $(filter libcutils,$(1)), \ - $(patsubst libcutils,liblog libcutils,$(1)) \ - , \ - $(patsubst libutils,liblog libutils,$(1)) \ - ) \ - ) -endef -ifneq (,$(filter libcutils libutils,$(LOCAL_SHARED_LIBRARIES))) - LOCAL_SHARED_LIBRARIES := $(call insert-liblog,$(LOCAL_SHARED_LIBRARIES)) -endif -ifneq (,$(filter libcutils libutils,$(LOCAL_STATIC_LIBRARIES))) - LOCAL_STATIC_LIBRARIES := $(call insert-liblog,$(LOCAL_STATIC_LIBRARIES)) -endif -ifneq (,$(filter libcutils libutils,$(LOCAL_WHOLE_STATIC_LIBRARIES))) - LOCAL_WHOLE_STATIC_LIBRARIES := $(call insert-liblog,$(LOCAL_WHOLE_STATIC_LIBRARIES)) -endif - -########################################################### -# The list of libraries that this module will link against are in -# these variables. Each is a list of bare module names like "libc libm". -# -# LOCAL_SHARED_LIBRARIES -# LOCAL_STATIC_LIBRARIES -# LOCAL_WHOLE_STATIC_LIBRARIES -# -# We need to convert the bare names into the dependencies that -# we'll use for LOCAL_BUILT_MODULE and LOCAL_INSTALLED_MODULE. -# LOCAL_BUILT_MODULE should depend on the BUILT versions of the -# libraries, so that simply building this module doesn't force -# an install of a library. Similarly, LOCAL_INSTALLED_MODULE -# should depend on the INSTALLED versions of the libraries so -# that they get installed when this module does. -########################################################### -# NOTE: -# WHOLE_STATIC_LIBRARIES are libraries that are pulled into the -# module without leaving anything out, which is useful for turning -# a collection of .a files into a .so file. Linking against a -# normal STATIC_LIBRARY will only pull in code/symbols that are -# referenced by the module. (see gcc/ld's --whole-archive option) -########################################################### - -# Get the list of BUILT libraries, which are under -# various intermediates directories. -so_suffix := $($(my_prefix)SHLIB_SUFFIX) -a_suffix := $($(my_prefix)STATIC_LIB_SUFFIX) - -built_shared_libraries := \ - $(addprefix $($(my_prefix)OUT_INTERMEDIATE_LIBRARIES)/, \ - $(addsuffix $(so_suffix), \ - $(LOCAL_SHARED_LIBRARIES))) - -built_static_libraries := \ - $(foreach lib,$(LOCAL_STATIC_LIBRARIES), \ - $(call intermediates-dir-for, \ - STATIC_LIBRARIES,$(lib),$(LOCAL_IS_HOST_MODULE))/$(lib)$(a_suffix)) - -built_whole_libraries := \ - $(foreach lib,$(LOCAL_WHOLE_STATIC_LIBRARIES), \ - $(call intermediates-dir-for, \ - STATIC_LIBRARIES,$(lib),$(LOCAL_IS_HOST_MODULE))/$(lib)$(a_suffix)) - -# Get the list of INSTALLED libraries. Strip off the various -# intermediates directories and point to the common lib dirs. -installed_shared_libraries := \ - $(addprefix $($(my_prefix)OUT_SHARED_LIBRARIES)/, \ - $(notdir $(built_shared_libraries))) - -# We don't care about installed static libraries, since the -# libraries have already been linked into the module at that point. -# We do, however, care about the NOTICE files for any static -# libraries that we use. (see notice_files.make) - -installed_static_library_notice_file_targets := \ - $(foreach lib,$(LOCAL_STATIC_LIBRARIES) $(LOCAL_WHOLE_STATIC_LIBRARIES), \ - NOTICE-$(if $(LOCAL_IS_HOST_MODULE),HOST,TARGET)-STATIC_LIBRARIES-$(lib)) - -########################################################### -# Rule-specific variable definitions -########################################################### -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_YACCFLAGS := $(LOCAL_YACCFLAGS) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ASFLAGS := $(LOCAL_ASFLAGS) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CFLAGS := $(LOCAL_CFLAGS) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CPPFLAGS := $(LOCAL_CPPFLAGS) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_DEBUG_CFLAGS := $(debug_cflags) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_C_INCLUDES := $(LOCAL_C_INCLUDES) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_LDFLAGS := $(LOCAL_LDFLAGS) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_LDLIBS := $(LOCAL_LDLIBS) - -# this is really the way to get the files onto the command line instead -# of using $^, because then LOCAL_ADDITIONAL_DEPENDENCIES doesn't work -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ALL_SHARED_LIBRARIES := $(built_shared_libraries) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ALL_STATIC_LIBRARIES := $(built_static_libraries) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ALL_WHOLE_STATIC_LIBRARIES := $(built_whole_libraries) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ALL_OBJECTS := $(all_objects) - -########################################################### -# Define library dependencies. -########################################################### -# all_libraries is used for the dependencies on LOCAL_BUILT_MODULE. -all_libraries := \ - $(built_shared_libraries) \ - $(built_static_libraries) \ - $(built_whole_libraries) - -# Make LOCAL_INSTALLED_MODULE depend on the installed versions of the -# libraries so they get installed along with it. We don't need to -# rebuild it when installing it, though, so this can be an order-only -# dependency. -$(LOCAL_INSTALLED_MODULE): | $(installed_shared_libraries) - -# Also depend on the notice files for any static libraries that -# are linked into this module. This will force them to be installed -# when this module is. -$(LOCAL_INSTALLED_MODULE): | $(installed_static_library_notice_file_targets) diff --git a/core/build_id.mk b/core/build_id.mk deleted file mode 100644 index cb18bc492..000000000 --- a/core/build_id.mk +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright (C) 2008 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Defines branch-specific values. -# - -# BUILD_ID is usually used to specify the branch name -# (like "MAIN") or a branch name and a release candidate -# (like "TC1-RC5"). It must be a single word, and is -# capitalized by convention. -# -BUILD_ID := CUPCAKE - -# DISPLAY_BUILD_NUMBER should only be set for development branches, -# If set, the BUILD_NUMBER (cl) is appended to the BUILD_ID for -# a more descriptive BUILD_ID_DISPLAY, otherwise BUILD_ID_DISPLAY -# is the same as BUILD_ID -DISPLAY_BUILD_NUMBER := true diff --git a/core/checktree b/core/checktree deleted file mode 100755 index b0b9cfab6..000000000 --- a/core/checktree +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/python -E - -import sys, os, re - -excludes = [r'.*?/\.obj.*?', - r'.*?~', - r'.*?\/.DS_Store', - r'.*?\/.gdb_history', - r'.*?\/buildspec.mk', - r'.*?/\..*?\.swp', - r'.*?/out/.*?', - r'.*?/install/.*?'] - -excludes_compiled = map(re.compile, excludes) - -def filter_excludes(str): - for e in excludes_compiled: - if e.match(str): - return False - return True - -def split_perforce_parts(s): - spaces = ((s.count(" ") + 1) / 3) * 2 - pos = 0 - while spaces > 0: - pos = s.find(" ", pos) + 1 - spaces = spaces - 1 - return s[pos:] - -def quotate(s): - return '"' + s + '"' - -class PerforceError(Exception): - def __init__(self,value): - self.value = value - def __str__(self): - return repr(self.value) - - -def run(command, regex, filt): - def matchit(s): - m = regex_compiled.match(s) - if m: - return m.group(1) - else: - return "" - def filterit(s): - if filt_compiled.match(s): - return True - else: - return False - - fd = os.popen(command); - lines = fd.readlines() - status = fd.close() - if status: - raise PerforceError("error calling " + command) - - regex_compiled = re.compile(regex) - filt_compiled = re.compile(filt) - - if len(lines) >= 1: - lines = filter(filterit, lines) - if len(lines) >= 1: - return map(matchit, lines) - return None - -try: - if len(sys.argv) == 1: - do_exclude = True - elif len(sys.argv) == 2 and sys.argv[1] == "-a": - do_exclude = False - else: - print "usage: checktree [-a]" - print " -a don't filter common crud in the tree" - sys.exit(1) - - have = run("p4 have ...", r'[^#]+#[0-9]+ - (.*)', r'.*') - - cwd = os.getcwd() - files = run("find . -not -type d", r'.(.*)', r'.*') - files = map(lambda s: cwd+s, files) - - added_depot_path = run("p4 opened ...", r'([^#]+)#.*', r'.*?#[0-9]+ - add .*'); - added = [] - if added_depot_path: - added_depot_path = map(quotate, added_depot_path) - - where = "p4 where " + " ".join(added_depot_path) - added = run(where, r'(.*)', r'.*') - added = map(split_perforce_parts, added) - - extras = [] - - # Python 2.3 -- still default on Mac OS X -- does not have set() - # Make dict's here to support the "in" operations below - have = dict().fromkeys(have, 1) - added = dict().fromkeys(added, 1) - - for file in files: - if not file in have: - if not file in added: - extras.append(file) - - if do_exclude: - extras = filter(filter_excludes, extras) - - for s in extras: - print s.replace(" ", "\\ ") - -except PerforceError, e: - sys.exit(2) - diff --git a/core/cleanbuild.mk b/core/cleanbuild.mk deleted file mode 100644 index 01bf9a53c..000000000 --- a/core/cleanbuild.mk +++ /dev/null @@ -1,200 +0,0 @@ -# Copyright (C) 2007 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -INTERNAL_CLEAN_STEPS := - -# Builds up a list of clean steps. Creates a unique -# id for each step by taking INTERNAL_CLEAN_BUILD_VERSION -# and appending an increasing number of '@' characters. -# -# $(1): shell command to run -define _add-clean-step - $(if $(strip $(INTERNAL_CLEAN_BUILD_VERSION)),, \ - $(error INTERNAL_CLEAN_BUILD_VERSION not set)) - $(eval _acs_id := $(strip $(lastword $(INTERNAL_CLEAN_STEPS)))) - $(if $(_acs_id),,$(eval _acs_id := $(INTERNAL_CLEAN_BUILD_VERSION))) - $(eval _acs_id := $(_acs_id)@) - $(eval INTERNAL_CLEAN_STEPS += $(_acs_id)) - $(eval INTERNAL_CLEAN_STEP.$(_acs_id) := $(1)) - $(eval _acs_id :=) -endef -define add-clean-step -$(if $(call _add-clean-step,$(1)),) -endef - -# Defines INTERNAL_CLEAN_BUILD_VERSION and the individual clean steps. -# cleanspec.mk is outside of the core directory so that more people -# can have permission to touch it. -include build/cleanspec.mk -INTERNAL_CLEAN_BUILD_VERSION := $(strip $(INTERNAL_CLEAN_BUILD_VERSION)) - -# If the clean_steps.mk file is missing (usually after a clean build) -# then we won't do anything. -CURRENT_CLEAN_BUILD_VERSION := $(INTERNAL_CLEAN_BUILD_VERSION) -CURRENT_CLEAN_STEPS := $(INTERNAL_CLEAN_STEPS) - -# Read the current state from the file, if present. -# Will set CURRENT_CLEAN_BUILD_VERSION and CURRENT_CLEAN_STEPS. -# -clean_steps_file := $(PRODUCT_OUT)/clean_steps.mk --include $(clean_steps_file) - -ifneq ($(CURRENT_CLEAN_BUILD_VERSION),$(INTERNAL_CLEAN_BUILD_VERSION)) - # The major clean version is out-of-date. Do a full clean, and - # don't even bother with the clean steps. - $(info *** A clean build is required because of a recent change.) - $(shell rm -rf $(OUT_DIR)) - $(info *** Done with the cleaning, now starting the real build.) -else - # The major clean version is correct. Find the list of clean steps - # that we need to execute to get up-to-date. - steps := \ - $(filter-out $(CURRENT_CLEAN_STEPS),$(INTERNAL_CLEAN_STEPS)) - $(foreach step,$(steps), \ - $(info Clean step: $(INTERNAL_CLEAN_STEP.$(step))) \ - $(shell $(INTERNAL_CLEAN_STEP.$(step))) \ - ) - steps := -endif -CURRENT_CLEAN_BUILD_VERSION := -CURRENT_CLEAN_STEPS := - -# Write the new state to the file. -# -$(shell \ - mkdir -p $(dir $(clean_steps_file)) && \ - echo "CURRENT_CLEAN_BUILD_VERSION := $(INTERNAL_CLEAN_BUILD_VERSION)" > \ - $(clean_steps_file) ;\ - echo "CURRENT_CLEAN_STEPS := $(INTERNAL_CLEAN_STEPS)" >> \ - $(clean_steps_file) \ - ) - -clean_steps_file := -INTERNAL_CLEAN_STEPS := -INTERNAL_CLEAN_BUILD_VERSION := - - -# Since products and build variants (unfortunately) share the same -# PRODUCT_OUT staging directory, things can get out of sync if different -# build configurations are built in the same tree. The following logic -# will notice when the configuration has changed and remove the files -# necessary to keep things consistent. - -previous_build_config_file := $(PRODUCT_OUT)/previous_build_config.mk - -# TODO: this special case for the sdk is only necessary while "sdk" -# is a valid make target. Eventually, it will just be a product, at -# which point TARGET_PRODUCT will handle it and we can avoid this check -# of MAKECMDGOALS. The "addprefix" is just to keep things pretty. -ifneq ($(TARGET_PRODUCT),sdk) - building_sdk := $(addprefix -,$(filter sdk,$(MAKECMDGOALS))) -else - # Don't bother with this extra part when explicitly building the sdk product. - building_sdk := -endif - -# A change in the list of locales warrants an installclean, too. -locale_list := $(subst $(space),$(comma),$(strip $(PRODUCT_LOCALES))) - -current_build_config := \ - $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)$(building_sdk)-{$(locale_list)} -building_sdk := -locale_list := -force_installclean := false - -# Read the current state from the file, if present. -# Will set PREVIOUS_BUILD_CONFIG. -# -PREVIOUS_BUILD_CONFIG := --include $(previous_build_config_file) -PREVIOUS_BUILD_CONFIG := $(strip $(PREVIOUS_BUILD_CONFIG)) -ifdef PREVIOUS_BUILD_CONFIG - ifneq "$(current_build_config)" "$(PREVIOUS_BUILD_CONFIG)" - $(info *** Build configuration changed: "$(PREVIOUS_BUILD_CONFIG)" -> "$(current_build_config)") - force_installclean := true - endif -endif # else, this is the first build, so no need to clean. -PREVIOUS_BUILD_CONFIG := - -# Write the new state to the file. -# -$(shell \ - mkdir -p $(dir $(previous_build_config_file)) && \ - echo "PREVIOUS_BUILD_CONFIG := $(current_build_config)" > \ - $(previous_build_config_file) \ - ) -previous_build_config_file := -current_build_config := - -# -# installclean logic -# - -# The files/dirs to delete during an installclean. This includes the -# non-common APPS directory, which may contain the wrong resources. -# Use "./" in front of the paths to avoid accidentally deleting random -# parts of the filesystem if any of the *_OUT vars resolve to blank. -# -# Deletes all of the files that change between different build types, -# like "make user" vs. "make sdk". This lets you work with different -# build types without having to do a full clean each time. E.g.: -# -# $ make -j8 all -# $ make installclean -# $ make -j8 user -# $ make installclean -# $ make -j8 sdk -# -installclean_files := \ - ./$(HOST_OUT)/obj/NOTICE_FILES \ - ./$(HOST_OUT)/sdk \ - ./$(PRODUCT_OUT)/*.img \ - ./$(PRODUCT_OUT)/*.txt \ - ./$(PRODUCT_OUT)/*.xlb \ - ./$(PRODUCT_OUT)/*.zip \ - ./$(PRODUCT_OUT)/data \ - ./$(PRODUCT_OUT)/obj/APPS \ - ./$(PRODUCT_OUT)/obj/NOTICE_FILES \ - ./$(PRODUCT_OUT)/obj/PACKAGING \ - ./$(PRODUCT_OUT)/recovery \ - ./$(PRODUCT_OUT)/root \ - ./$(PRODUCT_OUT)/system - -# The files/dirs to delete during a dataclean, which removes any files -# in the staging and emulator data partitions. -dataclean_files := \ - ./$(PRODUCT_OUT)/data/* \ - ./$(PRODUCT_OUT)/data-qemu/* \ - ./$(PRODUCT_OUT)/userdata-qemu.img - -# Define the rules for commandline invocation. -.PHONY: dataclean -dataclean: FILES := $(dataclean_files) -dataclean: - $(hide) rm -rf $(FILES) - @echo "Deleted emulator userdata images." - -.PHONY: installclean -installclean: FILES := $(installclean_files) -installclean: dataclean - $(hide) rm -rf $(FILES) - @echo "Deleted images and staging directories." - -ifeq "$(force_installclean)" "true" - $(info *** Forcing "make installclean"...) - $(shell rm -rf $(dataclean_files) $(installclean_files)) - $(info *** Done with the cleaning, now starting the real build.) -endif -force_installclean := diff --git a/core/clear_vars.mk b/core/clear_vars.mk deleted file mode 100644 index f09050785..000000000 --- a/core/clear_vars.mk +++ /dev/null @@ -1,91 +0,0 @@ -########################################################### -## Clear out values of all variables used by rule templates. -########################################################### - -LOCAL_MODULE:= -LOCAL_MODULE_PATH:= -LOCAL_MODULE_STEM:= -LOCAL_BUILT_MODULE:= -LOCAL_BUILT_MODULE_STEM:= -OVERRIDE_BUILT_MODULE_PATH:= -LOCAL_INSTALLED_MODULE:= -LOCAL_UNINSTALLABLE_MODULE:= -LOCAL_INTERMEDIATE_TARGETS:= -LOCAL_UNSTRIPPED_PATH:= -LOCAL_MODULE_CLASS:= -LOCAL_MODULE_SUFFIX:= -LOCAL_PACKAGE_NAME:= -LOCAL_OVERRIDES_PACKAGES:= -LOCAL_EXPORT_PACKAGE_RESOURCES:= -LOCAL_REQUIRED_MODULES:= -LOCAL_ACP_UNAVAILABLE:= -LOCAL_MODULE_TAGS:= -LOCAL_SRC_FILES:= -LOCAL_PREBUILT_OBJ_FILES:= -LOCAL_STATIC_JAVA_LIBRARIES:= -LOCAL_STATIC_LIBRARIES:= -LOCAL_WHOLE_STATIC_LIBRARIES:= -LOCAL_SHARED_LIBRARIES:= -LOCAL_IS_HOST_MODULE:= -LOCAL_CC:= -LOCAL_CXX:= -LOCAL_CPP_EXTENSION:= -LOCAL_NO_DEFAULT_COMPILER_FLAGS:= -LOCAL_ARM_MODE:= -LOCAL_YACCFLAGS:= -LOCAL_ASFLAGS:= -LOCAL_CFLAGS:= -LOCAL_CPPFLAGS:= -LOCAL_C_INCLUDES:= -LOCAL_LDFLAGS:= -LOCAL_LDLIBS:= -LOCAL_AAPT_FLAGS:= -LOCAL_SYSTEM_SHARED_LIBRARIES:=none -LOCAL_PREBUILT_LIBS:= -LOCAL_PREBUILT_EXECUTABLES:= -LOCAL_PREBUILT_JAVA_LIBRARIES:= -LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES:= -LOCAL_INTERMEDIATE_SOURCES:= -LOCAL_JAVA_LIBRARIES:= -LOCAL_NO_STANDARD_LIBRARIES:= -LOCAL_CLASSPATH:= -LOCAL_DROIDDOC_SOURCE_PATH:= -LOCAL_DROIDDOC_TEMPLATE_DIR:= -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:= -LOCAL_DROIDDOC_ASSET_DIR:= -LOCAL_DROIDDOC_CUSTOM_ASSET_DIR:= -LOCAL_DROIDDOC_OPTIONS:= -LOCAL_DROIDDOC_HTML_DIR:= -LOCAL_ASSET_FILES:= -LOCAL_ASSET_DIR:= -LOCAL_RESOURCE_DIR:= -LOCAL_JAVA_RESOURCE_DIRS:= -LOCAL_JAVA_RESOURCE_FILES:= -LOCAL_GENERATED_SOURCES:= -LOCAL_COPY_HEADERS_TO:= -LOCAL_COPY_HEADERS:= -LOCAL_FORCE_STATIC_EXECUTABLE:= -LOCAL_ADDITIONAL_DEPENDENCIES:= -LOCAL_PRELINK_MODULE:= -LOCAL_COMPRESS_MODULE_SYMBOLS:= -LOCAL_STRIP_MODULE:= -LOCAL_POST_PROCESS_COMMAND:=true -LOCAL_JNI_SHARED_LIBRARIES:= -LOCAL_JAR_MANIFEST:= -LOCAL_INSTRUMENTATION_FOR:= -LOCAL_INSTRUMENTATION_FOR_PACKAGE_NAME:= -LOCAL_AIDL_INCLUDES:= -LOCAL_JARJAR_RULES:= -LOCAL_ADDITIONAL_JAVA_DIR:= -LOCAL_ALLOW_UNDEFINED_SYMBOLS:= -LOCAL_DX_FLAGS:= -LOCAL_CERTIFICATE:= -LOCAL_SDK_VERSION:= -LOCAL_NO_EMMA_INSTRUMENT:= -LOCAL_NO_EMMA_COMPILE:= - -# Trim MAKEFILE_LIST so that $(call my-dir) doesn't need to -# iterate over thousands of entries every time. -# Leave the current makefile to make sure we don't break anything -# that expects to be able to find the name of the current makefile. -MAKEFILE_LIST := $(lastword $(MAKEFILE_LIST)) diff --git a/core/combo/darwin-x86.mk b/core/combo/darwin-x86.mk deleted file mode 100644 index 21509609b..000000000 --- a/core/combo/darwin-x86.mk +++ /dev/null @@ -1,97 +0,0 @@ -# Configuration for Darwin (Mac OS X) on PPC. -# Included by combo/select.make - -$(combo_target)GLOBAL_CFLAGS += -fPIC -$(combo_target)NO_UNDEFINED_LDFLAGS := -Wl,-undefined,error - -$(combo_target)CC := $(CC) -$(combo_target)CXX := $(CXX) -$(combo_target)AR := $(AR) - -$(combo_target)SHLIB_SUFFIX := .dylib -$(combo_target)JNILIB_SUFFIX := .jnilib - -$(combo_target)GLOBAL_CFLAGS += \ - -include $(call select-android-config-h,darwin-x86) -$(combo_target)RUN_RANLIB_AFTER_COPYING := true - -ifeq ($(combo_target),TARGET_) -$(combo_target)CUSTOM_LD_COMMAND := true -define transform-o-to-shared-lib-inner - $(TARGET_CXX) \ - -dynamiclib -single_module -read_only_relocs suppress \ - $(TARGET_GLOBAL_LD_DIRS) \ - $(PRIVATE_ALL_OBJECTS) \ - $(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \ - $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \ - $(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \ - $(PRIVATE_LDLIBS) \ - -o $@ \ - $(PRIVATE_LDFLAGS) \ - $(if $(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES),-all_load) \ - $(TARGET_LIBGCC) -endef - -define transform-o-to-executable-inner - $(TARGET_CXX) \ - -o $@ \ - -Wl,-dynamic -headerpad_max_install_names \ - $(TARGET_GLOBAL_LD_DIRS) \ - $(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \ - $(PRIVATE_ALL_OBJECTS) \ - $(PRIVATE_LDLIBS) \ - $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \ - $(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \ - $(TARGET_LIBGCC) -endef - -define transform-o-to-static-executable-inner - $(TARGET_CXX) \ - -static \ - -o $@ \ - $(TARGET_GLOBAL_LD_DIRS) \ - $(PRIVATE_LDFLAGS) \ - $(PRIVATE_ALL_OBJECTS) \ - $(PRIVATE_LDLIBS) \ - $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \ - $(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \ - $(TARGET_LIBGCC) -endef - -else -$(combo_target)CUSTOM_LD_COMMAND := true - -define transform-host-o-to-shared-lib-inner - $(HOST_CXX) \ - -dynamiclib -single_module -read_only_relocs suppress \ - $(HOST_GLOBAL_LD_DIRS) \ - $(PRIVATE_ALL_OBJECTS) \ - $(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \ - $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \ - $(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \ - $(PRIVATE_LDLIBS) \ - -o $@ \ - $(PRIVATE_LDFLAGS) \ - $(HOST_LIBGCC) -endef - -define transform-host-o-to-executable-inner -$(HOST_CXX) \ - -o $@ \ - -Wl,-dynamic -headerpad_max_install_names \ - $(HOST_GLOBAL_LD_DIRS) \ - $(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \ - $(PRIVATE_ALL_OBJECTS) \ - $(PRIVATE_LDLIBS) \ - $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \ - $(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \ - $(HOST_LIBGCC) -endef - -# $(1): The file to check -define get-file-size -stat -f "%z" $(1) -endef - -endif - diff --git a/core/combo/javac.mk b/core/combo/javac.mk deleted file mode 100644 index d4c04e726..000000000 --- a/core/combo/javac.mk +++ /dev/null @@ -1,37 +0,0 @@ -# Selects a Java compiler. -# -# Inputs: -# CUSTOM_JAVA_COMPILER -- "eclipse", "openjdk". or nothing for the system -# default -# -# Outputs: -# COMMON_JAVAC -- Java compiler command with common arguments - -# Whatever compiler is on this system. -ifeq ($(HOST_OS), windows) - COMMON_JAVAC := development/host/windows/prebuilt/javawrap.exe -J-Xmx256m \ - -target 1.5 -Xmaxerrs 9999999 -else - COMMON_JAVAC := javac -J-Xmx512M -target 1.5 -Xmaxerrs 9999999 -endif - -# Eclipse. -ifeq ($(CUSTOM_JAVA_COMPILER), eclipse) - COMMON_JAVAC := java -Xmx256m -jar prebuilt/common/ecj/ecj.jar -5 \ - -maxProblems 9999999 -nowarn - $(info CUSTOM_JAVA_COMPILER=eclipse) -endif - -# OpenJDK. -ifeq ($(CUSTOM_JAVA_COMPILER), openjdk) - # We set the VM options (like -Xmx) in the javac script. - COMMON_JAVAC := prebuilt/common/openjdk/bin/javac -target 1.5 \ - -Xmaxerrs 9999999 - $(info CUSTOM_JAVA_COMPILER=openjdk) -endif - -HOST_JAVAC ?= $(COMMON_JAVAC) -TARGET_JAVAC ?= $(COMMON_JAVAC) - -#$(info HOST_JAVAC=$(HOST_JAVAC)) -#$(info TARGET_JAVAC=$(TARGET_JAVAC)) diff --git a/core/combo/linux-arm.mk b/core/combo/linux-arm.mk deleted file mode 100644 index 507e4dd9c..000000000 --- a/core/combo/linux-arm.mk +++ /dev/null @@ -1,154 +0,0 @@ -# Configuration for Linux on ARM. -# Included by combo/select.make - -# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else -ifeq ($(strip $($(combo_target)TOOLS_PREFIX)),) -$(combo_target)TOOLS_PREFIX := \ - prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-eabi-4.2.1/bin/arm-eabi- -endif - -$(combo_target)CC := $($(combo_target)TOOLS_PREFIX)gcc$(HOST_EXECUTABLE_SUFFIX) -$(combo_target)CXX := $($(combo_target)TOOLS_PREFIX)g++$(HOST_EXECUTABLE_SUFFIX) -$(combo_target)AR := $($(combo_target)TOOLS_PREFIX)ar$(HOST_EXECUTABLE_SUFFIX) -$(combo_target)OBJCOPY := $($(combo_target)TOOLS_PREFIX)objcopy$(HOST_EXECUTABLE_SUFFIX) -$(combo_target)LD := $($(combo_target)TOOLS_PREFIX)ld$(HOST_EXECUTABLE_SUFFIX) - -$(combo_target)NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined - -TARGET_arm_release_CFLAGS := -fomit-frame-pointer \ - -fstrict-aliasing \ - -funswitch-loops \ - -finline-limit=300 - -TARGET_thumb_release_CFLAGS := -mthumb \ - -Os \ - -fomit-frame-pointer \ - -fno-strict-aliasing \ - -finline-limit=64 - -# When building for debug, compile everything as arm. -TARGET_arm_debug_CFLAGS := $(TARGET_arm_release_CFLAGS) -fno-omit-frame-pointer -fno-strict-aliasing -TARGET_thumb_debug_CFLAGS := $(TARGET_thumb_release_CFLAGS) -marm -fno-omit-frame-pointer - -# NOTE: if you try to build a debug build with thumb, several -# of the libraries (libpv, libwebcore, libkjs) need to be built -# with -mlong-calls. When built at -O0, those libraries are -# too big for a thumb "BL