-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbinding.gyp
46 lines (46 loc) · 1.23 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
{
"variables": {
"dependencies_libdir": "<(module_root_dir)/dependencies/lib",
"cpu_cores": "<!(lscpu -b --parse=CPU | grep -v '^#' | wc -l)"
},
"targets": [
{
"target_name": "dtls",
"dependencies": ["gnutls"],
"sources": [
"lib/dtls.c"
],
"cflags": ["-fPIC", "-save-temps"],
"include_dirs":["<(module_root_dir)/lib", "<(module_root_dir)/dependencies/include"],
"link_settings": {
"libraries": [
"-Wl,-rpath,<(dependencies_libdir)/",
'-ltasn1', '-lgmp', '-lhogweed', '-lnettle', '-lgnutls'
],
"library_dirs": [
'<(dependencies_libdir)'
]
}
},
{
"target_name": "gnutls",
"type": "none",
"actions": [
{
"action_name": "action_build_gnutls",
"outputs": [
'<(dependencies_libdir)/libgnutls.so',
'<(dependencies_libdir)/libnettle.so',
'<(dependencies_libdir)/libhogweed.so',
'<(dependencies_libdir)/libgmp.so',
'<(dependencies_libdir)/libtasn1.so'
],
"inputs": [
"<(module_root_dir)/Makefile"
],
"action": ["make", "-j<(cpu_cores)"]
}
]
}
]
}