-
Notifications
You must be signed in to change notification settings - Fork 1
/
binding.gyp
78 lines (78 loc) · 2.75 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
#
# Copyright (c) 2015 ASPECTRON Inc.
# All Rights Reserved.
#
# This file is part of IrisCrypt (https://github.com/aspectron/iris-crypt) project.
#
# Distributed under the MIT software license, see the accompanying
# file LICENSE
#
{
'variables': {
'modver_file': 'src/modver.js',
'target_platform': '<!(node -e "console.log(process.platform)")',
'target_modules': '<!(node <(modver_file) <(nodedir))',
'root_dir': '<!(node -e "console.log(process.cwd())")',
'target_dir': '<(root_dir)/../iris-crypt-bin',
'addon_name': 'iris-crypt_<(target_platform)_<(target_arch)_m<(target_modules)',
},
'targets': [
{
'target_name': 'iris-crypt',
'product_name': '<(addon_name)',
'dependencies': ['extern/extern.gyp:*'],
'sources': [
'src/binding.cpp',
'src/base32.hpp',
'src/package.hpp',
'src/package.cpp',
'src/path.hpp',
'src/path.cpp',
],
'cflags_cc': ['-std=c++11'],
'cflags_cc!': ['-fno-rtti', '-fno-exceptions'],
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'GCC_ENABLE_CPP_RTTI': 'YES',
'MACOSX_DEPLOYMENT_TARGET': '10.7',
'OTHER_CPLUSPLUSFLAGS' : ['-std=c++11', '-stdlib=libc++'],
'OTHER_LDFLAGS': ['-stdlib=libc++'],
},
'configurations': {
'Release': { 'msvs_settings': { 'VCCLCompilerTool': {
'ExceptionHandling': 1,
'RuntimeTypeInfo': 'true',
}}},
'Debug': { 'msvs_settings': { 'VCCLCompilerTool': {
'ExceptionHandling': 1,
'RuntimeTypeInfo': 'true',
}}},
},
},
{
'target_name': 'iris-crypt-dist',
'type': 'none',
'dependencies': ['iris-crypt'],
'copies': [
{
'destination': '<(root_dir)/bin',
'files': ['<(PRODUCT_DIR)/<(addon_name).node'],
},
{
'destination': '<(target_dir)/bin',
'files': ['<(PRODUCT_DIR)/<(addon_name).node'],
},
{
'destination': '<(target_dir)',
'files': [
'<(root_dir)/tests/',
'<(root_dir)/index.js',
'<(root_dir)/package.json',
'<(root_dir)/LICENSE',
'<(root_dir)/README.md',
],
},
],
},
]
}