forked from waTeim/node-julia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinding.gyp
115 lines (115 loc) · 2.96 KB
/
binding.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
{
"targets":
[
{
"variables":
{
"variables":
{
"conditions":
[
[ "OS=='linux'", { "gcc":"<!(gcc --version 2>&1 | head -1 | sed -e 's/^.*(.*) \(.*\)\..*$/\\1/')" } , { "gcc":"" } ]
],
"juliaBase":"<!(python tools/find_julia.py <(OS))",
},
"version":"<!(node --version | sed -e 's/^v\([0-9]*\.[0-9]*\).*$/\\1.x/')",
"njLib":"<!(python -c 'import os; print(os.path.abspath(\"\"))')/lib",
"conditions":
[
[ "gcc=='4.6'", { "std":"c++0x" } , { "std":"c++11" } ],
[ "OS=='linux' and juliaBase=='/usr'",
{ "juliaLib":"<(juliaBase)/lib/x86_64-linux-gnu/julia" , "juliaInclude":"<(juliaBase)/include/julia" },
{ "juliaLib":"<(juliaBase)/lib/julia" , "juliaInclude":"<(juliaBase)/include/julia" }
]
]
},
"target_name": "nj",
"sources":
[
"src/Call.cpp",
"src/Exception.cpp",
"src/Immediate.cpp",
"src/JMain.cpp",
"src/JuliaExecEnv.cpp",
"src/JuliaHandle.cpp",
"src/Script.cpp",
"src/Type.cpp",
"src/Value.cpp",
"src/Values.cpp",
"src/debug.cpp",
"src/error.cpp",
"src/lvalue.cpp",
"src/request.cpp",
"src/rvalue.cpp"
],
"cflags!": [ "-fno-exceptions" ],
"cflags":
[
"-DOS=<(OS)",
"-std=<(std)",
'-DNJ_LIB="<(njLib)"',
'-DJULIA_LIB="<(juliaLib)"',
"-I<(juliaInclude)",
],
"cflags_cc!": [ "-fno-exceptions" ],
"link_settings":
{
"ldflags":
[
"-L<(juliaLib)",
"-Wl,-rpath,<(juliaLib)",
],
"libraries":
[
"-ljulia"
]
},
"conditions":
[
[ "OS=='mac'",
{
"xcode_settings":
{
"MACOSX_DEPLOYMENT_TARGET":"10.7",
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"OTHER_CPLUSPLUSFLAGS":
[
"-DOS=<(OS)",
"-std=c++11",
"-stdlib=libc++",
'-DNJ_LIB="<(njLib)"',
'-DJULIA_LIB="<(juliaLib)"',
"-I<(juliaInclude)"
],
"OTHER_LDFLAGS":
[
"-stdlib=libc++",
"-L<(juliaLib)",
"-Wl,-rpath,<(juliaLib)",
"-ljulia"
]
}
}
],
[ "version=='0.10.x'",
{
"sources":
[
"src/ScriptEncapsulated-v10.cpp",
"src/nj-v10.cpp"
]
}
],
[ "version=='0.11.x'",
{
"sources":
[
"src/ScriptEncapsulated-v11.cpp",
"src/nj-v11.cpp"
]
}
]
]
}
]
}