# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. __doc__ = """ Configuration for building event.lib / libevent.a. This is currently only suitable for Linux and Mac. """ Import('env') env = env.Clone() env.Append( CPPDEFINES = [ 'HAVE_CONFIG_H', ], ) if env.Bit('mac'): env.Prepend( CPPPATH = [ '$LIBEVENT_DIR/generated/', ], ) env['ENV']['CONFIGURATION_TEMP_DIR'] = env.Dir('$LIBEVENT_DIR').abspath env.Command('$LIBEVENT_DIR/generated/config.h', ['libevent.xcodeproj/libevent_prebuild.sh', 'config.h.in'], 'sh ${SOURCES[0]} ${SOURCES[1]}') if env.Bit('linux'): env.Prepend( CPPPATH = [ '$LIBEVENT_DIR/linux/', ], ) env.Prepend( CPPPATH = [ '$LIBEVENT_DIR', '$LIBEVENT_DIR/compat/', ], ) input_files = [ 'buffer.c', 'evbuffer.c', 'evdns.c', 'event.c', 'event_tagging.c', 'evrpc.c', 'evutil.c', 'http.c', 'log.c', 'poll.c', 'select.c', 'signal.c', 'strlcpy.c', ] if env.Bit('linux'): input_files.extend([ 'epoll.c', 'epoll_sub.c', ]) if env.Bit('mac'): input_files.extend([ 'kqueue.c', ]) env.ChromeLibrary('event', input_files)