File: cares.gyp

package info (click to toggle)
nodejs 4.8.2~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 62,476 kB
  • ctags: 111,183
  • sloc: cpp: 661,544; ansic: 31,406; python: 23,073; makefile: 1,418; sh: 1,384; perl: 255; lisp: 222; ruby: 76; xml: 50
file content (175 lines) | stat: -rw-r--r-- 4,942 bytes parent folder | download | duplicates (3)
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
{
  'target_defaults': {
    'conditions': [
      ['OS!="win"', {
        'defines': [
          '_DARWIN_USE_64_BIT_INODE=1',
          '_LARGEFILE_SOURCE',
          '_FILE_OFFSET_BITS=64',
          '_GNU_SOURCE'
        ]
      }],
      [ 'OS=="aix"', {
        'include_dirs': [ 'config/aix' ],
        'sources': [ 'config/aix/ares_config.h' ],
        'defines': [
          # Support for malloc(0)
          '_LINUX_SOURCE_COMPAT=1',
          '_ALL_SOURCE=1'],
      }],
      ['OS=="solaris"', {
        'defines': [
          '__EXTENSIONS__',
          '_XOPEN_SOURCE=500'
        ]
      }]
    ]
  },

  'targets': [
    {
      'target_name': 'cares',
      'type': '<(library)',
      'include_dirs': [ 'include', 'src' ],
      'direct_dependent_settings': {
        'include_dirs': [ 'include' ]
      },
      'sources': [
        'common.gypi',
        'include/ares.h',
        'include/ares_version.h',
        'include/nameser.h',
        'src/ares_cancel.c',
        'src/ares__close_sockets.c',
        'src/ares_create_query.c',
        'src/ares_data.c',
        'src/ares_data.h',
        'src/ares_destroy.c',
        'src/ares_dns.h',
        'src/ares_expand_name.c',
        'src/ares_expand_string.c',
        'src/ares_fds.c',
        'src/ares_free_hostent.c',
        'src/ares_free_string.c',
        'src/ares_getenv.h',
        'src/ares_gethostbyaddr.c',
        'src/ares_gethostbyname.c',
        'src/ares__get_hostent.c',
        'src/ares_getnameinfo.c',
        'src/ares_getopt.c',
        'src/ares_getopt.h',
        'src/ares_getsock.c',
        'src/ares_init.c',
        'src/ares_ipv6.h',
        'src/ares_library_init.c',
        'src/ares_library_init.h',
        'src/ares_llist.c',
        'src/ares_llist.h',
        'src/ares_mkquery.c',
        'src/ares_nowarn.c',
        'src/ares_nowarn.h',
        'src/ares_options.c',
        'src/ares_parse_aaaa_reply.c',
        'src/ares_parse_a_reply.c',
        'src/ares_parse_mx_reply.c',
        'src/ares_parse_naptr_reply.c',
        'src/ares_parse_ns_reply.c',
        'src/ares_parse_ptr_reply.c',
        'src/ares_parse_soa_reply.c',
        'src/ares_parse_srv_reply.c',
        'src/ares_parse_txt_reply.c',
        'src/ares_platform.h',
        'src/ares_private.h',
        'src/ares_process.c',
        'src/ares_query.c',
        'src/ares__read_line.c',
        'src/ares_rules.h',
        'src/ares_search.c',
        'src/ares_send.c',
        'src/ares_setup.h',
        'src/ares_strcasecmp.c',
        'src/ares_strcasecmp.h',
        'src/ares_strdup.c',
        'src/ares_strdup.h',
        'src/ares_strerror.c',
        'src/ares_timeout.c',
        'src/ares__timeval.c',
        'src/ares_version.c',
        'src/ares_writev.c',
        'src/ares_writev.h',
        'src/bitncmp.c',
        'src/bitncmp.h',
        'src/inet_net_pton.c',
        'src/inet_ntop.c',
        'src/ares_inet_net_pton.h',
        'src/setup_once.h',
      ],
      'conditions': [
        [ 'library=="static_library"', {
          'defines': [ 'CARES_STATICLIB' ]
        }, {
          'defines': [ 'CARES_BUILDING_LIBRARY' ]
        }],
        [ 'OS=="win"', {
          'include_dirs': [ 'config/win32' ],
          'sources': [
            'src/config-win32.h',
            'src/windows_port.c',
            'src/ares_getenv.c',
            'src/ares_iphlpapi.h',
            'src/ares_platform.c'
          ],
          'libraries': [
            '-lws2_32.lib',
            '-liphlpapi.lib'
          ],
        }, {
          # Not Windows i.e. POSIX
          'cflags': [
            '-g',
            '-pedantic',
            '-Wall',
            '-Wextra',
            '-Wno-unused-parameter'
          ],
          'defines': [ 'HAVE_CONFIG_H' ],
        }],
        [ 'OS not in "win android"', {
          'cflags': [
            '--std=gnu89'
          ],
        }],
        [ 'OS=="linux"', {
          'include_dirs': [ 'config/linux' ],
          'sources': [ 'config/linux/ares_config.h' ]
        }],
        [ 'OS=="mac"', {
          'include_dirs': [ 'config/darwin' ],
          'sources': [ 'config/darwin/ares_config.h' ]
        }],
        [ 'OS=="freebsd" or OS=="dragonflybsd"', {
          'include_dirs': [ 'config/freebsd' ],
          'sources': [ 'config/freebsd/ares_config.h' ]
        }],
        [ 'OS=="openbsd"', {
          'include_dirs': [ 'config/openbsd' ],
          'sources': [ 'config/openbsd/ares_config.h' ]
        }],
        [ 'OS=="android"', {
          'include_dirs': [ 'config/android' ],
          'sources': [ 'config/android/ares_config.h' ],
        }],
        [ 'OS=="solaris"', {
          'include_dirs': [ 'config/sunos' ],
          'sources': [ 'config/sunos/ares_config.h' ],
          'direct_dependent_settings': {
            'libraries': [
              '-lsocket',
              '-lnsl'
            ]
          }
        }]
      ]
    }
  ]
}