blob: 6249a1c1b3863d5b963b3216e3a06d907925d95e [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
tornecab385f2014-09-18 10:13:118LOCAL_PATH := $(call my-dir)
9CHROMIUM_DIR := $(LOCAL_PATH)
[email protected]53cdffa2012-10-26 08:27:2410
[email protected]56063a12013-07-17 11:21:5911# We default to release for the Android build system. Developers working on
12# WebView code can build with "make GYP_CONFIGURATION=Debug".
[email protected]1b8644142013-06-25 18:23:3513GYP_CONFIGURATION := Release
[email protected]1b8644142013-06-25 18:23:3514
tornecab385f2014-09-18 10:13:1115# 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.
18ifeq ($(PRODUCT_PREBUILT_WEBVIEWCHROMIUM),yes)
19GYP_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 )
39else
40# Not using a prebuilt; include the manually-written makefile that builds all
41# the WebView java code, and use the main autogenerated makefile.
[email protected]53cdffa2012-10-26 08:27:2442include $(CHROMIUM_DIR)/android_webview/Android.mk
tornecab385f2014-09-18 10:13:1143GYP_MAKEFILE_STEMS := $(CHROMIUM_DIR)/GypAndroid
44endif
[email protected]1b8644142013-06-25 18:23:3545
[email protected]dc6a4c502014-04-04 11:21:1946# 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.
[email protected]ce0e1592014-06-05 14:50:0049ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk))
50
[email protected]dc6a4c502014-04-04 11:21:1951# We set GYP_VAR_PREFIX to the empty string to indicate that we are building for
52# the primary target architecture.
[email protected]dc6a4c502014-04-04 11:21:1953GYP_VAR_PREFIX :=
[email protected]ce0e1592014-06-05 14:50:0054
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.
58ifeq ($(HOST_IS_64_BIT),true)
59ifeq ($(TARGET_IS_64_BIT),true)
60GYP_HOST_VAR_PREFIX :=
61GYP_HOST_MULTILIB := 64
62else # Target is 32-bit.
63GYP_HOST_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX)
64GYP_HOST_MULTILIB := 32
[email protected]896b8a232012-10-12 13:01:4465endif
[email protected]ce0e1592014-06-05 14:50:0066endif
67
tornecab385f2014-09-18 10:13:1168# Include the appropriate version of each of the makefiles.
69include $(addsuffix .$(HOST_OS)-$(TARGET_ARCH).mk,$(GYP_MAKEFILE_STEMS))
[email protected]ce0e1592014-06-05 14:50:0070
71endif # End primary architecture handling.
[email protected]dc6a4c502014-04-04 11:21:1972
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.
[email protected]ce0e1592014-06-05 14:50:0076ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk))
77
[email protected]dc6a4c502014-04-04 11:21:1978# We set GYP_VAR_PREFIX to $(TARGET_2ND_ARCH_VAR_PREFIX) to indicate that we are
79# building for the secondary target architecture.
[email protected]dc6a4c502014-04-04 11:21:1980GYP_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
[email protected]ce0e1592014-06-05 14:50:0081
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.
85ifeq ($(HOST_IS_64_BIT),true)
86ifeq ($(2ND_TARGET_IS_64_BIT),true)
87GYP_HOST_VAR_PREFIX :=
88GYP_HOST_MULTILIB := 64
89else # Second target is 32-bit.
90GYP_HOST_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX)
91GYP_HOST_MULTILIB := 32
[email protected]dc6a4c502014-04-04 11:21:1992endif
[email protected]ce0e1592014-06-05 14:50:0093endif
94
tornecab385f2014-09-18 10:13:1195# Include the appropriate version of each of the makefiles.
96include $(addsuffix .$(HOST_OS)-$(TARGET_2ND_ARCH).mk,$(GYP_MAKEFILE_STEMS))
[email protected]ce0e1592014-06-05 14:50:0097
98endif # End secondary architecture handling.