[email protected] | c110158 | 2012-06-25 17:07:18 | [diff] [blame] | 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 | |
[email protected] | 896b8a23 | 2012-10-12 13:01:44 | [diff] [blame] | 5 | # This Android makefile is used to build WebView in the Android build system. |
[email protected] | dc6a4c50 | 2014-04-04 11:21:19 | [diff] [blame] | 6 | # gyp autogenerates most of the real makefiles, which we include below. |
| 7 | |
| 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. |
| 10 | ifneq ($(PRODUCT_PREBUILT_WEBVIEWCHROMIUM),yes) |
[email protected] | 896b8a23 | 2012-10-12 13:01:44 | [diff] [blame] | 11 | |
[email protected] | 53cdffa | 2012-10-26 08:27:24 | [diff] [blame] | 12 | CHROMIUM_DIR := $(call my-dir) |
| 13 | |
[email protected] | 56063a1 | 2013-07-17 11:21:59 | [diff] [blame] | 14 | # We default to release for the Android build system. Developers working on |
| 15 | # WebView code can build with "make GYP_CONFIGURATION=Debug". |
[email protected] | 1b864414 | 2013-06-25 18:23:35 | [diff] [blame] | 16 | GYP_CONFIGURATION := Release |
[email protected] | 1b864414 | 2013-06-25 18:23:35 | [diff] [blame] | 17 | |
[email protected] | dc6a4c50 | 2014-04-04 11:21:19 | [diff] [blame] | 18 | # Include the manually-written makefile that builds all the WebView java code. |
[email protected] | 53cdffa | 2012-10-26 08:27:24 | [diff] [blame] | 19 | include $(CHROMIUM_DIR)/android_webview/Android.mk |
[email protected] | 1b864414 | 2013-06-25 18:23:35 | [diff] [blame] | 20 | |
[email protected] | dc6a4c50 | 2014-04-04 11:21:19 | [diff] [blame] | 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 |
| 23 | # nothing, since we may not have finished bringing up this architecture yet. |
[email protected] | ce0e159 | 2014-06-05 14:50:00 | [diff] [blame] | 24 | ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk)) |
| 25 | |
[email protected] | dc6a4c50 | 2014-04-04 11:21:19 | [diff] [blame] | 26 | # We set GYP_VAR_PREFIX to the empty string to indicate that we are building for |
| 27 | # the primary target architecture. |
[email protected] | dc6a4c50 | 2014-04-04 11:21:19 | [diff] [blame] | 28 | GYP_VAR_PREFIX := |
[email protected] | ce0e159 | 2014-06-05 14:50:00 | [diff] [blame] | 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 |
[email protected] | 896b8a23 | 2012-10-12 13:01:44 | [diff] [blame] | 40 | endif |
[email protected] | ce0e159 | 2014-06-05 14:50:00 | [diff] [blame] | 41 | endif |
| 42 | |
| 43 | include $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk |
| 44 | |
| 45 | endif # End primary architecture handling. |
[email protected] | dc6a4c50 | 2014-04-04 11:21:19 | [diff] [blame] | 46 | |
| 47 | # Do the same check for the secondary architecture; if this doesn't exist then |
| 48 | # the current target platform probably doesn't have a secondary architecture and |
| 49 | # we can just do nothing. |
[email protected] | ce0e159 | 2014-06-05 14:50:00 | [diff] [blame] | 50 | ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk)) |
| 51 | |
[email protected] | dc6a4c50 | 2014-04-04 11:21:19 | [diff] [blame] | 52 | # We set GYP_VAR_PREFIX to $(TARGET_2ND_ARCH_VAR_PREFIX) to indicate that we are |
| 53 | # building for the secondary target architecture. |
[email protected] | dc6a4c50 | 2014-04-04 11:21:19 | [diff] [blame] | 54 | GYP_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX) |
[email protected] | ce0e159 | 2014-06-05 14:50:00 | [diff] [blame] | 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) |
| 61 | GYP_HOST_VAR_PREFIX := |
| 62 | GYP_HOST_MULTILIB := 64 |
| 63 | else # Second target is 32-bit. |
| 64 | GYP_HOST_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX) |
| 65 | GYP_HOST_MULTILIB := 32 |
[email protected] | dc6a4c50 | 2014-04-04 11:21:19 | [diff] [blame] | 66 | endif |
[email protected] | ce0e159 | 2014-06-05 14:50:00 | [diff] [blame] | 67 | endif |
| 68 | |
| 69 | include $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk |
| 70 | |
| 71 | endif # End secondary architecture handling. |
[email protected] | dc6a4c50 | 2014-04-04 11:21:19 | [diff] [blame] | 72 | |
[email protected] | 92a1284b | 2013-11-13 17:59:18 | [diff] [blame] | 73 | endif |