diff options
Diffstat (limited to 'core/main.mk')
-rw-r--r-- | core/main.mk | 67 |
1 files changed, 39 insertions, 28 deletions
diff --git a/core/main.mk b/core/main.mk index 3d8d6e0..8a5b407 100644 --- a/core/main.mk +++ b/core/main.mk @@ -45,13 +45,18 @@ ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") = 3.82)) $(warning ********************************************************************************) $(warning * You are using version $(MAKE_VERSION) of make.) $(warning * Android can only be built by versions 3.81 and 3.82.) -$(warning * see http://source.android.com/source/download.html) +$(warning * see https://source.android.com/source/download.html) $(warning ********************************************************************************) $(error stopping) endif endif endif +# Absolute path of the present working direcotry. +# This overrides the shell variable $PWD, which does not necessarily points to +# the top of the source tree, for example when "make -C" is used in m/mm/mmm. +PWD := $(shell pwd) + TOP := . TOPDIR := @@ -131,7 +136,7 @@ $(info Your version is: $(shell java -version 2>&1 | head -n 1).) $(info The correct version is: Java SE 1.6.) $(info $(space)) $(info Please follow the machine setup instructions at) -$(info $(space)$(space)$(space)$(space)http://source.android.com/source/download.html) +$(info $(space)$(space)$(space)$(space)https://source.android.com/source/download.html) $(info ************************************************************) $(error stop) endif @@ -147,7 +152,7 @@ $(info Your version is: $(shell javac -version 2>&1 | head -n 1).) $(info The correct version is: 1.6.) $(info $(space)) $(info Please follow the machine setup instructions at) -$(info $(space)$(space)$(space)$(space)http://source.android.com/source/download.html) +$(info $(space)$(space)$(space)$(space)https://source.android.com/source/download.html) $(info ************************************************************) $(error stop) endif @@ -183,7 +188,7 @@ include $(BUILD_SYSTEM)/definitions.mk # Bring in dex_preopt.mk include $(BUILD_SYSTEM)/dex_preopt.mk -ifneq ($(filter eng user userdebug tests,$(MAKECMDGOALS)),) +ifneq ($(filter eng user userdebug,$(MAKECMDGOALS)),) $(info ***************************************************************) $(info ***************************************************************) $(info Don't pass '$(filter eng user userdebug tests,$(MAKECMDGOALS))' on \ @@ -207,6 +212,11 @@ $(info ***************************************************************) $(error stopping) endif +# ----------------------------------------------------------------- +# The pdk (Platform Development Kit) build +include build/core/pdk_config.mk + +# ----------------------------------------------------------------- ### ### In this section we set up the things that are different ### between the build variants @@ -322,17 +332,6 @@ ifneq ($(filter dalvik.gc.type-precise,$(PRODUCT_TAGS)),) ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.dexopt-flags=m=y endif -ifneq ($(BUILD_TINY_ANDROID),true) -# Install an apns-conf.xml file if one's not already being installed. -ifeq (,$(filter %:system/etc/apns-conf.xml, $(PRODUCT_COPY_FILES))) - PRODUCT_COPY_FILES += \ - development/data/etc/apns-conf_sdk.xml:system/etc/apns-conf.xml - ifeq ($(filter eng tests,$(TARGET_BUILD_VARIANT)),) - $(warning implicitly installing apns-conf_sdk.xml) - endif -endif -endif - ADDITIONAL_BUILD_PROPERTIES += net.bt.name=Android # enable vm tracing in files for now to help track @@ -416,11 +415,11 @@ subdirs := \ build/libs \ build/target \ build/tools/acp \ + external/gcc-demangle \ external/mksh \ external/yaffs2 \ external/zlib else # !BUILD_TINY_ANDROID - # # Typical build; include any Android.mk files we can find. # @@ -467,8 +466,12 @@ subdir_makefiles := \ $(shell build/tools/findleaves.py --prune=out --prune=.repo --prune=.git $(subdirs) Android.mk) include $(subdir_makefiles) + endif # ONE_SHOT_MAKEFILE +# Now with all Android.mks loaded we can do post cleaning steps. +include $(BUILD_SYSTEM)/post_clean.mk + ifeq ($(stash_product_vars),true) $(call assert-product-vars, __STASHED) endif @@ -552,13 +555,9 @@ ifdef FULL_BUILD # The base list of modules to build for this product is specified # by the appropriate product definition file, which was included # by product_config.make. - user_PACKAGES := $(call module-installed-files, \ - $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES)) - ifeq (0,1) - $(info user packages for $(TARGET_DEVICE) ($(INTERNAL_PRODUCT)):) - $(foreach p,$(user_PACKAGES),$(info : $(p))) - $(error done) - endif + user_PACKAGES := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES) + $(call expand-required-modules,user_PACKAGES,$(user_PACKAGES)) + user_PACKAGES := $(call module-installed-files, $(user_PACKAGES)) else # We're not doing a full build, and are probably only including # a subset of the module makefiles. Don't try to build any modules @@ -669,6 +668,9 @@ checkbuild: $(modules_to_check) .PHONY: ramdisk ramdisk: $(INSTALLED_RAMDISK_TARGET) +.PHONY: factory_ramdisk +factory_ramdisk: $(INSTALLED_FACTORY_RAMDISK_TARGET) + .PHONY: systemtarball systemtarball: $(INSTALLED_SYSTEMTARBALL_TARGET) @@ -685,6 +687,9 @@ endif .PHONY: userdatatarball userdatatarball: $(INSTALLED_USERDATATARBALL_TARGET) +.PHONY: cacheimage +cacheimage: $(INSTALLED_CACHEIMAGE_TARGET) + .PHONY: bootimage bootimage: $(INSTALLED_BOOTIMAGE_TARGET) @@ -699,6 +704,7 @@ droidcore: files \ $(INSTALLED_BOOTIMAGE_TARGET) \ $(INSTALLED_RECOVERYIMAGE_TARGET) \ $(INSTALLED_USERDATAIMAGE_TARGET) \ + $(INSTALLED_CACHEIMAGE_TARGET) \ $(INSTALLED_FILES_FILE) # dist_files only for putting your library into the dist directory with a full build. @@ -737,16 +743,22 @@ else # TARGET_BUILD_APPS $(INTERNAL_UPDATE_PACKAGE_TARGET) \ $(INTERNAL_OTA_PACKAGE_TARGET) \ $(SYMBOLS_ZIP) \ - $(APPS_ZIP) \ - $(INTERNAL_EMULATOR_PACKAGE_TARGET) \ - $(PACKAGE_STATS_FILE) \ $(INSTALLED_FILES_FILE) \ $(INSTALLED_BUILD_PROP_TARGET) \ $(BUILT_TARGET_FILES_PACKAGE) \ $(INSTALLED_ANDROID_INFO_TXT_TARGET) \ $(INSTALLED_RAMDISK_TARGET) \ + $(INSTALLED_FACTORY_RAMDISK_TARGET) \ ) + ifneq ($(TARGET_BUILD_PDK),true) + $(call dist-for-goals, droidcore, \ + $(APPS_ZIP) \ + $(INTERNAL_EMULATOR_PACKAGE_TARGET) \ + $(PACKAGE_STATS_FILE) \ + ) + endif + # Building a full system-- the default is to build droidcore droid: droidcore dist_files @@ -754,8 +766,7 @@ endif # TARGET_BUILD_APPS endif # droid in $(MAKECMDGOALS) -.PHONY: droid tests -tests: droidcore +.PHONY: droid # phony target that include any targets in $(ALL_MODULES) .PHONY: all_modules |