1# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2# vim: set filetype=python:
3# This Source Code Form is subject to the terms of the Mozilla Public
4# License, v. 2.0. If a copy of the MPL was not distributed with this
5# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7include('/build/gyp.mozbuild')
8
9GYP_DIRS += [
10    'nICEr',
11    'nrappkit',
12]
13
14# These files cannot be built in unified mode because of name clashes on RCSSTRING
15nICEr_non_unified_sources = [
16    'nICEr/src/crypto/nr_crypto.c',
17    'nICEr/src/ice/ice_candidate.c',
18    'nICEr/src/ice/ice_candidate_pair.c',
19    'nICEr/src/ice/ice_component.c',
20    'nICEr/src/ice/ice_ctx.c',
21    'nICEr/src/ice/ice_media_stream.c',
22    'nICEr/src/ice/ice_parser.c',
23    'nICEr/src/ice/ice_peer_ctx.c',
24    'nICEr/src/ice/ice_socket.c',
25    'nICEr/src/net/nr_socket.c',
26    'nICEr/src/net/transport_addr.c',
27    'nICEr/src/net/transport_addr_reg.c',
28    'nICEr/src/stun/addrs.c',
29    'nICEr/src/stun/nr_socket_turn.c',
30    'nICEr/src/stun/stun_build.c',
31    'nICEr/src/stun/stun_client_ctx.c',
32    'nICEr/src/stun/stun_codec.c',
33    'nICEr/src/stun/stun_hint.c',
34    'nICEr/src/stun/stun_msg.c',
35    'nICEr/src/stun/stun_proc.c',
36    'nICEr/src/stun/stun_server_ctx.c',
37    'nICEr/src/stun/stun_util.c',
38    'nICEr/src/stun/turn_client_ctx.c',
39    'nICEr/src/util/cb_args.c',
40    'nICEr/src/util/ice_util.c',
41]
42
43# This file cannot be built in unified mode because it breaks Linux ASAN builds
44nICEr_non_unified_sources += [
45    'nICEr/src/util/mbslen.c',
46]
47nrappkit_non_unified_sources = [
48    'nrappkit/src/log/r_log.c',
49    'nrappkit/src/util/byteorder.c',
50    'nrappkit/src/util/hex.c',
51    'nrappkit/src/util/libekr/debug.c',
52    'nrappkit/src/util/libekr/r_assoc.c',
53    'nrappkit/src/util/libekr/r_crc32.c',
54    'nrappkit/src/util/libekr/r_data.c',
55    'nrappkit/src/util/libekr/r_errors.c',
56    'nrappkit/src/util/libekr/r_list.c',
57    'nrappkit/src/util/libekr/r_memory.c',
58    'nrappkit/src/util/libekr/r_replace.c',
59    'nrappkit/src/util/libekr/r_time.c',
60    'nrappkit/src/util/p_buf.c',
61    'nrappkit/src/util/util.c',
62]
63
64GYP_DIRS['nICEr'].input = 'nICEr/nicer.gyp'
65GYP_DIRS['nICEr'].variables = gyp_vars
66# We allow warnings for third-party code that can be updated from upstream.
67GYP_DIRS['nICEr'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
68GYP_DIRS['nICEr'].sandbox_vars['FINAL_LIBRARY'] = 'webrtc'
69GYP_DIRS['nICEr'].non_unified_sources += nICEr_non_unified_sources
70
71GYP_DIRS['nrappkit'].input = 'nrappkit/nrappkit.gyp'
72GYP_DIRS['nrappkit'].variables = gyp_vars
73# We allow warnings for third-party code that can be updated from upstream.
74GYP_DIRS['nrappkit'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
75GYP_DIRS['nrappkit'].sandbox_vars['FINAL_LIBRARY'] = 'webrtc'
76GYP_DIRS['nrappkit'].non_unified_sources += nrappkit_non_unified_sources
77