| OLD | NEW |
| (Empty) |
| 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 | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 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. | |
| 7 | |
| 8 LOCAL_PATH := $(call my-dir) | |
| 9 CHROMIUM_DIR := $(LOCAL_PATH) | |
| 10 | |
| 11 # We default to release for the Android build system. Developers working on | |
| 12 # WebView code can build with "make GYP_CONFIGURATION=Debug". | |
| 13 GYP_CONFIGURATION := Release | |
| 14 | |
| 15 # If the product is using a prebuilt libwebviewchromium then we need to skip | |
| 16 # including most of the makefiles to avoid duplicate target definitions. Some | |
| 17 # targets are still needed, so list their makefiles explicitly. | |
| 18 ifeq ($(PRODUCT_PREBUILT_WEBVIEWCHROMIUM),yes) | |
| 19 GYP_MAKEFILE_STEMS := \ | |
| 20 $(addprefix $(CHROMIUM_DIR)/v8/tools/gyp/, \ | |
| 21 generate_trig_table.host \ | |
| 22 js2c.host \ | |
| 23 mksnapshot.host \ | |
| 24 v8_base.host \ | |
| 25 v8_libbase.host \ | |
| 26 v8_nosnapshot.host \ | |
| 27 v8_base.target \ | |
| 28 v8_libbase.target \ | |
| 29 v8_snapshot.target \ | |
| 30 ) \ | |
| 31 $(addprefix $(CHROMIUM_DIR)/third_party/icu/, \ | |
| 32 icudata.host \ | |
| 33 icui18n.host \ | |
| 34 icuuc.host \ | |
| 35 icui18n.target \ | |
| 36 icuuc.target \ | |
| 37 system_icu.target \ | |
| 38 ) | |
| 39 else | |
| 40 # Not using a prebuilt; include the manually-written makefile that builds all | |
| 41 # the WebView java code, and use the main autogenerated makefile. | |
| 42 include $(CHROMIUM_DIR)/android_webview/Android.mk | |
| 43 GYP_MAKEFILE_STEMS := $(CHROMIUM_DIR)/GypAndroid | |
| 44 endif | |
| 45 | |
| 46 # If the gyp-generated makefile exists for the current host OS and primary | |
| 47 # target architecture, we need to include it. If it doesn't exist then just do | |
| 48 # nothing, since we may not have finished bringing up this architecture yet. | |
| 49 ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk)) | |
| 50 | |
| 51 # We set GYP_VAR_PREFIX to the empty string to indicate that we are building for | |
| 52 # the primary target architecture. | |
| 53 GYP_VAR_PREFIX := | |
| 54 | |
| 55 # If the host is declared as being 64-bit, set the host multilib variables | |
| 56 # appropriately to ensure that the host targets are the same "bitness" as the | |
| 57 # primary target, which is required by V8. | |
| 58 ifeq ($(HOST_IS_64_BIT),true) | |
| 59 ifeq ($(TARGET_IS_64_BIT),true) | |
| 60 GYP_HOST_VAR_PREFIX := | |
| 61 GYP_HOST_MULTILIB := 64 | |
| 62 else # Target is 32-bit. | |
| 63 GYP_HOST_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX) | |
| 64 GYP_HOST_MULTILIB := 32 | |
| 65 endif | |
| 66 endif | |
| 67 | |
| 68 # Include the appropriate version of each of the makefiles. | |
| 69 include $(addsuffix .$(HOST_OS)-$(TARGET_ARCH).mk,$(GYP_MAKEFILE_STEMS)) | |
| 70 | |
| 71 endif # End primary architecture handling. | |
| 72 | |
| 73 # Do the same check for the secondary architecture; if this doesn't exist then | |
| 74 # the current target platform probably doesn't have a secondary architecture and | |
| 75 # we can just do nothing. | |
| 76 ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk)) | |
| 77 | |
| 78 # We set GYP_VAR_PREFIX to $(TARGET_2ND_ARCH_VAR_PREFIX) to indicate that we are | |
| 79 # building for the secondary target architecture. | |
| 80 GYP_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX) | |
| 81 | |
| 82 # If the host is declared as being 64-bit, set the host multilib variables | |
| 83 # appropriately to ensure that the host targets are the same "bitness" as the | |
| 84 # secondary target, which is required by V8. | |
| 85 ifeq ($(HOST_IS_64_BIT),true) | |
| 86 ifeq ($(2ND_TARGET_IS_64_BIT),true) | |
| 87 GYP_HOST_VAR_PREFIX := | |
| 88 GYP_HOST_MULTILIB := 64 | |
| 89 else # Second target is 32-bit. | |
| 90 GYP_HOST_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX) | |
| 91 GYP_HOST_MULTILIB := 32 | |
| 92 endif | |
| 93 endif | |
| 94 | |
| 95 # Include the appropriate version of each of the makefiles. | |
| 96 include $(addsuffix .$(HOST_OS)-$(TARGET_2ND_ARCH).mk,$(GYP_MAKEFILE_STEMS)) | |
| 97 | |
| 98 endif # End secondary architecture handling. | |
| OLD | NEW |