michael@0: # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- michael@0: # vim: set filetype=python: michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: EXPORTS.mozilla.net += [ michael@0: 'usrsctp.h', michael@0: ] michael@0: michael@0: SOURCES += [ michael@0: 'netinet/sctp_asconf.c', michael@0: 'netinet/sctp_auth.c', michael@0: 'netinet/sctp_bsd_addr.c', michael@0: 'netinet/sctp_callout.c', michael@0: 'netinet/sctp_cc_functions.c', michael@0: 'netinet/sctp_crc32.c', michael@0: 'netinet/sctp_indata.c', michael@0: 'netinet/sctp_input.c', michael@0: 'netinet/sctp_output.c', michael@0: 'netinet/sctp_pcb.c', michael@0: 'netinet/sctp_peeloff.c', michael@0: 'netinet/sctp_sha1.c', michael@0: 'netinet/sctp_ss_functions.c', michael@0: 'netinet/sctp_sysctl.c', michael@0: 'netinet/sctp_timer.c', michael@0: 'netinet/sctp_userspace.c', michael@0: 'netinet/sctp_usrreq.c', michael@0: 'netinet/sctputil.c', michael@0: 'netinet6/sctp6_usrreq.c', michael@0: 'user_environment.c', michael@0: 'user_mbuf.c', michael@0: 'user_recv_thread.c', michael@0: 'user_socket.c', michael@0: ] michael@0: michael@0: if CONFIG['OS_TARGET'] == 'Android': michael@0: SOURCES += [ michael@0: 'ifaddrs_android.cpp', michael@0: ] michael@0: michael@0: LIBRARY_NAME = 'nksctp_s' michael@0: michael@0: include('/ipc/chromium/chromium-config.mozbuild') michael@0: michael@0: FINAL_LIBRARY = 'necko' michael@0: michael@0: LOCAL_INCLUDES += [ michael@0: '../../base/src', michael@0: '/content/base/src', michael@0: ] michael@0: michael@0: for var in ('SCTP_SIMPLE_ALLOCATOR', michael@0: 'SCTP_PROCESS_LEVEL_LOCKS', '__Userspace__', 'INET', michael@0: 'CALLBACK_API', 'SCTP_DEBUG'): michael@0: DEFINES[var] = 1 michael@0: michael@0: # Android NDK r5c, used on the builders at the time of this writing, doesn't michael@0: # have the headers we need for IPv6 michael@0: if CONFIG['OS_TARGET'] != 'Android': michael@0: DEFINES['INET6'] = 1 michael@0: michael@0: if CONFIG['OS_TARGET'] == 'WINNT': michael@0: DEFINES['__Userspace_os_Windows'] = 1 michael@0: DEFINES['_LIB'] = 1 michael@0: elif CONFIG['OS_TARGET'] == 'Android': michael@0: DEFINES['__Userspace_os_Linux'] = 1 michael@0: else: michael@0: DEFINES['__Userspace_os_%s' % CONFIG['OS_TARGET']] = 1 michael@0: michael@0: if CONFIG['OS_TARGET'] == 'Darwin': michael@0: DEFINES['__APPLE_USE_RFC_2292'] = 1 michael@0: DEFINES['__APPLE__'] = False michael@0: michael@0: if CONFIG['OS_TARGET'] in ('Linux', 'Android'): michael@0: # to make sure that in6_pktinfo gets defined on all distros michael@0: DEFINES['_GNU_SOURCE'] = True michael@0: michael@0: if CONFIG['OS_TARGET'] == 'FreeBSD': michael@0: DEFINES['__FreeBSD__'] = False michael@0: michael@0: if CONFIG['OS_TARGET'] == 'NetBSD': michael@0: DEFINES['__NetBSD__'] = False michael@0: michael@0: if CONFIG['OS_TARGET'] == 'OpenBSD': michael@0: DEFINES['__OpenBSD__'] = False michael@0: michael@0: if CONFIG['OS_TARGET'] == 'DragonFly': michael@0: DEFINES['__DragonFly__'] = False michael@0: michael@0: NO_PGO = True # Don't PGO