| OLD | NEW |
| (Empty) |
| 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 | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 # This SConscript is currently only suitable for Linux. | |
| 6 | |
| 7 Import('env') | |
| 8 | |
| 9 env = env.Clone( | |
| 10 ) | |
| 11 | |
| 12 env.Append( | |
| 13 CPPDEFINES = [ | |
| 14 'HAVE_CONFIG_H', | |
| 15 ], | |
| 16 ) | |
| 17 | |
| 18 if env['PLATFORM'] == 'darwin': | |
| 19 env.Prepend( | |
| 20 CPPPATH = [ | |
| 21 '$LIBEVENT_DIR/generated/', | |
| 22 ], | |
| 23 ) | |
| 24 env['ENV']['CONFIGURATION_TEMP_DIR'] = env.Dir('$LIBEVENT_DIR').abspath | |
| 25 env.Command('$LIBEVENT_DIR/generated/config.h', | |
| 26 ['libevent.xcodeproj/libevent_prebuild.sh', 'config.h.in'], | |
| 27 'sh ${SOURCES[0]} ${SOURCES[1]}') | |
| 28 | |
| 29 | |
| 30 if env['PLATFORM'] == 'posix': | |
| 31 env.Prepend( | |
| 32 CPPPATH = [ | |
| 33 '$LIBEVENT_DIR/linux/', | |
| 34 ], | |
| 35 ) | |
| 36 | |
| 37 env.Prepend( | |
| 38 CPPPATH = [ | |
| 39 '$LIBEVENT_DIR', | |
| 40 '$LIBEVENT_DIR/compat/', | |
| 41 ], | |
| 42 ) | |
| 43 | |
| 44 input_files = [ | |
| 45 'buffer.c', | |
| 46 'evbuffer.c', | |
| 47 'evdns.c', | |
| 48 'event.c', | |
| 49 'event_tagging.c', | |
| 50 'evrpc.c', | |
| 51 'evutil.c', | |
| 52 'http.c', | |
| 53 'log.c', | |
| 54 'poll.c', | |
| 55 'select.c', | |
| 56 'signal.c', | |
| 57 'strlcpy.c', | |
| 58 ] | |
| 59 | |
| 60 if env['PLATFORM'] == 'posix': | |
| 61 input_files.extend([ | |
| 62 'epoll.c', | |
| 63 'epoll_sub.c', | |
| 64 ]) | |
| 65 | |
| 66 if env['PLATFORM'] == 'darwin': | |
| 67 input_files.extend([ | |
| 68 'kqueue.c', | |
| 69 ]) | |
| 70 | |
| 71 | |
| 72 env.ChromeStaticLibrary('event', input_files) | |
| OLD | NEW |