blob: 487118520af1ee2c4b296d3e23f50dc2649b3d81 [file] [log] [blame]
[email protected]c1101582012-06-25 17:07:181# 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]896b8a232012-10-12 13:01:445# This Android makefile is used to build WebView in the Android build system.
[email protected]dc6a4c502014-04-04 11:21:196# 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.
10ifneq ($(PRODUCT_PREBUILT_WEBVIEWCHROMIUM),yes)
[email protected]896b8a232012-10-12 13:01:4411
[email protected]53cdffa2012-10-26 08:27:2412CHROMIUM_DIR := $(call my-dir)
13
[email protected]56063a12013-07-17 11:21:5914# We default to release for the Android build system. Developers working on
15# WebView code can build with "make GYP_CONFIGURATION=Debug".
[email protected]1b8644142013-06-25 18:23:3516GYP_CONFIGURATION := Release
[email protected]1b8644142013-06-25 18:23:3517
[email protected]dc6a4c502014-04-04 11:21:1918# Include the manually-written makefile that builds all the WebView java code.
[email protected]53cdffa2012-10-26 08:27:2419include $(CHROMIUM_DIR)/android_webview/Android.mk
[email protected]1b8644142013-06-25 18:23:3520
[email protected]dc6a4c502014-04-04 11:21:1921# 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]ce0e1592014-06-05 14:50:0024ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk))
25
[email protected]dc6a4c502014-04-04 11:21:1926# We set GYP_VAR_PREFIX to the empty string to indicate that we are building for
27# the primary target architecture.
[email protected]dc6a4c502014-04-04 11:21:1928GYP_VAR_PREFIX :=
[email protected]ce0e1592014-06-05 14:50:0029
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.
33ifeq ($(HOST_IS_64_BIT),true)
34ifeq ($(TARGET_IS_64_BIT),true)
35GYP_HOST_VAR_PREFIX :=
36GYP_HOST_MULTILIB := 64
37else # Target is 32-bit.
38GYP_HOST_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX)
39GYP_HOST_MULTILIB := 32
[email protected]896b8a232012-10-12 13:01:4440endif
[email protected]ce0e1592014-06-05 14:50:0041endif
42
43include $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk
44
45endif # End primary architecture handling.
[email protected]dc6a4c502014-04-04 11:21:1946
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]ce0e1592014-06-05 14:50:0050ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk))
51
[email protected]dc6a4c502014-04-04 11:21:1952# 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]dc6a4c502014-04-04 11:21:1954GYP_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
[email protected]ce0e1592014-06-05 14:50:0055
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.
59ifeq ($(HOST_IS_64_BIT),true)
60ifeq ($(2ND_TARGET_IS_64_BIT),true)
61GYP_HOST_VAR_PREFIX :=
62GYP_HOST_MULTILIB := 64
63else # Second target is 32-bit.
64GYP_HOST_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX)
65GYP_HOST_MULTILIB := 32
[email protected]dc6a4c502014-04-04 11:21:1966endif
[email protected]ce0e1592014-06-05 14:50:0067endif
68
69include $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk
70
71endif # End secondary architecture handling.
[email protected]dc6a4c502014-04-04 11:21:1972
[email protected]92a1284b2013-11-13 17:59:1873endif