Make it possible to pass -D parameters configure
[platform/framework/web/tizen-extensions-crosswalk.git] / tizen-wrt.gyp
1 {
2   'variables': { 'type%': 'mobile' },
3   'target_defaults': {
4     'conditions': [
5       ['type != "mobile"', {
6         'sources/': [['exclude', '_mobile\\.cc$|mobile/']],
7         'includes/': [['exclude', '_mobile\\.gypi$|mobile/']],
8       }],
9       ['type != "desktop"', {
10         'sources/': [['exclude', '_desktop\\.cc$|desktop/']],
11         'includes/': [['exclude', '_desktop\\.gypi$|desktop/']],
12       }],
13       ['type == "mobile"', { 'defines': ['TIZEN_MOBILE'] } ],
14       ['type == "desktop"', { 'defines': ['GENERIC_DESKTOP'] } ],
15       ['build == "Debug"', {
16         'defines': ['_DEBUG', ],
17         'cflags': [ '-O0', '-g', ],
18       }],
19       ['build == "Release"', {
20         'defines': ['NDEBUG', ],
21         'cflags': [
22           '-O2',
23           # Don't emit the GCC version ident directives, they just end up
24           # in the .comment section taking up binary size.
25           '-fno-ident',
26           # Put data and code in their own sections, so that unused symbols
27           # can be removed at link time with --gc-sections.
28           '-fdata-sections',
29           '-ffunction-sections',
30         ],
31       }],
32     ],
33     'includes': [
34       'xwalk_js2c.gypi',
35     ],
36     'include_dirs': [
37       '.',
38       '<(SHARED_INTERMEDIATE_DIR)',
39     ],
40     'sources': [
41       '../common/extension_adapter.h',
42       '../common/picojson.h',
43       '../common/utils.h',
44     ],
45     'cflags': [
46       '-fPIC',
47       '-fvisibility=hidden',
48     ],
49   },
50   'includes': {
51     'common/tizen_mobile.gypi',
52     'bluetooth/bluetooth.gypi',
53     'notification/notification.gypi',
54     'power/power.gypi',
55     'system_info/system_info.gypi',
56     'tizen/tizen.gypi',
57     'networkbearerselection/networkbearerselection.gypi',
58     'time/time.gypi',
59   },
60 }