forked from kriszyp/lmdb-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinding.gyp
84 lines (84 loc) · 2.19 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
{
"variables": {
"os_linux_compiler%": "gcc",
"use_vl32%": "false",
"use_robust%": "false",
"build_v8_with_gn": "false"
},
"targets": [
{
"target_name": "lmdb-store",
"win_delay_load_hook": "false",
"sources": [
"dependencies/libmdbx/mdbx.c",
"dependencies/libmdbx/mdbx.c++",
"dependencies/lz4/lib/lz4.h",
"dependencies/lz4/lib/lz4.c",
"src/node-lmdbx.cpp",
"src/env.cpp",
"src/compression.cpp",
"src/ordered-binary.cpp",
"src/misc.cpp",
"src/txn.cpp",
"src/dbi.cpp",
"src/cursor.cpp"
],
"defines": ["MDB_FIXEDSIZE", "MDB_PARANOID"],
"include_dirs": [
"<!(node -e \"require('nan')\")",
"dependencies/libmdbx",
"dependencies/lz4/lib"
],
"conditions": [
["OS=='linux'", {
"variables": {
"gcc_version" : "<!(<(os_linux_compiler) -dumpversion | cut -d '.' -f 1)",
},
"conditions": [
["gcc_version>=7", {
"cflags": [
"-Wimplicit-fallthrough=2",
],
}],
],
"ldflags": [
"-fPIC",
"-fvisibility=hidden"
],
"cflags": [
"-fPIC",
"-fvisibility=hidden",
"-O3"
],
"cflags_cc": [
"-fPIC",
"-fvisibility=hidden",
"-fvisibility-inlines-hidden",
"-std=c++0x"
]
}],
["OS=='mac'", {
"xcode_settings": {
"OTHER_CPLUSPLUSFLAGS" : ["-std=c++11"],
"MACOSX_DEPLOYMENT_TARGET": "10.7",
"OTHER_LDFLAGS": ["-std=c++11"],
"CLANG_CXX_LIBRARY": "libc++"
}
}],
["OS=='win'", {
"libraries": ["ntdll.lib"]
}],
["use_robust=='true'", {
"defines": ["MDB_FIXEDSIZE", "MDB_PARANOID", "MDB_USE_ROBUST"],
}],
["use_vl32=='true'", {
"conditions": [
["target_arch=='ia32'", {
"defines": ["MDB_FIXEDSIZE", "MDB_PARANOID", "MDB_VL32"]
}]
]
}],
],
}
]
}