diff --git a/core/envsetup.mk b/core/envsetup.mk index 800a9bf72..b02d8c675 100644 --- a/core/envsetup.mk +++ b/core/envsetup.mk @@ -36,18 +36,6 @@ ifeq ($(strip $(TARGET_BUILD_VARIANT)),) TARGET_BUILD_VARIANT := eng endif -# Read the product specs so we an get TARGET_DEVICE and other -# variables that we need in order to locate the output files. -include $(BUILD_SYSTEM)/product_config.mk - -build_variant := $(filter-out eng user userdebug tests,$(TARGET_BUILD_VARIANT)) -ifneq ($(build_variant)-$(words $(TARGET_BUILD_VARIANT)),-1) -$(warning bad TARGET_BUILD_VARIANT: $(TARGET_BUILD_VARIANT)) -$(error must be empty or one of: eng user userdebug tests) -endif - - - # --------------------------------------------------------------- # Set up configuration for host machine. We don't do cross- # compiles except for arm, so the HOST is whatever we are @@ -119,17 +107,15 @@ else HOST_PREBUILT_TAG := $(HOST_OS)-$(HOST_ARCH) endif -# Default to building dalvikvm on hosts that support it... -ifeq ($(HOST_OS),linux) -# ... but not if we're building the sim... -ifneq ($(TARGET_SIMULATOR),true) -# ... or if the if the option is already set -ifeq ($(WITH_HOST_DALVIK),) - WITH_HOST_DALVIK := true -endif -endif -endif +# Read the product specs so we an get TARGET_DEVICE and other +# variables that we need in order to locate the output files. +include $(BUILD_SYSTEM)/product_config.mk +build_variant := $(filter-out eng user userdebug tests,$(TARGET_BUILD_VARIANT)) +ifneq ($(build_variant)-$(words $(TARGET_BUILD_VARIANT)),-1) +$(warning bad TARGET_BUILD_VARIANT: $(TARGET_BUILD_VARIANT)) +$(error must be empty or one of: eng user userdebug tests) +endif # --------------------------------------------------------------- # Set up configuration for target machine. diff --git a/core/product_config.mk b/core/product_config.mk index 6dc8221bb..60d08e5bc 100644 --- a/core/product_config.mk +++ b/core/product_config.mk @@ -163,6 +163,27 @@ ifdef unbundled_goals $(unbundled_goals): $(MAKECMDGOALS) endif # unbundled_goals +# --------------------------------------------------------------- +# Simulator overrides +ifeq ($(TARGET_PRODUCT),sim) + # Tell the build system to turn on some special cases + # to deal with the simulator product. + TARGET_SIMULATOR := true + # dexpreopt doesn't work when building the simulator + DISABLE_DEXPREOPT := true +endif + +# Default to building dalvikvm on hosts that support it... +ifeq ($(HOST_OS),linux) +# ... but not if we're building the sim... +ifneq ($(TARGET_SIMULATOR),true) +# ... or if the if the option is already set +ifeq ($(WITH_HOST_DALVIK),) + WITH_HOST_DALVIK := true +endif +endif +endif + # --------------------------------------------------------------- # Include the product definitions. # We need to do this to translate TARGET_PRODUCT into its @@ -303,14 +324,3 @@ PRODUCT_OTA_PUBLIC_KEYS := $(sort \ PRODUCT_EXTRA_RECOVERY_KEYS := $(sort \ $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_EXTRA_RECOVERY_KEYS)) - - -# --------------------------------------------------------------- -# Simulator overrides -ifeq ($(TARGET_PRODUCT),sim) - # Tell the build system to turn on some special cases - # to deal with the simulator product. - TARGET_SIMULATOR := true - # dexpreopt doesn't work when building the simulator - DISABLE_DEXPREOPT := true -endif diff --git a/target/product/core.mk b/target/product/core.mk index 604b87c8a..7e93470c3 100644 --- a/target/product/core.mk +++ b/target/product/core.mk @@ -99,6 +99,7 @@ PRODUCT_PACKAGES := \ # host-only dependencies ifeq ($(WITH_HOST_DALVIK),true) PRODUCT_PACKAGES += \ + apache-xml-hostdex \ bouncycastle-hostdex \ core-hostdex \ libjavacore-host \