Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / chrome_shell.gypi
1 # Copyright 2014 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 GYPI allows independent customization of the chrome shell in a manner
6 # similar to content shell (in content_shell.gypi). Notably, this file does
7 # NOT contain chrome_android_core, which is independent of the chrome shell
8 # and should be separately customized.
9 {
10   'variables': {
11     'apk_name': 'ChromeShell',
12     'manifest_package_name': 'org.chromium.chrome.shell',
13     'native_lib_version_name': '<(version_full)',
14     'package_name': 'chrome_shell_apk',
15   },
16   'targets': [
17     {
18       'target_name': 'libchromeshell',
19       'type': 'shared_library',
20       'dependencies': [
21         '../base/base.gyp:base',
22         'chrome_android_core',
23         'chrome.gyp:browser_ui',
24         '../content/content.gyp:content_app_browser',
25       ],
26       'sources': [
27         # This file must always be included in the shared_library step to ensure
28         # JNI_OnLoad is exported.
29         'app/android/chrome_jni_onload.cc',
30         'android/shell/chrome_main_delegate_chrome_shell_android.cc',
31         'android/shell/chrome_main_delegate_chrome_shell_android.h',
32         "android/shell/chrome_shell_google_location_settings_helper.cc",
33         "android/shell/chrome_shell_google_location_settings_helper.h",
34       ],
35       'include_dirs': [
36         '../skia/config',
37       ],
38       'conditions': [
39         [ 'order_profiling!=0', {
40           'conditions': [
41             [ 'OS=="android"', {
42               'dependencies': [ '../tools/cygprofile/cygprofile.gyp:cygprofile', ],
43             }],
44           ],
45         }],
46         [ 'use_allocator!="none"', {
47           'dependencies': [
48             '../base/allocator/allocator.gyp:allocator', ],
49         }],
50         ['OS=="android"', {
51           'ldflags': [
52             # Some android targets still depend on --gc-sections to link.
53             # TODO: remove --gc-sections for Debug builds (crbug.com/159847).
54             '-Wl,--gc-sections',
55           ],
56         }],
57       ],
58     },
59     {
60       'target_name': 'chrome_shell_apk',
61       'type': 'none',
62       'dependencies': [
63         'chrome_java',
64         'chrome_shell_paks',
65         'libchromeshell',
66         '../media/media.gyp:media_java',
67       ],
68       'variables': {
69         'java_in_dir': 'android/shell/java',
70         'resource_dir': 'android/shell/res',
71         'asset_location': '<(PRODUCT_DIR)/../assets/<(package_name)',
72         'native_lib_target': 'libchromeshell',
73         'additional_input_paths': [
74           '<@(chrome_android_pak_output_resources)',
75         ],
76       },
77       'includes': [ '../build/java_apk.gypi', ],
78     },
79     {
80       # chrome_shell_apk creates a .jar as a side effect. Any java targets
81       # that need that .jar in their classpath should depend on this target,
82       # chrome_shell_apk_java. Dependents of chrome_shell_apk receive its
83       # jar path in the variable 'apk_output_jar_path'.
84       # This target should only be used by targets which instrument
85       # chrome_shell_apk.
86       'target_name': 'chrome_shell_apk_java',
87       'type': 'none',
88       'dependencies': [
89         'chrome_shell_apk',
90       ],
91       'includes': [ '../build/apk_fake_jar.gypi' ],
92     },
93     {
94       'target_name': 'chrome_shell_paks',
95       'type': 'none',
96       'dependencies': [
97         '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources',
98         '<(DEPTH)/chrome/chrome_resources.gyp:packed_extra_resources',
99       ],
100       'copies': [
101         {
102           'destination': '<(chrome_android_pak_output_folder)',
103           'files': [
104             '<@(chrome_android_pak_input_resources)',
105           ],
106         }
107       ],
108     },
109   ],
110
111 }