summaryrefslogtreecommitdiffstats
path: root/media/mtransport/third_party/nICEr/nicer.gyp
blob: 9df4a4b28efb0e1a409815d624bd31ff5c6c5c51 (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
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# nrappkit.gyp
#
#
{
  'variables' : {
    'build_with_gonk%': 0,
    'have_ethtool_cmd_speed_hi%': 1
  },
  'targets' : [
      {
          'target_name' : 'nicer',
          'type' : 'static_library',

          'include_dirs' : [
              ## EXTERNAL
              # nrappkit
	      '../nrappkit/src/event',
	      '../nrappkit/src/log',
              '../nrappkit/src/plugin',
	      '../nrappkit/src/registry',
	      '../nrappkit/src/share',
	      '../nrappkit/src/stats',
	      '../nrappkit/src/util',
	      '../nrappkit/src/util/libekr',
 	      '../nrappkit/src/port/generic/include',

              # INTERNAL
              "./src/crypto",
              "./src/ice",
              "./src/net",
              "./src/stun",
              "./src/util",
          ],

          'sources' : [
                # Crypto
                "./src/crypto/nr_crypto.c",
                "./src/crypto/nr_crypto.h",
                #"./src/crypto/nr_crypto_openssl.c",
                #"./src/crypto/nr_crypto_openssl.h",

                # ICE
                "./src/ice/ice_candidate.c",
                "./src/ice/ice_candidate.h",
                "./src/ice/ice_candidate_pair.c",
                "./src/ice/ice_candidate_pair.h",
                "./src/ice/ice_codeword.h",
                "./src/ice/ice_component.c",
                "./src/ice/ice_component.h",
                "./src/ice/ice_ctx.c",
                "./src/ice/ice_ctx.h",
                "./src/ice/ice_handler.h",
                "./src/ice/ice_media_stream.c",
                "./src/ice/ice_media_stream.h",
                "./src/ice/ice_parser.c",
                "./src/ice/ice_peer_ctx.c",
                "./src/ice/ice_peer_ctx.h",
                "./src/ice/ice_reg.h",
                "./src/ice/ice_socket.c",
                "./src/ice/ice_socket.h",

                # Net
                "./src/net/nr_resolver.c",
                "./src/net/nr_resolver.h",
                "./src/net/nr_socket_wrapper.c",
                "./src/net/nr_socket_wrapper.h",
                "./src/net/nr_proxy_tunnel.c",
                "./src/net/nr_proxy_tunnel.h",
                "./src/net/nr_socket.c",
                "./src/net/nr_socket.h",
                #"./src/net/nr_socket_local.c",
                "./src/net/nr_socket_local.h",
                "./src/net/nr_socket_multi_tcp.c",
                "./src/net/nr_socket_multi_tcp.h",
                "./src/net/transport_addr.c",
                "./src/net/transport_addr.h",
                "./src/net/transport_addr_reg.c",
                "./src/net/transport_addr_reg.h",
                "./src/net/local_addr.c",
                "./src/net/local_addr.h",
                "./src/net/nr_interface_prioritizer.c",
                "./src/net/nr_interface_prioritizer.h",

                # STUN
                "./src/stun/addrs.c",
                "./src/stun/addrs.h",
                "./src/stun/ifaddrs-android.c",
                "./src/stun/ifaddrs-android.h",
                "./src/stun/nr_socket_turn.c",
                "./src/stun/nr_socket_turn.h",
                "./src/stun/nr_socket_buffered_stun.c",
                "./src/stun/nr_socket_buffered_stun.h",
                "./src/stun/stun.h",
                "./src/stun/stun_build.c",
                "./src/stun/stun_build.h",
                "./src/stun/stun_client_ctx.c",
                "./src/stun/stun_client_ctx.h",
                "./src/stun/stun_codec.c",
                "./src/stun/stun_codec.h",
                "./src/stun/stun_hint.c",
                "./src/stun/stun_hint.h",
                "./src/stun/stun_msg.c",
                "./src/stun/stun_msg.h",
                "./src/stun/stun_proc.c",
                "./src/stun/stun_proc.h",
                "./src/stun/stun_reg.h",
                "./src/stun/stun_server_ctx.c",
                "./src/stun/stun_server_ctx.h",
                "./src/stun/stun_util.c",
                "./src/stun/stun_util.h",
                "./src/stun/turn_client_ctx.c",
                "./src/stun/turn_client_ctx.h",

                # Util
                "./src/util/cb_args.c",
                "./src/util/cb_args.h",
                "./src/util/ice_util.c",
                "./src/util/ice_util.h",
                "./src/util/mbslen.c",
                "./src/util/mbslen.h",


          ],

          'defines' : [
              'SANITY_CHECKS',
              'USE_TURN',
              'USE_ICE',
              'USE_RFC_3489_BACKWARDS_COMPATIBLE',
              'USE_STUND_0_96',
              'USE_STUN_PEDANTIC',
              'USE_TURN',
              'NR_SOCKET_IS_VOID_PTR',
              'restrict=',
	      'R_PLATFORM_INT_TYPES=<stdint.h>',
	      'R_DEFINED_INT2=int16_t',
	      'R_DEFINED_UINT2=uint16_t',
	      'R_DEFINED_INT4=int32_t',
	      'R_DEFINED_UINT4=uint32_t',
	      'R_DEFINED_INT8=int64_t',
	      'R_DEFINED_UINT8=uint64_t',
          ],

          'conditions' : [
              ## Mac and BSDs
              [ 'OS == "mac" or OS == "ios"', {
                'defines' : [
                    'DARWIN',
                ],
              }],
              [ 'os_bsd == 1', {
                'defines' : [
                    'BSD',
                ],
              }],
              [ 'OS == "mac" or OS == "ios" or os_bsd == 1', {
                'cflags_mozilla': [
                    '-Wall',
                    '-Wno-parentheses',
                    '-Wno-strict-prototypes',
                    '-Wmissing-prototypes',
                 ],
                 'defines' : [
                     'HAVE_LIBM=1',
                     'HAVE_STRDUP=1',
                     'HAVE_STRLCPY=1',
                     'HAVE_SYS_TIME_H=1',
                     'HAVE_VFPRINTF=1',
                     'NEW_STDIO'
                     'RETSIGTYPE=void',
                     'TIME_WITH_SYS_TIME_H=1',
                     '__UNUSED__=__attribute__((unused))',
                 ],

		 'include_dirs': [
		     '../nrappkit/src/port/darwin/include'
		 ],

		 'sources': [
		 ],
              }],

              ## Win
              [ 'OS == "win"', {
                'defines' : [
                    'WIN32',
                    'USE_ICE',
                    'USE_TURN',
                    'USE_RFC_3489_BACKWARDS_COMPATIBLE',
                    'USE_STUND_0_96',
                    'USE_STUN_PEDANTIC',
                    '_CRT_SECURE_NO_WARNINGS',
                    '__UNUSED__=',
                    'HAVE_STRDUP',
                    'NO_REG_RPC'
                ],

		 'include_dirs': [
		     '../nrappkit/src/port/win32/include'
		 ],
              }],
              ## Linux/Android
              [ '(OS == "linux") or (OS=="android")', {
                'cflags_mozilla': [
                    '-Wall',
                    '-Wno-parentheses',
                    '-Wno-strict-prototypes',
                    '-Wmissing-prototypes',
                 ],
                 'defines' : [
                     'LINUX',
                     'HAVE_LIBM=1',
                     'HAVE_STRDUP=1',
                     'HAVE_STRLCPY=1',
                     'HAVE_SYS_TIME_H=1',
                     'HAVE_VFPRINTF=1',
                     'NEW_STDIO'
                     'RETSIGTYPE=void',
                     'TIME_WITH_SYS_TIME_H=1',
                     '__UNUSED__=__attribute__((unused))',
                 ],

		 'include_dirs': [
		     '../nrappkit/src/port/linux/include'
		 ],

		 'sources': [
		 ],
              }],
              ['moz_widget_toolkit_gonk==1', {
                'defines' : [
                  'WEBRTC_GONK',
                  'NO_REG_RPC',
                ],
             }],
             # Gonk has its own nr_stun_get_addrs implementation.
             ['build_with_gonk==1', {
               'defines': [
                  "USE_PLATFORM_NR_STUN_GET_ADDRS",
               ]
             }],
             ['have_ethtool_cmd_speed_hi==0', {
               'defines': [
                  "DONT_HAVE_ETHTOOL_SPEED_HI",
               ]
             }]
          ],
      }]
}