aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node/binding.gyp
blob: 247719e981367e5feb416abf69b106cf5b5dde5e (plain)
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
{
  "variables" : {
    'config': '<!(echo $CONFIG)'
  },
  "targets" : [
    {
      'include_dirs': [
        "<!(node -e \"require('nan')\")"
      ],
      'cflags': [
        '-std=c++0x',
        '-Wall',
        '-pthread',
        '-g',
        '-zdefs',
        '-Werror',
        '-Wno-error=deprecated-declarations'
      ],
      'ldflags': [
        '-g'
      ],
      "conditions": [
        ['OS != "win"', {
          'variables': {
            'pkg_config_grpc': '<!(pkg-config --exists grpc >/dev/null 2>&1 && echo true || echo false)'
          },
          'conditions': [
            ['config=="gcov"', {
              'cflags': [
                '-ftest-coverage',
                '-fprofile-arcs',
                '-O0'
              ],
              'ldflags': [
                '-ftest-coverage',
                '-fprofile-arcs'
              ]
            }
           ],
            ['pkg_config_grpc == "true"', {
              'link_settings': {
                'libraries': [
                  '<!@(pkg-config --libs-only-l --static grpc)'
                ]
              },
              'cflags': [
                '<!@(pkg-config --cflags grpc)'
              ],
              'libraries': [
                '<!@(pkg-config --libs-only-L --static grpc)'
              ],
              'ldflags': [
                '<!@(pkg-config --libs-only-other --static grpc)'
              ]
              }, {
                'link_settings': {
                  'libraries': [
                    '-lpthread',
                    '-lgrpc',
                    '-lgpr'
                  ],
                },
                'conditions':[
                  ['OS != "mac"', {
                    'link_settings': {
                      'libraries': [
                        '-lrt'
                      ]
                    }
                  }]
                ]
              }
           ]
          ]
        }],
        ['OS == "mac"', {
          'xcode_settings': {
            'MACOSX_DEPLOYMENT_TARGET': '10.9',
            'OTHER_CFLAGS': [
              '-std=c++11',
              '-stdlib=libc++'
            ]
          }
        }]
      ],
      "target_name": "grpc",
      "sources": [
        "ext/byte_buffer.cc",
        "ext/call.cc",
        "ext/channel.cc",
        "ext/completion_queue_async_worker.cc",
        "ext/credentials.cc",
        "ext/node_grpc.cc",
        "ext/server.cc",
        "ext/server_credentials.cc",
        "ext/timeval.cc"
      ]
    }
  ]
}