tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

moz.build (2085B)


      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 
      7 libevent_path_prefix = '.'
      8 include(libevent_path_prefix + '/libeventcommon.mozbuild')
      9 
     10 if CONFIG["TARGET_KERNEL"] == "WINNT":
     11     error('should not reach here on Windows')
     12 
     13 if CONFIG['MOZ_SYSTEM_LIBEVENT']:
     14     error('should not reach here if we are using a native libevent')
     15 
     16 # for gethostbyname_r
     17 OS_LIBS += CONFIG["C_R_LIBS"]
     18 
     19 # for socket
     20 OS_LIBS += CONFIG["SOCKET_LIBS"]
     21 
     22 UNIFIED_SOURCES += [
     23     'libevent/buffer.c',
     24     'libevent/bufferevent.c',
     25     'libevent/bufferevent_filter.c',
     26     'libevent/bufferevent_ratelim.c',
     27     'libevent/bufferevent_sock.c',
     28     'libevent/evdns.c',
     29     'libevent/event.c',
     30     'libevent/event_tagging.c',
     31     'libevent/evmap.c',
     32     'libevent/evthread.c',
     33     # 'libevent/evthread_pthread.c', # Unused file.
     34     'libevent/evutil.c',
     35     'libevent/evutil_rand.c',
     36     'libevent/evutil_time.c',
     37     'libevent/http.c',
     38     'libevent/listener.c',
     39     'libevent/log.c',
     40     'libevent/poll.c',
     41     'libevent/select.c',
     42     'libevent/signal.c',
     43     'libevent/strlcpy.c',
     44 ]
     45 
     46 SOURCES += [
     47     'libevent/bufferevent_pair.c',       # conflicting types errors
     48     # 'libevent/evrpc.c', # Unused file. # conflicting TAILQ_ENTRY definition
     49 ]
     50 
     51 if CONFIG["TARGET_KERNEL"] in ("Darwin", "DragonFly", "FreeBSD", "NetBSD", "OpenBSD"):
     52     UNIFIED_SOURCES += [
     53         'libevent/kqueue.c',
     54     ]
     55 
     56 if CONFIG["TARGET_KERNEL"] == "Linux":
     57     UNIFIED_SOURCES += [
     58         'libevent/epoll.c',
     59     ]
     60     if CONFIG['OS_TARGET'] != 'Android':
     61         UNIFIED_SOURCES += [
     62             'libevent/epoll_sub.c',
     63         ]
     64 
     65 if CONFIG["TARGET_KERNEL"] == "SunOS":
     66     SOURCES += [
     67         'libevent/devpoll.c',
     68         'libevent/evport.c',
     69     ]
     70 
     71 # We allow warnings for third-party code that can be updated from upstream.
     72 AllowCompilerWarnings()
     73 
     74 Library('libevent')
     75 
     76 FINAL_LIBRARY = 'xul'