OLD | NEW |
---|---|
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # This Android makefile is used to build WebView in the Android build system. | 5 # This Android makefile is used to build WebView in the Android build system. |
6 # gyp autogenerates most of the real makefiles, which we include below. | 6 # gyp autogenerates most of the real makefiles, which we include below. |
7 | 7 |
8 # Don't do anything if the product is using a prebuilt webviewchromium, to avoid | 8 # Don't do anything if the product is using a prebuilt webviewchromium, to avoid |
9 # duplicate target definitions between this directory and the prebuilts. | 9 # duplicate target definitions between this directory and the prebuilts. |
10 ifneq ($(PRODUCT_PREBUILT_WEBVIEWCHROMIUM),yes) | 10 ifneq ($(PRODUCT_PREBUILT_WEBVIEWCHROMIUM),yes) |
11 | 11 |
12 CHROMIUM_DIR := $(call my-dir) | 12 CHROMIUM_DIR := $(call my-dir) |
13 | 13 |
14 # We default to release for the Android build system. Developers working on | 14 # We default to release for the Android build system. Developers working on |
15 # WebView code can build with "make GYP_CONFIGURATION=Debug". | 15 # WebView code can build with "make GYP_CONFIGURATION=Debug". |
16 GYP_CONFIGURATION := Release | 16 GYP_CONFIGURATION := Release |
17 | 17 |
18 # Include the manually-written makefile that builds all the WebView java code. | 18 # Include the manually-written makefile that builds all the WebView java code. |
19 include $(CHROMIUM_DIR)/android_webview/Android.mk | 19 include $(CHROMIUM_DIR)/android_webview/Android.mk |
20 | 20 |
21 # If the gyp-generated makefile exists for the current host OS and primary | 21 # If the gyp-generated makefile exists for the current host OS and primary |
22 # target architecture, we need to include it. If it doesn't exist then just do | 22 # target architecture, we need to include it. If it doesn't exist then just do |
23 # nothing, since we may not have finished bringing up this architecture yet. | 23 # nothing, since we may not have finished bringing up this architecture yet. |
24 ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk)) | |
25 | |
24 # We set GYP_VAR_PREFIX to the empty string to indicate that we are building for | 26 # We set GYP_VAR_PREFIX to the empty string to indicate that we are building for |
25 # the primary target architecture. | 27 # the primary target architecture. |
26 ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk)) | |
27 GYP_VAR_PREFIX := | 28 GYP_VAR_PREFIX := |
29 | |
30 # If the host is declared as being 64-bit, set the host multilib variables | |
31 # appropriately to ensure that the host targets are the same "bitness" as the | |
32 # primary target, which is required by V8. | |
33 ifeq ($(HOST_IS_64_BIT),true) | |
34 ifeq ($(TARGET_IS_64_BIT),true) | |
35 GYP_HOST_VAR_PREFIX := | |
36 GYP_HOST_MULTILIB := 64 | |
37 else # Target is 32-bit. | |
38 GYP_HOST_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX) | |
39 GYP_HOST_MULTILIB := 32 | |
40 endif | |
41 endif | |
42 | |
28 include $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk | 43 include $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk |
29 endif | 44 |
45 endif # End primary architecture handling. | |
30 | 46 |
31 # Do the same check for the secondary architecture; if this doesn't exist then | 47 # Do the same check for the secondary architecture; if this doesn't exist then |
32 # the current target platform probably doesn't have a secondary architecture and | 48 # the current target platform probably doesn't have a secondary architecture and |
33 # we can just do nothing. | 49 # we can just do nothing. |
50 ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk)) | |
51 | |
34 # We set GYP_VAR_PREFIX to $(TARGET_2ND_ARCH_VAR_PREFIX) to indicate that we are | 52 # We set GYP_VAR_PREFIX to $(TARGET_2ND_ARCH_VAR_PREFIX) to indicate that we are |
35 # building for the secondary target architecture. | 53 # building for the secondary target architecture. |
36 ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk)) | |
37 GYP_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX) | 54 GYP_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX) |
38 include $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk | 55 |
56 # If the host is declared as being 64-bit, set the host multilib variables | |
57 # appropriately to ensure that the host targets are the same "bitness" as the | |
58 # secondary target, which is required by V8. | |
59 ifeq ($(HOST_IS_64_BIT),true) | |
60 ifeq ($(2ND_TARGET_IS_64_BIT),true) | |
Ying Wang
2014/05/30 21:42:29
This won't happen.
| |
61 GYP_HOST_VAR_PREFIX := | |
62 GYP_HOST_MULTILIB := 64 | |
Ying Wang
2014/05/30 21:42:29
Even if that happens, shouldn't it be set to 32? b
Ying Wang
2014/05/30 21:49:57
Sorry, I mistook the conditional as ifeq ($(2ND_HO
Torne
2014/06/02 10:15:49
Even if it's unlikely it doesn't hurt to have the
Ying Wang
2014/06/02 17:02:54
Sounds good.
Thanks for the change!
| |
63 else # Second target is 32-bit. | |
64 GYP_HOST_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX) | |
65 GYP_HOST_MULTILIB := 32 | |
66 endif | |
39 endif | 67 endif |
40 | 68 |
69 include $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk | |
70 | |
71 endif # End secondary architecture handling. | |
72 | |
41 endif | 73 endif |
OLD | NEW |