-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gyp
122 lines (121 loc) · 2.73 KB
/
build.gyp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{
'variables': {
'conditions': [
['OS == "win"', {
'component%': 'static_library',
}],
['OS == "mac"', {
'component%': 'shared_library',
}],
['OS != "win" and OS != "mac"', {
'component%': 'shared_library',
}],
],
},
'target_defaults': {
'target_conditions': [
['_type=="shared_library" or _type=="static_library"', {'cflags': ['-fPIC'], 'ldflags': ['-fPIC']}],
],
"include_dirs" : [
'lib/duktape',
'include'
],
'cflags': ['-DDUK_USE_CPP_EXCEPTIONS=1'],
'msbuild_settings': {
'ClCompile': {
#'WarningLevel': 'Level4', # /W4
'PreprocessorDefinitions': [
'_WIN32_WINNT=0x0600', # Windows Vista SP2 or later
'WIN32_LEAN_AND_MEAN',
'NOMINMAX',
'DUK_USE_CPP_EXCEPTIONS=1'
],
},
},
'default_configuration': 'Release_x64',
'configurations':
{
'Debug': {
'defines': ['DEBUG=1'],
'cflags': ['-g', '-O0', '-std=c++11'],
'msbuild_settings': {
'ClCompile': {
'Optimization': 'Disabled', # /Od
'conditions': [
['OS == "win" and component == "shared_library"', {
'RuntimeLibrary': 'MultiThreadedDebugDLL', # /MDd
}, {
'RuntimeLibrary': 'MultiThreadedDebug', # /MTd
}],
],
},
'Link': {
#'LinkIncremental': 'true', # /INCREMENTAL
},
},
}, # Debug
'Release': {
'defines': ['NDEBUG=1'],
'cflags': ['-O3', '-std=c++11'],
'msbuild_settings': {
'ClCompile': {
'Optimization': 'MaxSpeed', # /O2
'InlineFunctionExpansion': 'AnySuitable', # /Ob2
'conditions': [
['OS == "win" and component == "shared_library"', {
'RuntimeLibrary': 'MultiThreadedDLL', # /MD
}, {
'RuntimeLibrary': 'MultiThreaded', # /MT
}],
],
},
'Link': {
#'LinkIncremental': 'false', # /INCREMENTAL:NO
'OptimizeReferences': 'true', # /OPT:REF
},
},
}, # Release
'Debug_x64': {
'inherit_from': ['Debug'],
'msvs_configuration_platform': 'x64'
},
'Release_x64': {
'inherit_from': ['Release'],
'msvs_configuration_platform': 'x64'
},
},
},
'targets': [
{
'target_name': 'test',
'type': 'executable',
"dependencies": [
"CPP-Metadata-lib"
],
'sources': [
'test/test_decl.cpp',
'test/test_main.cpp'
],
},
{
'target_name': 'vm_test',
'type': 'executable',
"dependencies": [
"CPP-Metadata-lib"
],
'sources': [
'test/test_decl.cpp',
'test/vm_test.cpp'
],
},
{
'target_name': 'CPP-Metadata-lib',
'type': 'static_library',
'sources': [
'lib/duktape/duktape.c',
'src/runtime.cpp',
'src/vm.cpp',
],
},
],
}