1 # Copyright 2013 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 file is meant to add more loadable libs into Chrome_apk.
7 # This is useful when building Chrome_apk with some loadable modules which are
8 # not included in Chrome_apk.
9 # As an example, when building Chrome_apk with
10 # libpeer_target_type=loadable_module,
11 # the libpeerconnection.so is not included in Chrome_apk. To add the missing
12 # lib, follow the steps below:
14 # GYP_DEFINES="$GYP_DEFINES libpeer_target_type=loadable_module" CHROMIUM_GYP_FILE="build/android/chrome_with_libs.gyp" build/gyp_chromium
15 # - Build chrome_with_libs:
16 # ninja (or make) chrome_with_libs
18 # This tool also allows replacing the loadable module with a new one via the
20 # - Build Chrome_apk with the gyp define:
21 # GYP_DEFINES="$GYP_DEFINES libpeer_target_type=loadable_module" build/gyp_chromium
22 # ninja (or make) Chrome_apk
23 # - Replace libpeerconnection.so with a new one:
24 # cp the_new_one path/to/libpeerconnection.so
26 # GYP_DEFINES="$GYP_DEFINES libpeer_target_type=loadable_module" CHROMIUM_GYP_FILE="build/android/chrome_with_libs.gyp" build/gyp_chromium
27 # - Build chrome_with_libs:
28 # ninja (or make) chrome_with_libs
32 # An "All" target is required for a top-level gyp-file.
40 'target_name': 'chrome_with_libs',
43 'intermediate_dir': '<(PRODUCT_DIR)/prebuilt_libs/',
44 'chrome_unsigned_path': '<(PRODUCT_DIR)/chrome_apk/Chrome-unsigned.apk',
45 'chrome_with_libs_unsigned': '<(intermediate_dir)/Chrome-with-libs-unsigned.apk',
46 'chrome_with_libs_final': '<(PRODUCT_DIR)/apks/Chrome-with-libs.apk',
49 '<(DEPTH)/clank/native/framework/clank.gyp:chrome_apk'
53 'destination': '<(intermediate_dir)/lib/<(android_app_abi)',
55 '<(PRODUCT_DIR)/libpeerconnection.so',
61 'action_name': 'put_libs_in_chrome',
64 '<(intermediate_dir)/lib/<(android_app_abi)/libpeerconnection.so',
66 'input_apk_path': '<(chrome_unsigned_path)',
67 'output_apk_path': '<(chrome_with_libs_unsigned)',
68 'libraries_top_dir%': '<(intermediate_dir)',
70 'includes': [ 'create_standalone_apk_action.gypi' ],
73 'action_name': 'finalize_chrome_with_libs',
75 'input_apk_path': '<(chrome_with_libs_unsigned)',
76 'output_apk_path': '<(chrome_with_libs_final)',
78 'includes': [ 'finalize_apk_action.gypi'],