blob: 627bc86a6e77872b06f9209985c3043b1e3a4e32 [file] [log] [blame]
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001# 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.
Ben Murdochc5cede92014-04-10 11:22:14 +01006# gyp autogenerates most of the real makefiles, which we include below.
7
Primiano Tucci1320f922014-09-30 14:45:55 +01008LOCAL_PATH := $(call my-dir)
9CHROMIUM_DIR := $(LOCAL_PATH)
Torne (Richard Coles)58218062012-11-14 11:43:16 +000010
Ben Murdoch7dbb3d52013-07-17 14:55:54 +010011# We default to release for the Android build system. Developers working on
12# WebView code can build with "make GYP_CONFIGURATION=Debug".
Ben Murdocheb525c52013-07-10 11:40:50 +010013GYP_CONFIGURATION := Release
Ben Murdocheb525c52013-07-10 11:40:50 +010014
Primiano Tucci1320f922014-09-30 14:45:55 +010015# 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/, \
Primiano Tucci1320f922014-09-30 14:45:55 +010021 js2c.host \
22 mksnapshot.host \
23 v8_base.host \
24 v8_libbase.host \
Torne (Richard Coles)5b55ba82015-01-12 15:06:04 +000025 v8_libplatform.host \
Primiano Tucci1320f922014-09-30 14:45:55 +010026 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.
Ben Murdochc5cede92014-04-10 11:22:14 +010042include $(CHROMIUM_DIR)/android_webview/Android.mk
Primiano Tucci1320f922014-09-30 14:45:55 +010043GYP_MAKEFILE_STEMS := $(CHROMIUM_DIR)/GypAndroid
44endif
Torne (Richard Coles)54cd4222014-04-03 15:40:12 +010045
Ben Murdochc5cede92014-04-10 11:22:14 +010046# 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.
Torne (Richard Coles)46d4c2b2014-06-09 12:00:27 +010049ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk))
50
Ben Murdochc5cede92014-04-10 11:22:14 +010051# We set GYP_VAR_PREFIX to the empty string to indicate that we are building for
52# the primary target architecture.
Torne (Richard Coles)54cd4222014-04-03 15:40:12 +010053GYP_VAR_PREFIX :=
Torne (Richard Coles)46d4c2b2014-06-09 12:00:27 +010054
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
Torne (Richard Coles)54cd4222014-04-03 15:40:12 +010065endif
Torne (Richard Coles)46d4c2b2014-06-09 12:00:27 +010066endif
67
Primiano Tucci1320f922014-09-30 14:45:55 +010068# Include the appropriate version of each of the makefiles.
69include $(addsuffix .$(HOST_OS)-$(TARGET_ARCH).mk,$(GYP_MAKEFILE_STEMS))
Torne (Richard Coles)46d4c2b2014-06-09 12:00:27 +010070
71endif # End primary architecture handling.
Torne (Richard Coles)54cd4222014-04-03 15:40:12 +010072
Ben Murdochc5cede92014-04-10 11:22:14 +010073# 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.
Torne (Richard Coles)46d4c2b2014-06-09 12:00:27 +010076ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk))
77
Ben Murdochc5cede92014-04-10 11:22:14 +010078# We set GYP_VAR_PREFIX to $(TARGET_2ND_ARCH_VAR_PREFIX) to indicate that we are
79# building for the secondary target architecture.
Torne (Richard Coles)54cd4222014-04-03 15:40:12 +010080GYP_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
Torne (Richard Coles)46d4c2b2014-06-09 12:00:27 +010081
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
Torne (Richard Coles)54cd4222014-04-03 15:40:12 +010092endif
Torne (Richard Coles)46d4c2b2014-06-09 12:00:27 +010093endif
94
Primiano Tucci1320f922014-09-30 14:45:55 +010095# Include the appropriate version of each of the makefiles.
96include $(addsuffix .$(HOST_OS)-$(TARGET_2ND_ARCH).mk,$(GYP_MAKEFILE_STEMS))
Torne (Richard Coles)46d4c2b2014-06-09 12:00:27 +010097
98endif # End secondary architecture handling.
Nagender Telkare0e33f02014-11-05 22:45:35 -070099
100include $(CLEAR_VARS)
101LOCAL_COPY_HEADERS_TO := chromium_org/include
102LOCAL_COPY_HEADERS := v8/include/v8-debug.h
103LOCAL_COPY_HEADERS += v8/include/v8-platform.h
104LOCAL_COPY_HEADERS += v8/include/v8-profiler.h
105LOCAL_COPY_HEADERS += v8/include/v8-testing.h
106LOCAL_COPY_HEADERS += v8/include/v8-util.h
107LOCAL_COPY_HEADERS += v8/include/v8.h
108LOCAL_COPY_HEADERS += v8/include/v8config.h
109LOCAL_COPY_HEADERS += v8/include/v8stdint.h
110include $(BUILD_COPY_HEADERS)