[M47_2526] Chromium upversion to m47_2526 branch
[platform/framework/web/chromium-efl.git] / tizen_src / supplement.gypi
1 # Copyright (c) 2015 Samsung Electronics. 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 file should contain contain gyp code that is supposed to be common
6 # for all build targets we have in chromium-ewk. Thigs specific only to one
7 # component should go to appropriate gypi file included below.
8
9 {
10   'variables': {
11     'use_aura%': 0,
12     'use_efl%' : 1,
13     'use_default_render_theme%': 1,
14
15     'ewk_bringup%': 1,
16     'wayland_bringup%': 0,
17
18     'building_for_tizen%': 0,
19     'building_for_tizen_mobile%': 0,
20     'building_for_tizen_tv%': 0,
21
22     'building_strategy%': 'ewk', # 'ewk', 'libs' and 'crosswalk-bin'
23
24     'xwalk_link_against_chromium_ewk%': 0,
25
26     'tizen_multimedia_support%': 1,
27     'tizen_multimedia_eme_support%': 1,
28 # [M44_2403] Temporary disabling the tizen_disable_gpu_thread for switching to new chromium
29 #            FIXME: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=14046
30     'tizen_disable_gpu_thread%': 0,
31
32     'data_dir%'  : '/usr/share/chromium-efl/',
33     'exe_dir%'   : '/usr/lib/chromium-efl/',
34     'edje_dir%'  : '/usr/share/chromium-efl/themes/',
35     'locale_dir%': '/usr/share/chromium-efl/locale/',
36
37     'edje_compiler%': 'edje_cc',
38
39     'prebuilt_ld_gold_dir%': '',
40
41     'chromium_efl_tizen_version%': '2.4',
42
43     'grit_additional_defines': [ '-D', 'use_aura' ],
44   },
45
46   'includes': [
47     'build/efl_filename_rules.gypi',
48     'chromium_impl/chromium_impl.gypi',
49   ],
50
51   'conditions': [
52     ['use_ozone==1', {
53       'variables': {
54         'use_glib%': 1,
55         'external_ozone_platforms': [
56           'efl',
57         ],
58       },
59     }], # use_ozone==1
60
61     ['xwalk_link_against_chromium_ewk==1', {
62       'includes': [
63         'ewk/efl_integration/link_xwalk_against_chromium_efl.gypi',
64       ],
65     }], # xwalk_link_against_chromium_ewk==1
66   ],
67
68   'target_defaults': {
69
70     'include_dirs': [
71       '.',
72       '<(DEPTH)/tizen_src/ecore_wrapper',
73     ],
74
75     'defines': [
76       # TODO: Check if those defines are still necessary. If they are add an explanation why.
77       'COMPONENT_BUILD=1',
78       'SKIA_DLL=1',
79       'BUILDING_V8_SHARED=1',
80       'V8_SHARED=1',
81     ],
82
83     'conditions': [
84
85       ['use_efl==1', {
86         'defines': [
87           'USE_EFL=1',
88         ],
89         'include_dirs': [
90           '<(DEPTH)/tizen_src/chromium_impl',
91         ],
92       }],
93
94       ['ewk_bringup==1', {
95         'defines': [ 'EWK_BRINGUP=1' ],
96       }], # ewk_bringup==1
97
98       ['prebuilt_ld_gold_dir!=""', {
99         'ldflags': [
100           '-B<(prebuilt_ld_gold_dir)',
101         ],
102
103         'conditions': [
104           ['gcc_version >= 49', {
105             'ldflags': [
106               # In GCC 4.9, the linker (either bfd or gold) is called with the -plugin argument
107               # which our current bundled gold linker (in build/prebuild) does not accept.
108               # Since our gold a x64 64bit statically linked binary, even if we rebuild it
109               # with plugin support enabled, the plugin being loaded would be a 32bit ARM binary.
110               # and load would fail. So we disable linker's plugin loadeir (specifically
111               # gcc's liblto_plugin).
112               '-fno-use-linker-plugin',
113             ],
114           }],
115         ], # conditions
116       }],
117
118       ['tizen_multimedia_support==1', {
119         'defines': [
120           'TIZEN_MULTIMEDIA_SUPPORT=1',
121         ],
122       }],
123
124       ['tizen_disable_gpu_thread==1', {
125         'defines': [
126           'TIZEN_DISABLE_GPU_THREAD=1',
127         ],
128       }],
129
130       ['building_for_tizen==1', {
131         'defines': [
132           'OS_TIZEN=1',
133           'WTF_OS_TIZEN=1',
134         ],
135         'conditions': [
136           ['chromium_efl_tizen_version=="3.0"', {
137             'defines': [
138               'TIZEN_MAJOR_VERSION=3',
139               'TIZEN_MINOR_VERSION=0',
140               'TIZEN_PATCH_VERSION=0',
141             ],
142           }],
143           ['chromium_efl_tizen_version=="2.4"', {
144             'defines': [
145               'TIZEN_MAJOR_VERSION=2',
146               'TIZEN_MINOR_VERSION=4',
147               'TIZEN_PATCH_VERSION=0',
148             ],
149           }],
150           ['chromium_efl_tizen_version=="2.3"', {
151             'defines': [
152               'TIZEN_MAJOR_VERSION=2',
153               'TIZEN_MINOR_VERSION=3',
154               'TIZEN_PATCH_VERSION=0',
155             ],
156           }],
157           ['use_wayland==1', {
158             'defines': [
159               'USE_WAYLAND=1',
160             ],
161           }],
162           # TODO: There are X11 dependencies in following condition.
163           #       The files need to be implemented based on Wayland.
164           ['wayland_bringup==1', {
165             'defines': [
166               'WAYLAND_BRINGUP=1',
167             ],
168           }],
169         ],
170       }],
171
172       ['building_for_tizen_mobile==1', {
173         'defines': [
174           'OS_TIZEN_MOBILE=1',
175           'WTF_OS_TIZEN_MOBILE=1',
176           'TIZEN_CONTENTS_DETECTION=1',
177           'TIZEN_ENABLE_CAPI_SUPPORT=1',
178         ],
179       }],
180
181       ['building_for_tizen_tv==1', {
182         'defines': [
183           'OS_TIZEN_TV=1',
184           'WTF_OS_TIZEN_TV=1',
185         ],
186         'conditions': [
187           ['chromium_efl_tizen_version=="2.4"', {
188             # The tizen v2.4 tv build gets its cpu-specific flags from the Tizen build system.
189             'cflags!': [
190               '-march=armv7-a',
191               '-mtune=generic-armv7-a',
192             ],
193           }],
194         ],
195       }],
196
197     ], # conditions
198   }, # target_defaults
199 }