netwerk/sctp/src/moz.build

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/sctp/src/moz.build	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,91 @@
     1.4 +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
     1.5 +# vim: set filetype=python:
     1.6 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.9 +
    1.10 +EXPORTS.mozilla.net += [
    1.11 +    'usrsctp.h',
    1.12 +]
    1.13 +
    1.14 +SOURCES += [
    1.15 +    'netinet/sctp_asconf.c',
    1.16 +    'netinet/sctp_auth.c',
    1.17 +    'netinet/sctp_bsd_addr.c',
    1.18 +    'netinet/sctp_callout.c',
    1.19 +    'netinet/sctp_cc_functions.c',
    1.20 +    'netinet/sctp_crc32.c',
    1.21 +    'netinet/sctp_indata.c',
    1.22 +    'netinet/sctp_input.c',
    1.23 +    'netinet/sctp_output.c',
    1.24 +    'netinet/sctp_pcb.c',
    1.25 +    'netinet/sctp_peeloff.c',
    1.26 +    'netinet/sctp_sha1.c',
    1.27 +    'netinet/sctp_ss_functions.c',
    1.28 +    'netinet/sctp_sysctl.c',
    1.29 +    'netinet/sctp_timer.c',
    1.30 +    'netinet/sctp_userspace.c',
    1.31 +    'netinet/sctp_usrreq.c',
    1.32 +    'netinet/sctputil.c',
    1.33 +    'netinet6/sctp6_usrreq.c',
    1.34 +    'user_environment.c',
    1.35 +    'user_mbuf.c',
    1.36 +    'user_recv_thread.c',
    1.37 +    'user_socket.c',
    1.38 +]
    1.39 +
    1.40 +if CONFIG['OS_TARGET'] == 'Android':
    1.41 +    SOURCES += [
    1.42 +        'ifaddrs_android.cpp',
    1.43 +    ]
    1.44 +
    1.45 +LIBRARY_NAME = 'nksctp_s'
    1.46 +
    1.47 +include('/ipc/chromium/chromium-config.mozbuild')
    1.48 +
    1.49 +FINAL_LIBRARY = 'necko'
    1.50 +
    1.51 +LOCAL_INCLUDES += [
    1.52 +    '../../base/src',
    1.53 +    '/content/base/src',
    1.54 +]
    1.55 +
    1.56 +for var in ('SCTP_SIMPLE_ALLOCATOR',
    1.57 +            'SCTP_PROCESS_LEVEL_LOCKS', '__Userspace__', 'INET',
    1.58 +            'CALLBACK_API', 'SCTP_DEBUG'):
    1.59 +    DEFINES[var] = 1
    1.60 +
    1.61 +# Android NDK r5c, used on the builders at the time of this writing, doesn't
    1.62 +# have the headers we need for IPv6
    1.63 +if CONFIG['OS_TARGET'] != 'Android':
    1.64 +    DEFINES['INET6'] = 1
    1.65 +
    1.66 +if CONFIG['OS_TARGET'] == 'WINNT':
    1.67 +    DEFINES['__Userspace_os_Windows'] = 1
    1.68 +    DEFINES['_LIB'] = 1
    1.69 +elif CONFIG['OS_TARGET'] == 'Android':
    1.70 +    DEFINES['__Userspace_os_Linux'] = 1
    1.71 +else:
    1.72 +    DEFINES['__Userspace_os_%s' % CONFIG['OS_TARGET']] = 1
    1.73 +
    1.74 +if CONFIG['OS_TARGET'] == 'Darwin':
    1.75 +    DEFINES['__APPLE_USE_RFC_2292'] = 1
    1.76 +    DEFINES['__APPLE__'] = False
    1.77 +
    1.78 +if CONFIG['OS_TARGET'] in ('Linux', 'Android'):
    1.79 +    # to make sure that in6_pktinfo gets defined on all distros
    1.80 +    DEFINES['_GNU_SOURCE'] = True
    1.81 +
    1.82 +if CONFIG['OS_TARGET'] == 'FreeBSD':
    1.83 +    DEFINES['__FreeBSD__'] = False
    1.84 +
    1.85 +if CONFIG['OS_TARGET'] == 'NetBSD':
    1.86 +    DEFINES['__NetBSD__'] = False
    1.87 +
    1.88 +if CONFIG['OS_TARGET'] == 'OpenBSD':
    1.89 +    DEFINES['__OpenBSD__'] = False
    1.90 +
    1.91 +if CONFIG['OS_TARGET'] == 'DragonFly':
    1.92 +    DEFINES['__DragonFly__'] = False
    1.93 +
    1.94 +NO_PGO = True # Don't PGO

mercurial