Skip to content

Commit

Permalink
android_webview: Update top-level makefile for multiarch.
Browse files Browse the repository at this point in the history
Add multiarch support (64+32 bit parallel builds) to the top-level
Android.mk: include two sets of makefiles if needed, one for each of the
two target architectures.

This also cleans up the general structure: nobody builds the regular
Android Chromium inside of an Android tree any more, so it's no longer
necessary to handle the case where this Android.mk is being parsed by
the build system but it's *not* intended to be building WebView.

BUG=358141
R=benm@chromium.org

Review URL: https://codereview.chromium.org/225593004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261729 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
torne@chromium.org committed Apr 4, 2014
1 parent 1eebfc5 commit dc6a4c5
Showing 1 changed file with 25 additions and 12 deletions.
37 changes: 25 additions & 12 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,39 @@
# found in the LICENSE file.

# This Android makefile is used to build WebView in the Android build system.
# gyp autogenerates most of the real makefiles, which we just include here if
# we are doing a WebView build. For other builds, this makefile does nothing,
# which prevents the Android build system from mistakenly loading any other
# Android.mk that may exist in the Chromium tree.
# gyp autogenerates most of the real makefiles, which we include below.

CHROMIUM_DIR := $(call my-dir)

# Assume that if the gyp autogenerated makefile exists, we are doing the
# WebView build using the Android build system.
ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk))

# Don't include anything if the product is using a prebuilt webviewchromium.
# Don't do anything if the product is using a prebuilt webviewchromium, to avoid
# duplicate target definitions between this directory and the prebuilts.
ifneq ($(PRODUCT_PREBUILT_WEBVIEWCHROMIUM),yes)

CHROMIUM_DIR := $(call my-dir)

# We default to release for the Android build system. Developers working on
# WebView code can build with "make GYP_CONFIGURATION=Debug".
GYP_CONFIGURATION := Release

include $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk
# Include the manually-written makefile that builds all the WebView java code.
include $(CHROMIUM_DIR)/android_webview/Android.mk

# If the gyp-generated makefile exists for the current host OS and primary
# target architecture, we need to include it. If it doesn't exist then just do
# nothing, since we may not have finished bringing up this architecture yet.
# We set GYP_VAR_PREFIX to the empty string to indicate that we are building for
# the primary target architecture.
ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk))
GYP_VAR_PREFIX :=
include $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk
endif

# Do the same check for the secondary architecture; if this doesn't exist then
# the current target platform probably doesn't have a secondary architecture and
# we can just do nothing.
# We set GYP_VAR_PREFIX to $(TARGET_2ND_ARCH_VAR_PREFIX) to indicate that we are
# building for the secondary target architecture.
ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk))
GYP_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
include $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk
endif

endif

0 comments on commit dc6a4c5

Please sign in to comment.