|
1 # This Source Code Form is subject to the terms of the Mozilla Public |
|
2 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
4 # |
|
5 # nrappkit.gyp |
|
6 # |
|
7 # |
|
8 { |
|
9 'variables' : { |
|
10 'build_with_gonk%': 0, |
|
11 'have_ethtool_cmd_speed_hi%': 1 |
|
12 }, |
|
13 'targets' : [ |
|
14 { |
|
15 'target_name' : 'nicer', |
|
16 'type' : 'static_library', |
|
17 |
|
18 'include_dirs' : [ |
|
19 ## EXTERNAL |
|
20 # nrappkit |
|
21 '../nrappkit/src/event', |
|
22 '../nrappkit/src/log', |
|
23 '../nrappkit/src/plugin', |
|
24 '../nrappkit/src/registry', |
|
25 '../nrappkit/src/share', |
|
26 '../nrappkit/src/stats', |
|
27 '../nrappkit/src/util', |
|
28 '../nrappkit/src/util/libekr', |
|
29 '../nrappkit/src/port/generic/include', |
|
30 |
|
31 # INTERNAL |
|
32 "./src/crypto", |
|
33 "./src/ice", |
|
34 "./src/net", |
|
35 "./src/stun", |
|
36 "./src/util", |
|
37 ], |
|
38 |
|
39 'sources' : [ |
|
40 # Crypto |
|
41 "./src/crypto/nr_crypto.c", |
|
42 "./src/crypto/nr_crypto.h", |
|
43 #"./src/crypto/nr_crypto_openssl.c", |
|
44 #"./src/crypto/nr_crypto_openssl.h", |
|
45 |
|
46 # ICE |
|
47 "./src/ice/ice_candidate.c", |
|
48 "./src/ice/ice_candidate.h", |
|
49 "./src/ice/ice_candidate_pair.c", |
|
50 "./src/ice/ice_candidate_pair.h", |
|
51 "./src/ice/ice_codeword.h", |
|
52 "./src/ice/ice_component.c", |
|
53 "./src/ice/ice_component.h", |
|
54 "./src/ice/ice_ctx.c", |
|
55 "./src/ice/ice_ctx.h", |
|
56 "./src/ice/ice_handler.h", |
|
57 "./src/ice/ice_media_stream.c", |
|
58 "./src/ice/ice_media_stream.h", |
|
59 "./src/ice/ice_parser.c", |
|
60 "./src/ice/ice_peer_ctx.c", |
|
61 "./src/ice/ice_peer_ctx.h", |
|
62 "./src/ice/ice_reg.h", |
|
63 "./src/ice/ice_socket.c", |
|
64 "./src/ice/ice_socket.h", |
|
65 |
|
66 # Net |
|
67 "./src/net/nr_resolver.c", |
|
68 "./src/net/nr_resolver.h", |
|
69 "./src/net/nr_socket.c", |
|
70 "./src/net/nr_socket.h", |
|
71 #"./src/net/nr_socket_local.c", |
|
72 "./src/net/nr_socket_local.h", |
|
73 "./src/net/transport_addr.c", |
|
74 "./src/net/transport_addr.h", |
|
75 "./src/net/transport_addr_reg.c", |
|
76 "./src/net/transport_addr_reg.h", |
|
77 "./src/net/local_addr.c", |
|
78 "./src/net/local_addr.h", |
|
79 "./src/net/nr_interface_prioritizer.c", |
|
80 "./src/net/nr_interface_prioritizer.h", |
|
81 |
|
82 # STUN |
|
83 "./src/stun/addrs.c", |
|
84 "./src/stun/addrs.h", |
|
85 "./src/stun/nr_socket_turn.c", |
|
86 "./src/stun/nr_socket_turn.h", |
|
87 "./src/stun/nr_socket_buffered_stun.c", |
|
88 "./src/stun/nr_socket_buffered_stun.h", |
|
89 "./src/stun/stun.h", |
|
90 "./src/stun/stun_build.c", |
|
91 "./src/stun/stun_build.h", |
|
92 "./src/stun/stun_client_ctx.c", |
|
93 "./src/stun/stun_client_ctx.h", |
|
94 "./src/stun/stun_codec.c", |
|
95 "./src/stun/stun_codec.h", |
|
96 "./src/stun/stun_hint.c", |
|
97 "./src/stun/stun_hint.h", |
|
98 "./src/stun/stun_msg.c", |
|
99 "./src/stun/stun_msg.h", |
|
100 "./src/stun/stun_proc.c", |
|
101 "./src/stun/stun_proc.h", |
|
102 "./src/stun/stun_reg.h", |
|
103 "./src/stun/stun_server_ctx.c", |
|
104 "./src/stun/stun_server_ctx.h", |
|
105 "./src/stun/stun_util.c", |
|
106 "./src/stun/stun_util.h", |
|
107 "./src/stun/turn_client_ctx.c", |
|
108 "./src/stun/turn_client_ctx.h", |
|
109 |
|
110 # Util |
|
111 "./src/util/cb_args.c", |
|
112 "./src/util/cb_args.h", |
|
113 "./src/util/ice_util.c", |
|
114 "./src/util/ice_util.h", |
|
115 "./src/util/mbslen.c", |
|
116 "./src/util/mbslen.h", |
|
117 |
|
118 |
|
119 ], |
|
120 |
|
121 'defines' : [ |
|
122 'SANITY_CHECKS', |
|
123 'USE_TURN', |
|
124 'USE_ICE', |
|
125 'USE_RFC_3489_BACKWARDS_COMPATIBLE', |
|
126 'USE_STUND_0_96', |
|
127 'USE_STUN_PEDANTIC', |
|
128 'USE_TURN', |
|
129 'NR_SOCKET_IS_VOID_PTR', |
|
130 'restrict=', |
|
131 'R_PLATFORM_INT_TYPES=<stdint.h>', |
|
132 'R_DEFINED_INT2=int16_t', |
|
133 'R_DEFINED_UINT2=uint16_t', |
|
134 'R_DEFINED_INT4=int32_t', |
|
135 'R_DEFINED_UINT4=uint32_t', |
|
136 'R_DEFINED_INT8=int64_t', |
|
137 'R_DEFINED_UINT8=uint64_t', |
|
138 ], |
|
139 |
|
140 'conditions' : [ |
|
141 ## Mac and BSDs |
|
142 [ 'OS == "mac"', { |
|
143 'defines' : [ |
|
144 'DARWIN', |
|
145 'HAVE_XLOCALE', |
|
146 ], |
|
147 }], |
|
148 [ 'os_bsd == 1', { |
|
149 'defines' : [ |
|
150 'BSD', |
|
151 ], |
|
152 }], |
|
153 [ 'OS == "mac" or os_bsd == 1', { |
|
154 'cflags_mozilla': [ |
|
155 '-Wall', |
|
156 '-Wno-parentheses', |
|
157 '-Wno-strict-prototypes', |
|
158 '-Wmissing-prototypes', |
|
159 ], |
|
160 'defines' : [ |
|
161 'HAVE_LIBM=1', |
|
162 'HAVE_STRDUP=1', |
|
163 'HAVE_STRLCPY=1', |
|
164 'HAVE_SYS_TIME_H=1', |
|
165 'HAVE_VFPRINTF=1', |
|
166 'NEW_STDIO' |
|
167 'RETSIGTYPE=void', |
|
168 'TIME_WITH_SYS_TIME_H=1', |
|
169 '__UNUSED__=__attribute__((unused))', |
|
170 ], |
|
171 |
|
172 'include_dirs': [ |
|
173 '../nrappkit/src/port/darwin/include' |
|
174 ], |
|
175 |
|
176 'sources': [ |
|
177 ], |
|
178 }], |
|
179 |
|
180 ## Win |
|
181 [ 'OS == "win"', { |
|
182 'defines' : [ |
|
183 'WIN32', |
|
184 'USE_ICE', |
|
185 'USE_TURN', |
|
186 'USE_RFC_3489_BACKWARDS_COMPATIBLE', |
|
187 'USE_STUND_0_96', |
|
188 'USE_STUN_PEDANTIC', |
|
189 '_CRT_SECURE_NO_WARNINGS', |
|
190 '__UNUSED__=', |
|
191 'HAVE_STRDUP', |
|
192 'NO_REG_RPC' |
|
193 ], |
|
194 |
|
195 'include_dirs': [ |
|
196 '../nrappkit/src/port/win32/include' |
|
197 ], |
|
198 }], |
|
199 ## Linux/Android |
|
200 [ '(OS == "linux") or (OS=="android")', { |
|
201 'cflags_mozilla': [ |
|
202 '-Wall', |
|
203 '-Wno-parentheses', |
|
204 '-Wno-strict-prototypes', |
|
205 '-Wmissing-prototypes', |
|
206 ], |
|
207 'defines' : [ |
|
208 'LINUX', |
|
209 'HAVE_LIBM=1', |
|
210 'HAVE_STRDUP=1', |
|
211 'HAVE_STRLCPY=1', |
|
212 'HAVE_SYS_TIME_H=1', |
|
213 'HAVE_VFPRINTF=1', |
|
214 'NEW_STDIO' |
|
215 'RETSIGTYPE=void', |
|
216 'TIME_WITH_SYS_TIME_H=1', |
|
217 '__UNUSED__=__attribute__((unused))', |
|
218 ], |
|
219 |
|
220 'include_dirs': [ |
|
221 '../nrappkit/src/port/linux/include' |
|
222 ], |
|
223 |
|
224 'sources': [ |
|
225 ], |
|
226 }], |
|
227 ['moz_widget_toolkit_gonk==1', { |
|
228 'defines' : [ |
|
229 'WEBRTC_GONK', |
|
230 'NO_REG_RPC', |
|
231 ], |
|
232 }], |
|
233 # Gonk has its own nr_stun_get_addrs implementation. |
|
234 ['build_with_gonk==1', { |
|
235 'defines': [ |
|
236 "USE_PLATFORM_NR_STUN_GET_ADDRS", |
|
237 ] |
|
238 }], |
|
239 ['have_ethtool_cmd_speed_hi==0', { |
|
240 'defines': [ |
|
241 "DONT_HAVE_ETHTOOL_SPEED_HI", |
|
242 ] |
|
243 }] |
|
244 ], |
|
245 }] |
|
246 } |
|
247 |