Initial Implementation of Node prelaunch
[platform/framework/web/crosswalk-tizen.git] / wrt.gyp
1 {
2   'includes': [
3     'filenames.gypi',
4     'vendor/native_mate/native_mate_files.gypi',
5   ],
6   'targets': [
7     {
8       'target_name': 'wrt',
9       'type': 'executable',
10       'dependencies': [
11         '<(DEPTH)/electron.gyp:js2asar',
12         '<(DEPTH)/electron.gyp:app2asar',
13         'wrt_lib',
14         '<(DEPTH)/tizen/common/common.gyp:wrt_common',
15         '<(DEPTH)/tizen/loader/loader.gyp:wrt-loader',
16         '<(DEPTH)/efl/build/system.gyp:ecore',
17         '<(DEPTH)/efl/build/system.gyp:launchpad',
18         '<(DEPTH)/efl/build/system.gyp:capi-appfw-application',
19         '<(DEPTH)/efl/build/system.gyp:elementary',
20         'electron_shell_copy',
21       ],
22       'sources': [
23         'tizen/src/wrt_main.cc',
24         'tizen/src/wrt_main.h',
25         'tizen/loader/prelauncher.h',
26         'tizen/loader/prelauncher.cc',
27       ],
28       'include_dirs': [
29         'tizen/src',
30       ],
31       'includes': [
32         'tizen/build/common.gypi',
33       ],
34       'ldflags': [
35         '-pie',
36         '-export-dynamic',
37       ],
38       'cflags': [ '-fPIC' ],
39       'cflags_cc': [ '-fPIC' ],
40     },  # target wrt
41     {
42       'target_name': 'wrt_lib',
43       'type': 'static_library',
44       'dependencies': [
45         'electron.gyp:atom_js2c',
46         'vendor/pdf_viewer/pdf_viewer.gyp:pdf_viewer',
47         'vendor/brightray/brightray.gyp:brightray',
48         'vendor/node/node.gyp:node',
49       ],
50       'defines': [
51         # We need to access internal implementations of Node.
52         'NODE_WANT_INTERNALS=1',
53         'NODE_SHARED_MODE',
54         # This is defined in skia/skia_common.gypi.
55         'SK_SUPPORT_LEGACY_GETTOPDEVICE',
56         # Disable warnings for g_settings_list_schemas.
57         'GLIB_DISABLE_DEPRECATION_WARNINGS',
58         # Defined in Chromium but not exposed in its gyp file.
59         'V8_USE_EXTERNAL_STARTUP_DATA',
60         'V8_SHARED',
61         'USING_V8_SHARED',
62         'USING_V8_PLATFORM_SHARED',
63         'USING_V8_BASE_SHARED',
64         # Remove this after enable_plugins becomes a feature flag.
65         'ENABLE_PLUGINS',
66         'USE_PROPRIETARY_CODECS',
67         'ATOM_PRODUCT_NAME="WRT"',
68         'ATOM_PROJECT_NAME="WRT"',
69         'USE_SYSTEM_ICU',
70       ],
71       'sources': [
72         '<@(lib_sources)',
73         'atom/app/runtime.cc',
74         'atom/app/runtime.h',
75         'atom/app/ui_runtime.cc',
76         'atom/app/ui_runtime.h',
77         'atom/browser/api/atom_api_menu_efl.cc',
78         'atom/browser/api/atom_api_menu_efl.h',
79         'atom/browser/api/atom_api_pwrt.cc',
80         'atom/browser/api/atom_api_pwrt.h',
81         'atom/browser/api/atom_api_web_contents_efl.cc',
82         'atom/browser/common_web_contents_delegate_efl.cc',
83         'atom/browser/native_browser_view_efl.cc',
84         'atom/browser/native_browser_view_efl.h',
85         'atom/browser/native_window_efl.cc',
86         'atom/browser/native_window_efl.h',
87         'atom/browser/ui/accelerator_util_efl.cc',
88         'atom/browser/ui/drag_util_efl.cc',
89         'atom/browser/ui/file_dialog_efl.cc',
90         'atom/browser/ui/message_box_efl.cc',
91         'atom/browser/ui/tray_icon_efl.cc',
92         'atom/browser/ui/tray_icon_efl.h',
93         'chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.cc',
94         'chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.h',
95         'chromium_src/chrome/browser/icon_loader_efllinux.cc',
96       ],
97       'sources/': [
98         # chromium-efl supports only tizen webrtc using CAPI
99         # which is not working on desktop linux.
100         ['exclude', 'atom/browser/api/atom_api_desktop_capturer.cc'],
101         ['exclude', 'atom/browser/api/atom_api_desktop_capturer.h'],
102       ],
103       'include_dirs': [
104         '.',
105         'chromium_src',
106         'vendor/brightray',
107         'vendor/native_mate',
108         # Include atom_natives.h.
109         '<(SHARED_INTERMEDIATE_DIR)',
110         # Include directories for uv and node.
111         'vendor/node/src',
112         'vendor/node/deps/http_parser',
113         'vendor/node/deps/uv/include',
114         # The `node.h` is using `#include"v8.h"`.
115         '<(libchromiumcontent_src_dir)/v8/include',
116         # The `node.h` is using `#include"ares.h"`.
117         'vendor/node/deps/cares/include',
118         # The `third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h` is using `platform/PlatformExport.h`.
119         '<(libchromiumcontent_src_dir)/third_party/WebKit/Source',
120         # The 'third_party/libyuv/include/libyuv/scale_argb.h' is using 'libyuv/basic_types.h'.
121         '<(libchromiumcontent_src_dir)/third_party/libyuv/include',
122         # The 'third_party/webrtc/modules/desktop_capture/desktop_frame.h' is using 'webrtc/base/scoped_ptr.h'.
123         '<(libchromiumcontent_src_dir)/third_party/',
124         '<(libchromiumcontent_src_dir)/components/cdm',
125         '<(libchromiumcontent_src_dir)/third_party/widevine',
126         '<(libchromiumcontent_src_dir)/tizen_src/chromium_impl',
127       ],
128       'direct_dependent_settings': {
129         'include_dirs': [
130           '.',
131         ],
132       },
133       'export_dependent_settings': [
134         'vendor/brightray/brightray.gyp:brightray',
135       ],
136       'conditions': [
137         ['libchromiumcontent_component', {
138           'link_settings': {
139             'libraries': [ '<@(libchromiumcontent_v8_libraries)' ],
140           },
141         }],
142         ['OS=="linux"', {
143           'sources': [
144             '<@(lib_sources_linux)',
145             '<@(lib_sources_nss)',
146           ],
147           'link_settings': {
148           },
149           # Required settings of using breakpad.
150           'cflags_cc': [
151             '-Wno-empty-body',
152             '-Wno-reserved-user-defined-literal',
153           ],
154           'include_dirs': [
155             'vendor/breakpad/src',
156           ],
157           'dependencies': [
158             'vendor/breakpad/breakpad.gyp:breakpad_client',
159           ],
160         }],  # OS=="linux"
161         ['is_tizen==1', {
162           'cflags': [ '-fPIC' ],
163           'cflags_cc': [ '-fPIC' ],
164           'dependencies': [
165             '<(DEPTH)/efl/build/system.gyp:capi-appfw-application',
166             '<(DEPTH)/efl/build/system.gyp:efl-extension',
167             '<(DEPTH)/efl/build/system.gyp:elementary',
168             '<(DEPTH)/efl/build/system.gyp:evas',
169             '<(DEPTH)/efl/build/system.gyp:icu',
170           ],
171         }, {
172           'dependencies': [
173             '<(DEPTH)/efl/build/system.gyp:ecore-x',
174             '<(DEPTH)/efl/build/system.gyp:elocation',
175             '<(DEPTH)/efl/build/system.gyp:elementary',
176             '<(DEPTH)/efl/build/system.gyp:evas',
177             '<(DEPTH)/efl/build/system.gyp:icu',
178           ],
179         }],
180         ['tizen_product_tv==1', {
181           'dependencies': [
182             '<(DEPTH)/efl/build/system.gyp:vd-win-util',
183           ],
184         }],
185       ],
186     },  # target wrt_lib
187     {
188       'target_name': 'electron_shell_copy',
189       'type': 'none',
190       'copies': [
191         {
192           'destination': '<(PRODUCT_DIR)',
193           'files': [
194             '<(DEPTH)/efl/build/desktop/electron.sh',
195             '<(DEPTH)/efl/build/desktop/launch.sh',
196           ],
197         },
198       ],
199     },  # target electron_shell_copy
200   ],
201 }