| OLD | NEW |
| 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 | 5 |
| 6 __doc__ = """ | 6 __doc__ = """ |
| 7 Configuration for building event.lib / libevent.a. | 7 Configuration for building event.lib / libevent.a. |
| 8 | 8 |
| 9 This is currently only suitable for Linux and Mac. | 9 This is currently only suitable for Linux and Mac. |
| 10 """ | 10 """ |
| 11 | 11 |
| 12 Import('env') | 12 Import('env') |
| 13 | 13 |
| 14 env = env.Clone() | 14 env = env.Clone() |
| 15 | 15 |
| 16 env.Append( | 16 env.Append( |
| 17 CPPDEFINES = [ | 17 CPPDEFINES = [ |
| 18 'HAVE_CONFIG_H', | 18 'HAVE_CONFIG_H', |
| 19 ], | 19 ], |
| 20 ) | 20 ) |
| 21 | 21 |
| 22 if env['PLATFORM'] == 'darwin': | 22 if env.Bit('mac'): |
| 23 env.Prepend( | 23 env.Prepend( |
| 24 CPPPATH = [ | 24 CPPPATH = [ |
| 25 '$LIBEVENT_DIR/generated/', | 25 '$LIBEVENT_DIR/generated/', |
| 26 ], | 26 ], |
| 27 ) | 27 ) |
| 28 env['ENV']['CONFIGURATION_TEMP_DIR'] = env.Dir('$LIBEVENT_DIR').abspath | 28 env['ENV']['CONFIGURATION_TEMP_DIR'] = env.Dir('$LIBEVENT_DIR').abspath |
| 29 env.Command('$LIBEVENT_DIR/generated/config.h', | 29 env.Command('$LIBEVENT_DIR/generated/config.h', |
| 30 ['libevent.xcodeproj/libevent_prebuild.sh', 'config.h.in'], | 30 ['libevent.xcodeproj/libevent_prebuild.sh', 'config.h.in'], |
| 31 'sh ${SOURCES[0]} ${SOURCES[1]}') | 31 'sh ${SOURCES[0]} ${SOURCES[1]}') |
| 32 | 32 |
| 33 | 33 |
| 34 if env['PLATFORM'] == 'posix': | 34 if env.Bit('linux'): |
| 35 env.Prepend( | 35 env.Prepend( |
| 36 CPPPATH = [ | 36 CPPPATH = [ |
| 37 '$LIBEVENT_DIR/linux/', | 37 '$LIBEVENT_DIR/linux/', |
| 38 ], | 38 ], |
| 39 ) | 39 ) |
| 40 | 40 |
| 41 env.Prepend( | 41 env.Prepend( |
| 42 CPPPATH = [ | 42 CPPPATH = [ |
| 43 '$LIBEVENT_DIR', | 43 '$LIBEVENT_DIR', |
| 44 '$LIBEVENT_DIR/compat/', | 44 '$LIBEVENT_DIR/compat/', |
| 45 ], | 45 ], |
| 46 ) | 46 ) |
| 47 | 47 |
| 48 input_files = [ | 48 input_files = [ |
| 49 'buffer.c', | 49 'buffer.c', |
| 50 'evbuffer.c', | 50 'evbuffer.c', |
| 51 'evdns.c', | 51 'evdns.c', |
| 52 'event.c', | 52 'event.c', |
| 53 'event_tagging.c', | 53 'event_tagging.c', |
| 54 'evrpc.c', | 54 'evrpc.c', |
| 55 'evutil.c', | 55 'evutil.c', |
| 56 'http.c', | 56 'http.c', |
| 57 'log.c', | 57 'log.c', |
| 58 'poll.c', | 58 'poll.c', |
| 59 'select.c', | 59 'select.c', |
| 60 'signal.c', | 60 'signal.c', |
| 61 'strlcpy.c', | 61 'strlcpy.c', |
| 62 ] | 62 ] |
| 63 | 63 |
| 64 if env['PLATFORM'] == 'posix': | 64 if env.Bit('linux'): |
| 65 input_files.extend([ | 65 input_files.extend([ |
| 66 'epoll.c', | 66 'epoll.c', |
| 67 'epoll_sub.c', | 67 'epoll_sub.c', |
| 68 ]) | 68 ]) |
| 69 | 69 |
| 70 if env['PLATFORM'] == 'darwin': | 70 if env.Bit('mac'): |
| 71 input_files.extend([ | 71 input_files.extend([ |
| 72 'kqueue.c', | 72 'kqueue.c', |
| 73 ]) | 73 ]) |
| 74 | 74 |
| 75 | 75 |
| 76 env.ChromeStaticLibrary('event', input_files) | 76 env.ChromeStaticLibrary('event', input_files) |
| OLD | NEW |