The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1 | # Variables we check: |
| 2 | # HOST_BUILD_TYPE = { release debug } |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 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 | |
Joe Onorato | eefd021 | 2009-05-13 00:45:23 -0400 | [diff] [blame] | 9 | # Set up version information. |
| 10 | include $(BUILD_SYSTEM)/version_defaults.mk |
| 11 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 12 | # --------------------------------------------------------------- |
| 13 | # If you update the build system such that the environment setup |
| 14 | # or buildspec.mk need to be updated, increment this number, and |
| 15 | # people who haven't re-run those will have to do so before they |
| 16 | # can build. Make sure to also update the corresponding value in |
| 17 | # buildspec.mk.default and envsetup.sh. |
Jeff Hamilton | 77dfeae | 2010-06-21 18:26:38 -0500 | [diff] [blame] | 18 | CORRECT_BUILD_ENV_SEQUENCE_NUMBER := 10 |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 19 | |
| 20 | # --------------------------------------------------------------- |
Jeff Brown | e33ba4c | 2011-07-11 22:11:46 -0700 | [diff] [blame] | 21 | # The product defaults to generic on hardware |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 22 | # NOTE: This will be overridden in product_config.mk if make |
| 23 | # was invoked with a PRODUCT-xxx-yyy goal. |
| 24 | ifeq ($(TARGET_PRODUCT),) |
Jean-Baptiste Queru | 0332f0a | 2010-10-22 09:52:09 -0700 | [diff] [blame] | 25 | TARGET_PRODUCT := full |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 26 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 27 | |
| 28 | |
| 29 | # the variant -- the set of files that are included for a build |
| 30 | ifeq ($(strip $(TARGET_BUILD_VARIANT)),) |
| 31 | TARGET_BUILD_VARIANT := eng |
| 32 | endif |
| 33 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 34 | # --------------------------------------------------------------- |
| 35 | # Set up configuration for host machine. We don't do cross- |
Raghu Gandham | 8da4310 | 2012-07-25 19:57:22 -0700 | [diff] [blame] | 36 | # compiles except for arm/mips, so the HOST is whatever we are |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 37 | # running on |
| 38 | |
| 39 | UNAME := $(shell uname -sm) |
| 40 | |
| 41 | # HOST_OS |
| 42 | ifneq (,$(findstring Linux,$(UNAME))) |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 43 | HOST_OS := linux |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 44 | endif |
| 45 | ifneq (,$(findstring Darwin,$(UNAME))) |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 46 | HOST_OS := darwin |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 47 | endif |
| 48 | ifneq (,$(findstring Macintosh,$(UNAME))) |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 49 | HOST_OS := darwin |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 50 | endif |
| 51 | ifneq (,$(findstring CYGWIN,$(UNAME))) |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 52 | HOST_OS := windows |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 53 | endif |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 54 | |
| 55 | # BUILD_OS is the real host doing the build. |
| 56 | BUILD_OS := $(HOST_OS) |
| 57 | |
| 58 | # Under Linux, if USE_MINGW is set, we change HOST_OS to Windows to build the |
| 59 | # Windows SDK. Only a subset of tools and SDK will manage to build properly. |
| 60 | ifeq ($(HOST_OS),linux) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 61 | ifneq ($(USE_MINGW),) |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 62 | HOST_OS := windows |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 63 | endif |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 64 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 65 | |
| 66 | ifeq ($(HOST_OS),) |
| 67 | $(error Unable to determine HOST_OS from uname -sm: $(UNAME)!) |
| 68 | endif |
| 69 | |
Ying Wang | 2713fce | 2014-06-09 12:31:12 -0700 | [diff] [blame] | 70 | # TODO: Replace BUILD_HOST_64bit with a flag that forces 32-bit build, |
| 71 | # after we default to 64-bit host build. |
| 72 | ifeq (,$(BUILD_HOST_64bit)) |
| 73 | # Default to 32-bit-by-default multilib host build. |
| 74 | HOST_PREFER_32_BIT := true |
Ying Wang | 966c1e0 | 2014-05-20 14:43:51 -0700 | [diff] [blame] | 75 | ifeq ($(HOST_PREFER_32_BIT),true) |
Ying Wang | 966c1e0 | 2014-05-20 14:43:51 -0700 | [diff] [blame] | 76 | BUILD_HOST_64bit := true |
| 77 | endif |
Ying Wang | 2713fce | 2014-06-09 12:31:12 -0700 | [diff] [blame] | 78 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 79 | |
| 80 | # HOST_ARCH |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 81 | ifneq (,$(findstring x86_64,$(UNAME))) |
Ying Wang | 2713fce | 2014-06-09 12:31:12 -0700 | [diff] [blame] | 82 | HOST_ARCH := x86_64 |
| 83 | HOST_2ND_ARCH := x86 |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 84 | else ifneq (,$(findstring 86,$(UNAME))) |
| 85 | # It's not officially supported! |
| 86 | HOST_ARCH := x86 |
| 87 | HOST_2ND_ARCH := |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 88 | endif |
| 89 | |
Ying Wang | 2713fce | 2014-06-09 12:31:12 -0700 | [diff] [blame] | 90 | ifeq ($(HOST_PREFER_32_BIT),true) |
| 91 | SDK_HOST_ARCH := x86 |
| 92 | else |
| 93 | SDK_HOST_ARCH := $(HOST_ARCH) |
| 94 | endif |
| 95 | |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 96 | BUILD_ARCH := $(HOST_ARCH) |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 97 | BUILD_2ND_ARCH := $(HOST_2ND_ARCH) |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 98 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 99 | ifeq ($(HOST_ARCH),) |
| 100 | $(error Unable to determine HOST_ARCH from uname -sm: $(UNAME)!) |
| 101 | endif |
| 102 | |
| 103 | # the host build defaults to release, and it must be release or debug |
| 104 | ifeq ($(HOST_BUILD_TYPE),) |
| 105 | HOST_BUILD_TYPE := release |
| 106 | endif |
| 107 | |
| 108 | ifneq ($(HOST_BUILD_TYPE),release) |
| 109 | ifneq ($(HOST_BUILD_TYPE),debug) |
| 110 | $(error HOST_BUILD_TYPE must be either release or debug, not '$(HOST_BUILD_TYPE)') |
| 111 | endif |
| 112 | endif |
| 113 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 114 | # We don't want to move all the prebuilt host tools to a $(HOST_OS)-x86_64 dir. |
| 115 | HOST_PREBUILT_ARCH := x86 |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 116 | # This is the standard way to name a directory containing prebuilt host |
| 117 | # objects. E.g., prebuilt/$(HOST_PREBUILT_TAG)/cc |
| 118 | ifeq ($(HOST_OS),windows) |
| 119 | HOST_PREBUILT_TAG := windows |
| 120 | else |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 121 | HOST_PREBUILT_TAG := $(HOST_OS)-$(HOST_PREBUILT_ARCH) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 122 | endif |
| 123 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 124 | # TARGET_COPY_OUT_* are all relative to the staging directory, ie PRODUCT_OUT. |
| 125 | # Define them here so they can be used in product config files. |
| 126 | TARGET_COPY_OUT_SYSTEM := system |
| 127 | TARGET_COPY_OUT_DATA := data |
| 128 | TARGET_COPY_OUT_VENDOR := system/vendor |
| 129 | TARGET_COPY_OUT_ROOT := root |
| 130 | TARGET_COPY_OUT_RECOVERY := recovery |
| 131 | |
Ryo Fujii | cbb3266 | 2011-06-16 16:58:11 -0700 | [diff] [blame] | 132 | # Read the product specs so we an get TARGET_DEVICE and other |
| 133 | # variables that we need in order to locate the output files. |
| 134 | include $(BUILD_SYSTEM)/product_config.mk |
Jesse Wilson | ce7d502 | 2010-09-22 10:59:10 -0700 | [diff] [blame] | 135 | |
Ying Wang | d0244b3 | 2011-11-17 14:51:12 -0800 | [diff] [blame] | 136 | build_variant := $(filter-out eng user userdebug,$(TARGET_BUILD_VARIANT)) |
Ryo Fujii | cbb3266 | 2011-06-16 16:58:11 -0700 | [diff] [blame] | 137 | ifneq ($(build_variant)-$(words $(TARGET_BUILD_VARIANT)),-1) |
| 138 | $(warning bad TARGET_BUILD_VARIANT: $(TARGET_BUILD_VARIANT)) |
Ying Wang | d0244b3 | 2011-11-17 14:51:12 -0800 | [diff] [blame] | 139 | $(error must be empty or one of: eng user userdebug) |
Ryo Fujii | cbb3266 | 2011-06-16 16:58:11 -0700 | [diff] [blame] | 140 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 141 | |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 142 | # Boards may be defined under $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE) |
| 143 | # or under vendor/*/$(TARGET_DEVICE). Search in both places, but |
| 144 | # make sure only one exists. |
| 145 | # Real boards should always be associated with an OEM vendor. |
| 146 | board_config_mk := \ |
| 147 | $(strip $(wildcard \ |
| 148 | $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)/BoardConfig.mk \ |
| 149 | $(shell test -d device && find device -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \ |
| 150 | $(shell test -d vendor && find vendor -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \ |
| 151 | )) |
| 152 | ifeq ($(board_config_mk),) |
| 153 | $(error No config file found for TARGET_DEVICE $(TARGET_DEVICE)) |
| 154 | endif |
| 155 | ifneq ($(words $(board_config_mk)),1) |
| 156 | $(error Multiple board config files for TARGET_DEVICE $(TARGET_DEVICE): $(board_config_mk)) |
| 157 | endif |
| 158 | include $(board_config_mk) |
| 159 | ifeq ($(TARGET_ARCH),) |
| 160 | $(error TARGET_ARCH not defined by board config: $(board_config_mk)) |
| 161 | endif |
| 162 | TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk))) |
| 163 | board_config_mk := |
| 164 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 165 | # --------------------------------------------------------------- |
| 166 | # Set up configuration for target machine. |
| 167 | # The following must be set: |
| 168 | # TARGET_OS = { linux } |
Raghu Gandham | 8da4310 | 2012-07-25 19:57:22 -0700 | [diff] [blame] | 169 | # TARGET_ARCH = { arm | x86 | mips } |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 170 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 171 | TARGET_OS := linux |
Raghu Gandham | 8da4310 | 2012-07-25 19:57:22 -0700 | [diff] [blame] | 172 | # TARGET_ARCH should be set by BoardConfig.mk and will be checked later |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 173 | |
| 174 | # the target build type defaults to release |
| 175 | ifneq ($(TARGET_BUILD_TYPE),debug) |
| 176 | TARGET_BUILD_TYPE := release |
| 177 | endif |
| 178 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 179 | # --------------------------------------------------------------- |
| 180 | # figure out the output directories |
| 181 | |
| 182 | ifeq (,$(strip $(OUT_DIR))) |
Jean-Baptiste Queru | ffe03c9 | 2011-12-06 10:29:46 -0800 | [diff] [blame] | 183 | ifeq (,$(strip $(OUT_DIR_COMMON_BASE))) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 184 | OUT_DIR := $(TOPDIR)out |
Jean-Baptiste Queru | ffe03c9 | 2011-12-06 10:29:46 -0800 | [diff] [blame] | 185 | else |
| 186 | OUT_DIR := $(OUT_DIR_COMMON_BASE)/$(notdir $(PWD)) |
| 187 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 188 | endif |
| 189 | |
| 190 | DEBUG_OUT_DIR := $(OUT_DIR)/debug |
| 191 | |
| 192 | # Move the host or target under the debug/ directory |
| 193 | # if necessary. |
| 194 | TARGET_OUT_ROOT_release := $(OUT_DIR)/target |
| 195 | TARGET_OUT_ROOT_debug := $(DEBUG_OUT_DIR)/target |
| 196 | TARGET_OUT_ROOT := $(TARGET_OUT_ROOT_$(TARGET_BUILD_TYPE)) |
| 197 | |
| 198 | HOST_OUT_ROOT_release := $(OUT_DIR)/host |
| 199 | HOST_OUT_ROOT_debug := $(DEBUG_OUT_DIR)/host |
| 200 | HOST_OUT_ROOT := $(HOST_OUT_ROOT_$(HOST_BUILD_TYPE)) |
| 201 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 202 | # We want to avoid two host bin directories in multilib build. |
| 203 | HOST_OUT_release := $(HOST_OUT_ROOT_release)/$(HOST_OS)-$(HOST_PREBUILT_ARCH) |
| 204 | HOST_OUT_debug := $(HOST_OUT_ROOT_debug)/$(HOST_OS)-$(HOST_PREBUILT_ARCH) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 205 | HOST_OUT := $(HOST_OUT_$(HOST_BUILD_TYPE)) |
| 206 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 207 | BUILD_OUT := $(OUT_DIR)/host/$(BUILD_OS)-$(HOST_PREBUILT_ARCH) |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 208 | |
Jeff Brown | e33ba4c | 2011-07-11 22:11:46 -0700 | [diff] [blame] | 209 | TARGET_PRODUCT_OUT_ROOT := $(TARGET_OUT_ROOT)/product |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 210 | |
| 211 | TARGET_COMMON_OUT_ROOT := $(TARGET_OUT_ROOT)/common |
| 212 | HOST_COMMON_OUT_ROOT := $(HOST_OUT_ROOT)/common |
| 213 | |
| 214 | PRODUCT_OUT := $(TARGET_PRODUCT_OUT_ROOT)/$(TARGET_DEVICE) |
| 215 | |
| 216 | OUT_DOCS := $(TARGET_COMMON_OUT_ROOT)/docs |
| 217 | |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 218 | BUILD_OUT_EXECUTABLES := $(BUILD_OUT)/bin |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 219 | |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 220 | HOST_OUT_EXECUTABLES := $(HOST_OUT)/bin |
| 221 | HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib |
| 222 | HOST_OUT_JAVA_LIBRARIES := $(HOST_OUT)/framework |
Joe Onorato | 64d85d0 | 2009-04-09 19:31:12 -0700 | [diff] [blame] | 223 | HOST_OUT_SDK_ADDON := $(HOST_OUT)/sdk_addon |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 224 | |
| 225 | HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 226 | HOST_OUT_HEADERS := $(HOST_OUT_INTERMEDIATES)/include |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 227 | HOST_OUT_INTERMEDIATE_LIBRARIES := $(HOST_OUT_INTERMEDIATES)/lib |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 228 | HOST_OUT_NOTICE_FILES := $(HOST_OUT_INTERMEDIATES)/NOTICE_FILES |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 229 | HOST_OUT_COMMON_INTERMEDIATES := $(HOST_COMMON_OUT_ROOT)/obj |
| 230 | |
Colin Cross | d826264 | 2014-01-24 23:17:21 -0800 | [diff] [blame] | 231 | HOST_OUT_GEN := $(HOST_OUT)/gen |
| 232 | HOST_OUT_COMMON_GEN := $(HOST_COMMON_OUT_ROOT)/gen |
| 233 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 234 | # Out for HOST_2ND_ARCH |
| 235 | HOST_2ND_ARCH_VAR_PREFIX := 2ND_ |
| 236 | HOST_2ND_ARCH_MODULE_SUFFIX := _32 |
| 237 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj32 |
| 238 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATE_LIBRARIES := $($(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATES)/lib |
Ying Wang | 966c1e0 | 2014-05-20 14:43:51 -0700 | [diff] [blame] | 239 | ifeq ($(HOST_PREFER_32_BIT),true) |
| 240 | # To keep path compatibility, put 32-bit libs in lib/ and 64-bit libs in lib64/. |
| 241 | HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib64 |
| 242 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib |
| 243 | else |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 244 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib32 |
Ying Wang | 966c1e0 | 2014-05-20 14:43:51 -0700 | [diff] [blame] | 245 | endif |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 246 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_EXECUTABLES := $(HOST_OUT_EXECUTABLES) |
| 247 | |
Ying Wang | c459586 | 2014-06-10 12:04:56 -0700 | [diff] [blame^] | 248 | # The default host library path. |
| 249 | # It always points to the path where we build libraries in the default bitness. |
| 250 | HOST_LIBRARY_PATH := $(HOST_OUT)/lib |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 251 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 252 | TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 253 | TARGET_OUT_HEADERS := $(TARGET_OUT_INTERMEDIATES)/include |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 254 | TARGET_OUT_INTERMEDIATE_LIBRARIES := $(TARGET_OUT_INTERMEDIATES)/lib |
| 255 | TARGET_OUT_COMMON_INTERMEDIATES := $(TARGET_COMMON_OUT_ROOT)/obj |
| 256 | |
Colin Cross | d826264 | 2014-01-24 23:17:21 -0800 | [diff] [blame] | 257 | TARGET_OUT_GEN := $(PRODUCT_OUT)/gen |
| 258 | TARGET_OUT_COMMON_GEN := $(TARGET_COMMON_OUT_ROOT)/gen |
| 259 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 260 | TARGET_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 261 | TARGET_OUT_EXECUTABLES := $(TARGET_OUT)/bin |
| 262 | TARGET_OUT_OPTIONAL_EXECUTABLES := $(TARGET_OUT)/xbin |
| 263 | ifneq ($(filter %64,$(TARGET_ARCH)),) |
| 264 | # /system/lib always contains 32-bit libraries, |
| 265 | # and /system/lib64 (if present) always contains 64-bit libraries. |
| 266 | TARGET_OUT_SHARED_LIBRARIES := $(TARGET_OUT)/lib64 |
| 267 | else |
| 268 | TARGET_OUT_SHARED_LIBRARIES := $(TARGET_OUT)/lib |
| 269 | endif |
| 270 | TARGET_OUT_JAVA_LIBRARIES := $(TARGET_OUT)/framework |
| 271 | TARGET_OUT_APPS := $(TARGET_OUT)/app |
Ying Wang | 5338fbf | 2013-05-08 15:49:08 -0700 | [diff] [blame] | 272 | TARGET_OUT_APPS_PRIVILEGED := $(TARGET_OUT)/priv-app |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 273 | TARGET_OUT_KEYLAYOUT := $(TARGET_OUT)/usr/keylayout |
| 274 | TARGET_OUT_KEYCHARS := $(TARGET_OUT)/usr/keychars |
| 275 | TARGET_OUT_ETC := $(TARGET_OUT)/etc |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 276 | TARGET_OUT_NOTICE_FILES := $(TARGET_OUT_INTERMEDIATES)/NOTICE_FILES |
Dima Zavin | 531f524 | 2010-09-27 17:37:17 -0700 | [diff] [blame] | 277 | TARGET_OUT_FAKE := $(PRODUCT_OUT)/fake_packages |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 278 | |
Ying Wang | 1d274d2 | 2013-12-27 11:09:36 -0800 | [diff] [blame] | 279 | # Out for TARGET_2ND_ARCH |
Ying Wang | c459586 | 2014-06-10 12:04:56 -0700 | [diff] [blame^] | 280 | TARGET_2ND_ARCH_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX) |
| 281 | TARGET_2ND_ARCH_MODULE_SUFFIX := $(HOST_2ND_ARCH_MODULE_SUFFIX) |
Ying Wang | 1d274d2 | 2013-12-27 11:09:36 -0800 | [diff] [blame] | 282 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH) |
| 283 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATE_LIBRARIES := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES)/lib |
| 284 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES := $(TARGET_OUT)/lib |
Ying Wang | dd814bf | 2014-01-17 16:17:28 -0800 | [diff] [blame] | 285 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_EXECUTABLES := $(TARGET_OUT_EXECUTABLES) |
Colin Cross | d957446 | 2014-01-24 13:37:07 -0800 | [diff] [blame] | 286 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS := $(TARGET_OUT_APPS) |
| 287 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS_PRIVILEGED := $(TARGET_OUT_APPS_PRIVILEGED) |
Ying Wang | 1d274d2 | 2013-12-27 11:09:36 -0800 | [diff] [blame] | 288 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 289 | TARGET_OUT_DATA := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DATA) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 290 | TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_EXECUTABLES) |
| 291 | TARGET_OUT_DATA_SHARED_LIBRARIES := $(TARGET_OUT_SHARED_LIBRARIES) |
| 292 | TARGET_OUT_DATA_JAVA_LIBRARIES := $(TARGET_OUT_DATA)/framework |
| 293 | TARGET_OUT_DATA_APPS := $(TARGET_OUT_DATA)/app |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 294 | TARGET_OUT_DATA_KEYLAYOUT := $(TARGET_OUT_KEYLAYOUT) |
| 295 | TARGET_OUT_DATA_KEYCHARS := $(TARGET_OUT_KEYCHARS) |
| 296 | TARGET_OUT_DATA_ETC := $(TARGET_OUT_ETC) |
Ying Wang | 4c68174 | 2010-07-20 11:08:47 -0700 | [diff] [blame] | 297 | TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest |
Tsu Chiang Chuang | 40da883 | 2012-07-13 13:47:09 -0700 | [diff] [blame] | 298 | TARGET_OUT_DATA_FAKE := $(TARGET_OUT_DATA)/fake_packages |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 299 | |
Ying Wang | b8e0185 | 2014-01-23 15:09:04 -0800 | [diff] [blame] | 300 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_DATA_EXECUTABLES) |
| 301 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_SHARED_LIBRARIES := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES) |
Colin Cross | d957446 | 2014-01-24 13:37:07 -0800 | [diff] [blame] | 302 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_APPS := $(TARGET_OUT_DATA_APPS) |
Ying Wang | b8e0185 | 2014-01-23 15:09:04 -0800 | [diff] [blame] | 303 | |
Ying Wang | 9f8e8db | 2011-11-04 11:37:01 -0700 | [diff] [blame] | 304 | TARGET_OUT_CACHE := $(PRODUCT_OUT)/cache |
| 305 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 306 | TARGET_OUT_VENDOR := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 307 | TARGET_OUT_VENDOR_EXECUTABLES := $(TARGET_OUT_VENDOR)/bin |
| 308 | TARGET_OUT_VENDOR_OPTIONAL_EXECUTABLES := $(TARGET_OUT_VENDOR)/xbin |
| 309 | ifneq ($(filter %64,$(TARGET_ARCH)),) |
| 310 | TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(TARGET_OUT_VENDOR)/lib64 |
| 311 | else |
| 312 | TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(TARGET_OUT_VENDOR)/lib |
| 313 | endif |
| 314 | TARGET_OUT_VENDOR_JAVA_LIBRARIES := $(TARGET_OUT_VENDOR)/framework |
| 315 | TARGET_OUT_VENDOR_APPS := $(TARGET_OUT_VENDOR)/app |
Ying Wang | 8f77936 | 2011-09-13 13:57:26 -0700 | [diff] [blame] | 316 | TARGET_OUT_VENDOR_ETC := $(TARGET_OUT_VENDOR)/etc |
| 317 | |
Ying Wang | b8e0185 | 2014-01-23 15:09:04 -0800 | [diff] [blame] | 318 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_EXECUTABLES := $(TARGET_OUT_VENDOR_EXECUTABLES) |
Ying Wang | 6ef6519 | 2014-01-15 16:02:16 -0800 | [diff] [blame] | 319 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(TARGET_OUT_VENDOR)/lib |
Colin Cross | d957446 | 2014-01-24 13:37:07 -0800 | [diff] [blame] | 320 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS := $(TARGET_OUT_VENDOR_APPS) |
Ying Wang | 6ef6519 | 2014-01-15 16:02:16 -0800 | [diff] [blame] | 321 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 322 | TARGET_OUT_UNSTRIPPED := $(PRODUCT_OUT)/symbols |
| 323 | TARGET_OUT_EXECUTABLES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/bin |
| 324 | TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/lib |
| 325 | TARGET_ROOT_OUT_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED) |
| 326 | TARGET_ROOT_OUT_SBIN_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/sbin |
| 327 | TARGET_ROOT_OUT_BIN_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/bin |
| 328 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 329 | TARGET_ROOT_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ROOT) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 330 | TARGET_ROOT_OUT_BIN := $(TARGET_ROOT_OUT)/bin |
| 331 | TARGET_ROOT_OUT_SBIN := $(TARGET_ROOT_OUT)/sbin |
| 332 | TARGET_ROOT_OUT_ETC := $(TARGET_ROOT_OUT)/etc |
| 333 | TARGET_ROOT_OUT_USR := $(TARGET_ROOT_OUT)/usr |
| 334 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 335 | TARGET_RECOVERY_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_RECOVERY) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 336 | TARGET_RECOVERY_ROOT_OUT := $(TARGET_RECOVERY_OUT)/root |
| 337 | |
| 338 | TARGET_SYSLOADER_OUT := $(PRODUCT_OUT)/sysloader |
| 339 | TARGET_SYSLOADER_ROOT_OUT := $(TARGET_SYSLOADER_OUT)/root |
| 340 | TARGET_SYSLOADER_SYSTEM_OUT := $(TARGET_SYSLOADER_OUT)/root/system |
| 341 | |
| 342 | TARGET_INSTALLER_OUT := $(PRODUCT_OUT)/installer |
| 343 | TARGET_INSTALLER_DATA_OUT := $(TARGET_INSTALLER_OUT)/data |
| 344 | TARGET_INSTALLER_ROOT_OUT := $(TARGET_INSTALLER_OUT)/root |
| 345 | TARGET_INSTALLER_SYSTEM_OUT := $(TARGET_INSTALLER_OUT)/root/system |
| 346 | |
Ying Wang | 8968653 | 2011-12-16 11:27:52 -0800 | [diff] [blame] | 347 | TARGET_FACTORY_RAMDISK_OUT := $(PRODUCT_OUT)/factory_ramdisk |
| 348 | |
Ying Wang | a83940f | 2010-09-24 18:09:04 -0700 | [diff] [blame] | 349 | COMMON_MODULE_CLASSES := TARGET-NOTICE_FILES HOST-NOTICE_FILES HOST-JAVA_LIBRARIES |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 350 | |
| 351 | ifeq (,$(strip $(DIST_DIR))) |
| 352 | DIST_DIR := $(OUT_DIR)/dist |
| 353 | endif |
| 354 | |
| 355 | ifeq ($(PRINT_BUILD_CONFIG),) |
| 356 | PRINT_BUILD_CONFIG := true |
| 357 | endif |