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