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