Enable building WebRTC with GN.
[chromium-blink-merge.git] / Android.mk
blob487118520af1ee2c4b296d3e23f50dc2649b3d81
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.
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.
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)
12 CHROMIUM_DIR := $(call my-dir)
14 # We default to release for the Android build system. Developers working on
15 # WebView code can build with "make GYP_CONFIGURATION=Debug".
16 GYP_CONFIGURATION := Release
18 # Include the manually-written makefile that builds all the WebView java code.
19 include $(CHROMIUM_DIR)/android_webview/Android.mk
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.
24 ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk))
26 # We set GYP_VAR_PREFIX to the empty string to indicate that we are building for
27 # the primary target architecture.
28 GYP_VAR_PREFIX :=
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
40 endif
41 endif
43 include $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk
45 endif # End primary architecture handling.
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.
50 ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk))
52 # We set GYP_VAR_PREFIX to $(TARGET_2ND_ARCH_VAR_PREFIX) to indicate that we are
53 # building for the secondary target architecture.
54 GYP_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
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
66 endif
67 endif
69 include $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk
71 endif # End secondary architecture handling.
73 endif