media/mtransport/third_party/nICEr/nicer.gyp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/mtransport/third_party/nICEr/nicer.gyp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,247 @@
     1.4 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.5 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.7 +#
     1.8 +# nrappkit.gyp
     1.9 +#
    1.10 +#
    1.11 +{
    1.12 +  'variables' : {
    1.13 +    'build_with_gonk%': 0,
    1.14 +    'have_ethtool_cmd_speed_hi%': 1
    1.15 +  },
    1.16 +  'targets' : [
    1.17 +      {
    1.18 +          'target_name' : 'nicer',
    1.19 +          'type' : 'static_library',
    1.20 +
    1.21 +          'include_dirs' : [
    1.22 +              ## EXTERNAL
    1.23 +              # nrappkit
    1.24 +	      '../nrappkit/src/event',
    1.25 +	      '../nrappkit/src/log',
    1.26 +              '../nrappkit/src/plugin',
    1.27 +	      '../nrappkit/src/registry',
    1.28 +	      '../nrappkit/src/share',
    1.29 +	      '../nrappkit/src/stats',
    1.30 +	      '../nrappkit/src/util',
    1.31 +	      '../nrappkit/src/util/libekr',
    1.32 + 	      '../nrappkit/src/port/generic/include',
    1.33 +
    1.34 +              # INTERNAL
    1.35 +              "./src/crypto",
    1.36 +              "./src/ice",
    1.37 +              "./src/net",
    1.38 +              "./src/stun",
    1.39 +              "./src/util",
    1.40 +          ],
    1.41 +
    1.42 +          'sources' : [
    1.43 +                # Crypto
    1.44 +                "./src/crypto/nr_crypto.c",
    1.45 +                "./src/crypto/nr_crypto.h",
    1.46 +                #"./src/crypto/nr_crypto_openssl.c",
    1.47 +                #"./src/crypto/nr_crypto_openssl.h",
    1.48 +
    1.49 +                # ICE
    1.50 +                "./src/ice/ice_candidate.c",
    1.51 +                "./src/ice/ice_candidate.h",
    1.52 +                "./src/ice/ice_candidate_pair.c",
    1.53 +                "./src/ice/ice_candidate_pair.h",
    1.54 +                "./src/ice/ice_codeword.h",
    1.55 +                "./src/ice/ice_component.c",
    1.56 +                "./src/ice/ice_component.h",
    1.57 +                "./src/ice/ice_ctx.c",
    1.58 +                "./src/ice/ice_ctx.h",
    1.59 +                "./src/ice/ice_handler.h",
    1.60 +                "./src/ice/ice_media_stream.c",
    1.61 +                "./src/ice/ice_media_stream.h",
    1.62 +                "./src/ice/ice_parser.c",
    1.63 +                "./src/ice/ice_peer_ctx.c",
    1.64 +                "./src/ice/ice_peer_ctx.h",
    1.65 +                "./src/ice/ice_reg.h",
    1.66 +                "./src/ice/ice_socket.c",
    1.67 +                "./src/ice/ice_socket.h",
    1.68 +
    1.69 +                # Net
    1.70 +                "./src/net/nr_resolver.c",
    1.71 +                "./src/net/nr_resolver.h",
    1.72 +                "./src/net/nr_socket.c",
    1.73 +                "./src/net/nr_socket.h",
    1.74 +                #"./src/net/nr_socket_local.c",
    1.75 +                "./src/net/nr_socket_local.h",
    1.76 +                "./src/net/transport_addr.c",
    1.77 +                "./src/net/transport_addr.h",
    1.78 +                "./src/net/transport_addr_reg.c",
    1.79 +                "./src/net/transport_addr_reg.h",
    1.80 +                "./src/net/local_addr.c",
    1.81 +                "./src/net/local_addr.h",
    1.82 +                "./src/net/nr_interface_prioritizer.c",
    1.83 +                "./src/net/nr_interface_prioritizer.h",
    1.84 +
    1.85 +                # STUN
    1.86 +                "./src/stun/addrs.c",
    1.87 +                "./src/stun/addrs.h",
    1.88 +                "./src/stun/nr_socket_turn.c",
    1.89 +                "./src/stun/nr_socket_turn.h",
    1.90 +                "./src/stun/nr_socket_buffered_stun.c",
    1.91 +                "./src/stun/nr_socket_buffered_stun.h",
    1.92 +                "./src/stun/stun.h",
    1.93 +                "./src/stun/stun_build.c",
    1.94 +                "./src/stun/stun_build.h",
    1.95 +                "./src/stun/stun_client_ctx.c",
    1.96 +                "./src/stun/stun_client_ctx.h",
    1.97 +                "./src/stun/stun_codec.c",
    1.98 +                "./src/stun/stun_codec.h",
    1.99 +                "./src/stun/stun_hint.c",
   1.100 +                "./src/stun/stun_hint.h",
   1.101 +                "./src/stun/stun_msg.c",
   1.102 +                "./src/stun/stun_msg.h",
   1.103 +                "./src/stun/stun_proc.c",
   1.104 +                "./src/stun/stun_proc.h",
   1.105 +                "./src/stun/stun_reg.h",
   1.106 +                "./src/stun/stun_server_ctx.c",
   1.107 +                "./src/stun/stun_server_ctx.h",
   1.108 +                "./src/stun/stun_util.c",
   1.109 +                "./src/stun/stun_util.h",
   1.110 +                "./src/stun/turn_client_ctx.c",
   1.111 +                "./src/stun/turn_client_ctx.h",
   1.112 +
   1.113 +                # Util
   1.114 +                "./src/util/cb_args.c",
   1.115 +                "./src/util/cb_args.h",
   1.116 +                "./src/util/ice_util.c",
   1.117 +                "./src/util/ice_util.h",
   1.118 +                "./src/util/mbslen.c",
   1.119 +                "./src/util/mbslen.h",
   1.120 +
   1.121 +
   1.122 +          ],
   1.123 +          
   1.124 +          'defines' : [
   1.125 +              'SANITY_CHECKS',
   1.126 +              'USE_TURN',
   1.127 +              'USE_ICE',
   1.128 +              'USE_RFC_3489_BACKWARDS_COMPATIBLE',
   1.129 +              'USE_STUND_0_96',
   1.130 +              'USE_STUN_PEDANTIC',
   1.131 +              'USE_TURN',
   1.132 +              'NR_SOCKET_IS_VOID_PTR',
   1.133 +              'restrict=',
   1.134 +	      'R_PLATFORM_INT_TYPES=<stdint.h>',
   1.135 +	      'R_DEFINED_INT2=int16_t',
   1.136 +	      'R_DEFINED_UINT2=uint16_t',
   1.137 +	      'R_DEFINED_INT4=int32_t',
   1.138 +	      'R_DEFINED_UINT4=uint32_t',
   1.139 +	      'R_DEFINED_INT8=int64_t',
   1.140 +	      'R_DEFINED_UINT8=uint64_t',
   1.141 +          ],
   1.142 +          
   1.143 +          'conditions' : [
   1.144 +              ## Mac and BSDs
   1.145 +              [ 'OS == "mac"', {
   1.146 +                'defines' : [
   1.147 +                    'DARWIN',
   1.148 +                    'HAVE_XLOCALE',
   1.149 +                ],
   1.150 +              }],
   1.151 +              [ 'os_bsd == 1', {
   1.152 +                'defines' : [
   1.153 +                    'BSD',
   1.154 +                ],
   1.155 +              }],
   1.156 +              [ 'OS == "mac" or os_bsd == 1', {
   1.157 +                'cflags_mozilla': [
   1.158 +                    '-Wall',
   1.159 +                    '-Wno-parentheses',
   1.160 +                    '-Wno-strict-prototypes',
   1.161 +                    '-Wmissing-prototypes',
   1.162 +                 ],
   1.163 +                 'defines' : [
   1.164 +                     'HAVE_LIBM=1',
   1.165 +                     'HAVE_STRDUP=1',
   1.166 +                     'HAVE_STRLCPY=1',
   1.167 +                     'HAVE_SYS_TIME_H=1',
   1.168 +                     'HAVE_VFPRINTF=1',
   1.169 +                     'NEW_STDIO'
   1.170 +                     'RETSIGTYPE=void',
   1.171 +                     'TIME_WITH_SYS_TIME_H=1',
   1.172 +                     '__UNUSED__=__attribute__((unused))',
   1.173 +                 ],
   1.174 +
   1.175 +		 'include_dirs': [
   1.176 +		     '../nrappkit/src/port/darwin/include'
   1.177 +		 ],
   1.178 +		 
   1.179 +		 'sources': [
   1.180 +		 ],
   1.181 +              }],
   1.182 +              
   1.183 +              ## Win
   1.184 +              [ 'OS == "win"', {
   1.185 +                'defines' : [
   1.186 +                    'WIN32',
   1.187 +                    'USE_ICE',
   1.188 +                    'USE_TURN',
   1.189 +                    'USE_RFC_3489_BACKWARDS_COMPATIBLE',
   1.190 +                    'USE_STUND_0_96',
   1.191 +                    'USE_STUN_PEDANTIC',
   1.192 +                    '_CRT_SECURE_NO_WARNINGS',
   1.193 +                    '__UNUSED__=',
   1.194 +                    'HAVE_STRDUP',
   1.195 +                    'NO_REG_RPC'
   1.196 +                ],
   1.197 +
   1.198 +		 'include_dirs': [
   1.199 +		     '../nrappkit/src/port/win32/include'
   1.200 +		 ],
   1.201 +              }],
   1.202 +              ## Linux/Android
   1.203 +              [ '(OS == "linux") or (OS=="android")', {
   1.204 +                'cflags_mozilla': [
   1.205 +                    '-Wall',
   1.206 +                    '-Wno-parentheses',
   1.207 +                    '-Wno-strict-prototypes',
   1.208 +                    '-Wmissing-prototypes',
   1.209 +                 ],
   1.210 +                 'defines' : [
   1.211 +                     'LINUX',
   1.212 +                     'HAVE_LIBM=1',
   1.213 +                     'HAVE_STRDUP=1',
   1.214 +                     'HAVE_STRLCPY=1',
   1.215 +                     'HAVE_SYS_TIME_H=1',
   1.216 +                     'HAVE_VFPRINTF=1',
   1.217 +                     'NEW_STDIO'
   1.218 +                     'RETSIGTYPE=void',
   1.219 +                     'TIME_WITH_SYS_TIME_H=1',
   1.220 +                     '__UNUSED__=__attribute__((unused))',
   1.221 +                 ],
   1.222 +
   1.223 +		 'include_dirs': [
   1.224 +		     '../nrappkit/src/port/linux/include'
   1.225 +		 ],
   1.226 +		 
   1.227 +		 'sources': [
   1.228 +		 ],
   1.229 +              }],
   1.230 +              ['moz_widget_toolkit_gonk==1', {
   1.231 +                'defines' : [
   1.232 +                  'WEBRTC_GONK',
   1.233 +                  'NO_REG_RPC',
   1.234 +                ],
   1.235 +             }],
   1.236 +             # Gonk has its own nr_stun_get_addrs implementation.
   1.237 +             ['build_with_gonk==1', {
   1.238 +               'defines': [
   1.239 +                  "USE_PLATFORM_NR_STUN_GET_ADDRS",
   1.240 +               ]
   1.241 +             }],
   1.242 +             ['have_ethtool_cmd_speed_hi==0', {
   1.243 +               'defines': [
   1.244 +                  "DONT_HAVE_ETHTOOL_SPEED_HI",
   1.245 +               ]
   1.246 +             }]
   1.247 +          ],
   1.248 +      }]
   1.249 +}
   1.250 +

mercurial