Home | History | Annotate | Download | only in core
      1 # Variables we check:
      2 #     HOST_BUILD_TYPE = { release debug }
      3 #     TARGET_BUILD_TYPE = { release debug }
      4 # and we output a bunch of variables, see the case statement at
      5 # the bottom for the full list
      6 #     OUT_DIR is also set to "out" if it's not already set.
      7 #         this allows you to set it to somewhere else if you like
      8 #     SCAN_EXCLUDE_DIRS is an optional, whitespace separated list of
      9 #         directories that will also be excluded from full checkout tree
     10 #         searches for source or make files, in addition to OUT_DIR.
     11 #         This can be useful if you set OUT_DIR to be a different directory
     12 #         than other outputs of your build system.
     13 
     14 # Set up version information.
     15 include $(BUILD_SYSTEM)/version_defaults.mk
     16 
     17 # ---------------------------------------------------------------
     18 # If you update the build system such that the environment setup
     19 # or buildspec.mk need to be updated, increment this number, and
     20 # people who haven't re-run those will have to do so before they
     21 # can build.  Make sure to also update the corresponding value in
     22 # buildspec.mk.default and envsetup.sh.
     23 CORRECT_BUILD_ENV_SEQUENCE_NUMBER := 10
     24 
     25 # ---------------------------------------------------------------
     26 # The product defaults to generic on hardware
     27 # NOTE: This will be overridden in product_config.mk if make
     28 # was invoked with a PRODUCT-xxx-yyy goal.
     29 ifeq ($(TARGET_PRODUCT),)
     30 TARGET_PRODUCT := full
     31 endif
     32 
     33 
     34 # the variant -- the set of files that are included for a build
     35 ifeq ($(strip $(TARGET_BUILD_VARIANT)),)
     36 TARGET_BUILD_VARIANT := eng
     37 endif
     38 
     39 # ---------------------------------------------------------------
     40 # Set up configuration for host machine.  We don't do cross-
     41 # compiles except for arm/mips, so the HOST is whatever we are
     42 # running on
     43 
     44 UNAME := $(shell uname -sm)
     45 
     46 # HOST_OS
     47 ifneq (,$(findstring Linux,$(UNAME)))
     48   HOST_OS := linux
     49 endif
     50 ifneq (,$(findstring Darwin,$(UNAME)))
     51   HOST_OS := darwin
     52 endif
     53 ifneq (,$(findstring Macintosh,$(UNAME)))
     54   HOST_OS := darwin
     55 endif
     56 ifneq (,$(findstring CYGWIN,$(UNAME)))
     57   HOST_OS := windows
     58 endif
     59 
     60 # BUILD_OS is the real host doing the build.
     61 BUILD_OS := $(HOST_OS)
     62 
     63 # Under Linux, if USE_MINGW is set, we change HOST_OS to Windows to build the
     64 # Windows SDK. Only a subset of tools and SDK will manage to build properly.
     65 ifeq ($(HOST_OS),linux)
     66 ifdef USE_MINGW
     67   HOST_OS := windows
     68 endif
     69 endif
     70 
     71 ifeq ($(HOST_OS),)
     72 $(error Unable to determine HOST_OS from uname -sm: $(UNAME)!)
     73 endif
     74 
     75 # HOST_ARCH
     76 ifneq (,$(findstring x86_64,$(UNAME)))
     77   HOST_ARCH := x86_64
     78   HOST_2ND_ARCH := x86
     79   HOST_IS_64_BIT := true
     80 else
     81 ifneq (,$(findstring x86,$(UNAME)))
     82 $(error Building on a 32-bit x86 host is not supported: $(UNAME)!)
     83 endif
     84 endif
     85 
     86 BUILD_ARCH := $(HOST_ARCH)
     87 BUILD_2ND_ARCH := $(HOST_2ND_ARCH)
     88 
     89 ifeq ($(HOST_ARCH),)
     90 $(error Unable to determine HOST_ARCH from uname -sm: $(UNAME)!)
     91 endif
     92 
     93 # the host build defaults to release, and it must be release or debug
     94 ifeq ($(HOST_BUILD_TYPE),)
     95 HOST_BUILD_TYPE := release
     96 endif
     97 
     98 ifneq ($(HOST_BUILD_TYPE),release)
     99 ifneq ($(HOST_BUILD_TYPE),debug)
    100 $(error HOST_BUILD_TYPE must be either release or debug, not '$(HOST_BUILD_TYPE)')
    101 endif
    102 endif
    103 
    104 # We don't want to move all the prebuilt host tools to a $(HOST_OS)-x86_64 dir.
    105 HOST_PREBUILT_ARCH := x86
    106 # This is the standard way to name a directory containing prebuilt host
    107 # objects. E.g., prebuilt/$(HOST_PREBUILT_TAG)/cc
    108 ifeq ($(HOST_OS),windows)
    109   HOST_PREBUILT_TAG := windows
    110 else
    111   HOST_PREBUILT_TAG := $(HOST_OS)-$(HOST_PREBUILT_ARCH)
    112 endif
    113 
    114 # TARGET_COPY_OUT_* are all relative to the staging directory, ie PRODUCT_OUT.
    115 # Define them here so they can be used in product config files.
    116 TARGET_COPY_OUT_SYSTEM := system
    117 TARGET_COPY_OUT_DATA := data
    118 TARGET_COPY_OUT_OEM := oem
    119 TARGET_COPY_OUT_ODM := odm
    120 TARGET_COPY_OUT_ROOT := root
    121 TARGET_COPY_OUT_RECOVERY := recovery
    122 ###########################################
    123 # Define TARGET_COPY_OUT_VENDOR to a placeholder, for at this point
    124 # we don't know if the device wants to build a separate vendor.img
    125 # or just build vendor stuff into system.img.
    126 # A device can set up TARGET_COPY_OUT_VENDOR to "vendor" in its
    127 # BoardConfig.mk.
    128 # We'll substitute with the real value after loading BoardConfig.mk.
    129 _vendor_path_placeholder := ||VENDOR-PATH-PH||
    130 TARGET_COPY_OUT_VENDOR := $(_vendor_path_placeholder)
    131 ###########################################
    132 
    133 # Read the product specs so we can get TARGET_DEVICE and other
    134 # variables that we need in order to locate the output files.
    135 include $(BUILD_SYSTEM)/product_config.mk
    136 
    137 build_variant := $(filter-out eng user userdebug,$(TARGET_BUILD_VARIANT))
    138 ifneq ($(build_variant)-$(words $(TARGET_BUILD_VARIANT)),-1)
    139 $(warning bad TARGET_BUILD_VARIANT: $(TARGET_BUILD_VARIANT))
    140 $(error must be empty or one of: eng user userdebug)
    141 endif
    142 
    143 # Build host as 32-bit for SDK build.
    144 ifneq ($(filter $(MAKECMDGOALS),win_sdk sdk),)
    145 HOST_PREFER_32_BIT := true
    146 endif
    147 ifdef USE_MINGW
    148 # We only build sdk host tools in the MinGW windows build.
    149 # Build it as 32-bit as well.
    150 HOST_PREFER_32_BIT := true
    151 endif
    152 SDK_HOST_ARCH := x86
    153 
    154 # Boards may be defined under $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)
    155 # or under vendor/*/$(TARGET_DEVICE).  Search in both places, but
    156 # make sure only one exists.
    157 # Real boards should always be associated with an OEM vendor.
    158 board_config_mk := \
    159 	$(strip $(wildcard \
    160 		$(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)/BoardConfig.mk \
    161 		$(shell test -d device && find device -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \
    162 		$(shell test -d vendor && find vendor -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \
    163 	))
    164 ifeq ($(board_config_mk),)
    165   $(error No config file found for TARGET_DEVICE $(TARGET_DEVICE))
    166 endif
    167 ifneq ($(words $(board_config_mk)),1)
    168   $(error Multiple board config files for TARGET_DEVICE $(TARGET_DEVICE): $(board_config_mk))
    169 endif
    170 include $(board_config_mk)
    171 ifeq ($(TARGET_ARCH),)
    172   $(error TARGET_ARCH not defined by board config: $(board_config_mk))
    173 endif
    174 TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk)))
    175 board_config_mk :=
    176 
    177 ###########################################
    178 # Now we can substitute with the real value of TARGET_COPY_OUT_VENDOR
    179 ifeq ($(TARGET_COPY_OUT_VENDOR),$(_vendor_path_placeholder))
    180 TARGET_COPY_OUT_VENDOR := system/vendor
    181 else ifeq ($(filter vendor system/vendor,$(TARGET_COPY_OUT_VENDOR)),)
    182 $(error TARGET_COPY_OUT_VENDOR must be either 'vendor' or 'system/vendor', seeing '$(TARGET_COPY_OUT_VENDOR)'.)
    183 endif
    184 PRODUCT_COPY_FILES := $(subst $(_vendor_path_placeholder),$(TARGET_COPY_OUT_VENDOR),$(PRODUCT_COPY_FILES))
    185 ###########################################
    186 
    187 
    188 # ---------------------------------------------------------------
    189 # Set up configuration for target machine.
    190 # The following must be set:
    191 # 		TARGET_OS = { linux }
    192 # 		TARGET_ARCH = { arm | x86 | mips }
    193 
    194 TARGET_OS := linux
    195 # TARGET_ARCH should be set by BoardConfig.mk and will be checked later
    196 ifneq ($(filter %64,$(TARGET_ARCH)),)
    197 TARGET_IS_64_BIT := true
    198 endif
    199 
    200 # the target build type defaults to release
    201 ifneq ($(TARGET_BUILD_TYPE),debug)
    202 TARGET_BUILD_TYPE := release
    203 endif
    204 
    205 # ---------------------------------------------------------------
    206 # figure out the output directories
    207 
    208 ifeq (,$(strip $(OUT_DIR)))
    209 ifeq (,$(strip $(OUT_DIR_COMMON_BASE)))
    210 OUT_DIR := $(TOPDIR)out
    211 else
    212 OUT_DIR := $(OUT_DIR_COMMON_BASE)/$(notdir $(PWD))
    213 endif
    214 endif
    215 
    216 DEBUG_OUT_DIR := $(OUT_DIR)/debug
    217 
    218 # Move the host or target under the debug/ directory
    219 # if necessary.
    220 TARGET_OUT_ROOT_release := $(OUT_DIR)/target
    221 TARGET_OUT_ROOT_debug := $(DEBUG_OUT_DIR)/target
    222 TARGET_OUT_ROOT := $(TARGET_OUT_ROOT_$(TARGET_BUILD_TYPE))
    223 
    224 HOST_OUT_ROOT_release := $(OUT_DIR)/host
    225 HOST_OUT_ROOT_debug := $(DEBUG_OUT_DIR)/host
    226 HOST_OUT_ROOT := $(HOST_OUT_ROOT_$(HOST_BUILD_TYPE))
    227 
    228 # We want to avoid two host bin directories in multilib build.
    229 HOST_OUT_release := $(HOST_OUT_ROOT_release)/$(HOST_OS)-$(HOST_PREBUILT_ARCH)
    230 HOST_OUT_debug := $(HOST_OUT_ROOT_debug)/$(HOST_OS)-$(HOST_PREBUILT_ARCH)
    231 HOST_OUT := $(HOST_OUT_$(HOST_BUILD_TYPE))
    232 
    233 BUILD_OUT := $(OUT_DIR)/host/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)
    234 
    235 TARGET_PRODUCT_OUT_ROOT := $(TARGET_OUT_ROOT)/product
    236 
    237 TARGET_COMMON_OUT_ROOT := $(TARGET_OUT_ROOT)/common
    238 HOST_COMMON_OUT_ROOT := $(HOST_OUT_ROOT)/common
    239 
    240 PRODUCT_OUT := $(TARGET_PRODUCT_OUT_ROOT)/$(TARGET_DEVICE)
    241 
    242 OUT_DOCS := $(TARGET_COMMON_OUT_ROOT)/docs
    243 
    244 BUILD_OUT_EXECUTABLES := $(BUILD_OUT)/bin
    245 
    246 HOST_OUT_EXECUTABLES := $(HOST_OUT)/bin
    247 HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib64
    248 HOST_OUT_JAVA_LIBRARIES := $(HOST_OUT)/framework
    249 HOST_OUT_SDK_ADDON := $(HOST_OUT)/sdk_addon
    250 
    251 HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj
    252 HOST_OUT_HEADERS := $(HOST_OUT_INTERMEDIATES)/include
    253 HOST_OUT_INTERMEDIATE_LIBRARIES := $(HOST_OUT_INTERMEDIATES)/lib
    254 HOST_OUT_NOTICE_FILES := $(HOST_OUT_INTERMEDIATES)/NOTICE_FILES
    255 HOST_OUT_COMMON_INTERMEDIATES := $(HOST_COMMON_OUT_ROOT)/obj
    256 HOST_OUT_FAKE := $(HOST_OUT)/fake_packages
    257 
    258 HOST_OUT_GEN := $(HOST_OUT)/gen
    259 HOST_OUT_COMMON_GEN := $(HOST_COMMON_OUT_ROOT)/gen
    260 
    261 # Out for HOST_2ND_ARCH
    262 HOST_2ND_ARCH_VAR_PREFIX := 2ND_
    263 HOST_2ND_ARCH_MODULE_SUFFIX := _32
    264 $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj32
    265 $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATE_LIBRARIES := $($(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATES)/lib
    266 $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib
    267 $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_EXECUTABLES := $(HOST_OUT_EXECUTABLES)
    268 
    269 # The default host library path.
    270 # It always points to the path where we build libraries in the default bitness.
    271 ifeq ($(HOST_PREFER_32_BIT),true)
    272 HOST_LIBRARY_PATH := $($(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_SHARED_LIBRARIES)
    273 else
    274 HOST_LIBRARY_PATH := $(HOST_OUT_SHARED_LIBRARIES)
    275 endif
    276 
    277 TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj
    278 TARGET_OUT_HEADERS := $(TARGET_OUT_INTERMEDIATES)/include
    279 TARGET_OUT_INTERMEDIATE_LIBRARIES := $(TARGET_OUT_INTERMEDIATES)/lib
    280 TARGET_OUT_COMMON_INTERMEDIATES := $(TARGET_COMMON_OUT_ROOT)/obj
    281 
    282 TARGET_OUT_GEN := $(PRODUCT_OUT)/gen
    283 TARGET_OUT_COMMON_GEN := $(TARGET_COMMON_OUT_ROOT)/gen
    284 
    285 TARGET_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM)
    286 TARGET_OUT_EXECUTABLES := $(TARGET_OUT)/bin
    287 TARGET_OUT_OPTIONAL_EXECUTABLES := $(TARGET_OUT)/xbin
    288 ifeq ($(TARGET_IS_64_BIT),true)
    289 # /system/lib always contains 32-bit libraries,
    290 # and /system/lib64 (if present) always contains 64-bit libraries.
    291 TARGET_OUT_SHARED_LIBRARIES := $(TARGET_OUT)/lib64
    292 else
    293 TARGET_OUT_SHARED_LIBRARIES := $(TARGET_OUT)/lib
    294 endif
    295 TARGET_OUT_JAVA_LIBRARIES := $(TARGET_OUT)/framework
    296 TARGET_OUT_APPS := $(TARGET_OUT)/app
    297 TARGET_OUT_APPS_PRIVILEGED := $(TARGET_OUT)/priv-app
    298 TARGET_OUT_KEYLAYOUT := $(TARGET_OUT)/usr/keylayout
    299 TARGET_OUT_KEYCHARS := $(TARGET_OUT)/usr/keychars
    300 TARGET_OUT_ETC := $(TARGET_OUT)/etc
    301 TARGET_OUT_NOTICE_FILES := $(TARGET_OUT_INTERMEDIATES)/NOTICE_FILES
    302 TARGET_OUT_FAKE := $(PRODUCT_OUT)/fake_packages
    303 
    304 # Out for TARGET_2ND_ARCH
    305 TARGET_2ND_ARCH_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX)
    306 TARGET_2ND_ARCH_MODULE_SUFFIX := $(HOST_2ND_ARCH_MODULE_SUFFIX)
    307 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)
    308 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATE_LIBRARIES := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES)/lib
    309 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES := $(TARGET_OUT)/lib
    310 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_EXECUTABLES := $(TARGET_OUT_EXECUTABLES)
    311 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS := $(TARGET_OUT_APPS)
    312 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS_PRIVILEGED := $(TARGET_OUT_APPS_PRIVILEGED)
    313 
    314 TARGET_OUT_DATA := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DATA)
    315 TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_EXECUTABLES)
    316 TARGET_OUT_DATA_SHARED_LIBRARIES := $(TARGET_OUT_SHARED_LIBRARIES)
    317 TARGET_OUT_DATA_JAVA_LIBRARIES := $(TARGET_OUT_DATA)/framework
    318 TARGET_OUT_DATA_APPS := $(TARGET_OUT_DATA)/app
    319 TARGET_OUT_DATA_KEYLAYOUT := $(TARGET_OUT_KEYLAYOUT)
    320 TARGET_OUT_DATA_KEYCHARS := $(TARGET_OUT_KEYCHARS)
    321 TARGET_OUT_DATA_ETC := $(TARGET_OUT_ETC)
    322 ifeq ($(TARGET_IS_64_BIT),true)
    323 TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest64
    324 else
    325 TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest
    326 endif
    327 TARGET_OUT_DATA_FAKE := $(TARGET_OUT_DATA)/fake_packages
    328 
    329 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_DATA_EXECUTABLES)
    330 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_SHARED_LIBRARIES := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES)
    331 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_APPS := $(TARGET_OUT_DATA_APPS)
    332 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest
    333 
    334 TARGET_OUT_CACHE := $(PRODUCT_OUT)/cache
    335 
    336 TARGET_OUT_VENDOR := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR)
    337 TARGET_OUT_VENDOR_EXECUTABLES := $(TARGET_OUT_VENDOR)/bin
    338 TARGET_OUT_VENDOR_OPTIONAL_EXECUTABLES := $(TARGET_OUT_VENDOR)/xbin
    339 ifeq ($(TARGET_IS_64_BIT),true)
    340 TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(TARGET_OUT_VENDOR)/lib64
    341 else
    342 TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(TARGET_OUT_VENDOR)/lib
    343 endif
    344 TARGET_OUT_VENDOR_JAVA_LIBRARIES := $(TARGET_OUT_VENDOR)/framework
    345 TARGET_OUT_VENDOR_APPS := $(TARGET_OUT_VENDOR)/app
    346 TARGET_OUT_VENDOR_ETC := $(TARGET_OUT_VENDOR)/etc
    347 
    348 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_EXECUTABLES := $(TARGET_OUT_VENDOR_EXECUTABLES)
    349 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(TARGET_OUT_VENDOR)/lib
    350 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS := $(TARGET_OUT_VENDOR_APPS)
    351 
    352 TARGET_OUT_OEM := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_OEM)
    353 TARGET_OUT_OEM_EXECUTABLES := $(TARGET_OUT_OEM)/bin
    354 ifeq ($(TARGET_IS_64_BIT),true)
    355 TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib64
    356 else
    357 TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib
    358 endif
    359 # We don't expect Java libraries in the oem.img.
    360 # TARGET_OUT_OEM_JAVA_LIBRARIES:= $(TARGET_OUT_OEM)/framework
    361 TARGET_OUT_OEM_APPS := $(TARGET_OUT_OEM)/app
    362 TARGET_OUT_OEM_ETC := $(TARGET_OUT_OEM)/etc
    363 
    364 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_EXECUTABLES := $(TARGET_OUT_OEM_EXECUTABLES)
    365 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib
    366 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_APPS := $(TARGET_OUT_OEM_APPS)
    367 
    368 TARGET_OUT_ODM := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ODM)
    369 TARGET_OUT_ODM_EXECUTABLES := $(TARGET_OUT_ODM)/bin
    370 ifeq ($(TARGET_IS_64_BIT),true)
    371 TARGET_OUT_ODM_SHARED_LIBRARIES := $(TARGET_OUT_ODM)/lib64
    372 else
    373 TARGET_OUT_ODM_SHARED_LIBRARIES := $(TARGET_OUT_ODM)/lib
    374 endif
    375 TARGET_OUT_ODM_APPS := $(TARGET_OUT_ODM)/app
    376 TARGET_OUT_ODM_ETC := $(TARGET_OUT_ODM)/etc
    377 
    378 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_EXECUTABLES := $(TARGET_OUT_ODM_EXECUTABLES)
    379 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_SHARED_LIBRARIES := $(TARGET_OUT_ODM)/lib
    380 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_APPS := $(TARGET_OUT_ODM_APPS)
    381 
    382 TARGET_OUT_UNSTRIPPED := $(PRODUCT_OUT)/symbols
    383 TARGET_OUT_EXECUTABLES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/bin
    384 TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/lib
    385 TARGET_OUT_VENDOR_SHARED_LIBRARIES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/$(TARGET_COPY_OUT_VENDOR)/lib
    386 TARGET_ROOT_OUT_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)
    387 TARGET_ROOT_OUT_SBIN_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/sbin
    388 TARGET_ROOT_OUT_BIN_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/bin
    389 
    390 TARGET_ROOT_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ROOT)
    391 TARGET_ROOT_OUT_BIN := $(TARGET_ROOT_OUT)/bin
    392 TARGET_ROOT_OUT_SBIN := $(TARGET_ROOT_OUT)/sbin
    393 TARGET_ROOT_OUT_ETC := $(TARGET_ROOT_OUT)/etc
    394 TARGET_ROOT_OUT_USR := $(TARGET_ROOT_OUT)/usr
    395 
    396 TARGET_RECOVERY_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_RECOVERY)
    397 TARGET_RECOVERY_ROOT_OUT := $(TARGET_RECOVERY_OUT)/root
    398 
    399 TARGET_SYSLOADER_OUT := $(PRODUCT_OUT)/sysloader
    400 TARGET_SYSLOADER_ROOT_OUT := $(TARGET_SYSLOADER_OUT)/root
    401 TARGET_SYSLOADER_SYSTEM_OUT := $(TARGET_SYSLOADER_OUT)/root/system
    402 
    403 TARGET_INSTALLER_OUT := $(PRODUCT_OUT)/installer
    404 TARGET_INSTALLER_DATA_OUT := $(TARGET_INSTALLER_OUT)/data
    405 TARGET_INSTALLER_ROOT_OUT := $(TARGET_INSTALLER_OUT)/root
    406 TARGET_INSTALLER_SYSTEM_OUT := $(TARGET_INSTALLER_OUT)/root/system
    407 
    408 COMMON_MODULE_CLASSES := TARGET-NOTICE_FILES HOST-NOTICE_FILES HOST-JAVA_LIBRARIES
    409 
    410 ifeq (,$(strip $(DIST_DIR)))
    411   DIST_DIR := $(OUT_DIR)/dist
    412 endif
    413 
    414 ifeq ($(PRINT_BUILD_CONFIG),)
    415 PRINT_BUILD_CONFIG := true
    416 endif
    417