forked from marcionicolau/node-Rstats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinding.gyp
65 lines (64 loc) · 2.5 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
{
"targets": [
{
"target_name": "R",
"sources": ["src/rl.cpp",
"src/rlink.cpp"],
"variables": {
'R_HOME%': '<!(R RHOME)',
'RCPPFLAGS%': '<!(<(R_HOME%)/bin/R CMD config --cppflags | sed "s/-I\///")',
'RLDFLAGS%': '<!(<(R_HOME%)/bin/R CMD config --ldflags | sed "s/-I\///")',
'RBLAS%': '<!(<(R_HOME%)/bin/R CMD config BLAS_LIBS | sed "s/-I\///")',
'RLAPACK%': '<!(<(R_HOME%)/bin/R CMD config LAPACK_LIBS | sed "s/-I\///")',
'RINSIDEINCL%': '<!(<(R_HOME%)/bin/R --vanilla --slave -e "RInside:::CxxFlags()" | sed "s/-I\///")',
'RINSIDELIBS%': '<!(<(R_HOME%)/bin/R --vanilla --slave -e "RInside:::LdFlags()")',
'RCPPINCL%': '<!(<(R_HOME%)/bin/R --vanilla --slave -e "Rcpp:::CxxFlags()" | sed "s/-I\///")',
'RCPPLIBS%': '<!(<(R_HOME%)/bin/R --vanilla --slave -e "Rcpp:::LdFlags()")',
},
"link_settings":
{
'ldflags': [
'<(RLDFLAGS)'
],
'libraries': [
'<(RLDFLAGS)',
'<(RINSIDELIBS)',
'<(RCPPLIBS)',
'<(RBLAS)',
'<(RLAPACK)',
],
},
"defines": [
# 'RINSIDE_CALLBACKS',
],
'include_dirs': [
"<!(node -e \"require('nan')\")",
'/<(RINSIDEINCL)',
'/<(RCPPINCL)',
'/<(RCPPFLAGS)',
],
'cflags_cc!': ['-fno-rtti', '-fno-exceptions'],
'cflags_cc+': ['-frtti', '-fno-exceptions'],
#'cflags': ['-std=c++1', '-stdlib=libc++'],
'conditions': [
['OS=="mac"', {
'xcode_settings': {
"MACOSX_DEPLOYMENT_TARGET": "10.12",
"defines": [
# 'RINSIDE_CALLBACKS'
],
"OTHER_CPLUSPLUSFLAGS": [
"-stdlib=libc++",
"-std=c++11"
],
"OTHER_LDFLAGS": [
"-stdlib=libc++"
],
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'GCC_ENABLE_CPP_RTTI': 'YES'
}
}]
]
}
]
}