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