1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# 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['PLATFORM'] == 'darwin':
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['PLATFORM'] == 'posix':
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['PLATFORM'] == 'posix':
input_files.extend([
'epoll.c',
'epoll_sub.c',
])
if env['PLATFORM'] == 'darwin':
input_files.extend([
'kqueue.c',
])
env.ChromeStaticLibrary('event', input_files)
|