| OLD | NEW |
| 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2009 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 'targets': [ | 6 'variables': { |
| 7 { | 7 'use_system_libevent%': 0, |
| 8 'target_name': 'libevent', | 8 }, |
| 9 'product_name': 'event', | 9 'conditions': [ |
| 10 'type': '<(library)', | 10 ['use_system_libevent==0', { |
| 11 'sources': [ | 11 'targets': [ |
| 12 'buffer.c', | 12 { |
| 13 'evbuffer.c', | 13 'target_name': 'libevent', |
| 14 'evdns.c', | 14 'product_name': 'event', |
| 15 'event.c', | 15 'type': '<(library)', |
| 16 'event_tagging.c', | 16 'sources': [ |
| 17 'evrpc.c', | 17 'buffer.c', |
| 18 'evutil.c', | 18 'evbuffer.c', |
| 19 'http.c', | 19 'evdns.c', |
| 20 'log.c', | 20 'event.c', |
| 21 'poll.c', | 21 'event_tagging.c', |
| 22 'select.c', | 22 'evrpc.c', |
| 23 'signal.c', | 23 'evutil.c', |
| 24 'strlcpy.c', | 24 'http.c', |
| 25 'log.c', |
| 26 'poll.c', |
| 27 'select.c', |
| 28 'signal.c', |
| 29 'strlcpy.c', |
| 30 ], |
| 31 'defines': [ |
| 32 'HAVE_CONFIG_H', |
| 33 ], |
| 34 'include_dirs': [ |
| 35 '.', # libevent includes some of its own headers with |
| 36 # #include <...> instead of #include "..." |
| 37 ], |
| 38 'conditions': [ |
| 39 # libevent has platform-specific implementation files. Since its |
| 40 # native build uses autoconf, platform-specific config.h files are |
| 41 # provided and live in platform-specific directories. |
| 42 [ 'OS == "linux"', { |
| 43 'sources': [ 'epoll.c', 'epoll_sub.c' ], |
| 44 'include_dirs': [ 'linux' ], |
| 45 'link_settings': { |
| 46 'libraries': [ |
| 47 # We need rt for clock_gettime(). |
| 48 # TODO(port) Maybe on FreeBSD as well? |
| 49 '-lrt', |
| 50 ], |
| 51 }, |
| 52 }], |
| 53 [ 'OS == "mac" or OS == "freebsd"', { |
| 54 'sources': [ 'kqueue.c' ], |
| 55 'include_dirs': [ 'mac' ] |
| 56 }], |
| 57 ], |
| 58 }, |
| 25 ], | 59 ], |
| 26 'defines': [ | 60 }, { # use_system_libevent != 0 |
| 27 'HAVE_CONFIG_H', | 61 'targets': [ |
| 28 ], | 62 { |
| 29 'include_dirs': [ | 63 'target_name': 'libevent', |
| 30 '.', # libevent includes some of its own headers with #include <...> | 64 'type': 'settings', |
| 31 # instead of #include "..." | 65 'direct_dependent_settings': { |
| 32 ], | 66 'defines': [ |
| 33 'conditions': [ | 67 'USE_SYSTEM_LIBEVENT', |
| 34 # libevent has platform-specific implementation files. Since its | 68 ], |
| 35 # native build uses autoconf, platform-specific config.h files are | 69 }, |
| 36 # provided and live in platform-specific directories. | |
| 37 [ 'OS == "linux"', { | |
| 38 'sources': [ 'epoll.c', 'epoll_sub.c' ], | |
| 39 'include_dirs': [ 'linux' ], | |
| 40 'link_settings': { | 70 'link_settings': { |
| 41 'libraries': [ | 71 'libraries': [ |
| 42 # We need rt for clock_gettime(). | 72 '-levent', |
| 43 # TODO(port) Maybe on FreeBSD as well? | |
| 44 '-lrt', | |
| 45 ], | 73 ], |
| 46 }, | 74 }, |
| 47 }], | 75 } |
| 48 [ 'OS == "mac" or OS == "freebsd"', { | |
| 49 'sources': [ 'kqueue.c' ], | |
| 50 'include_dirs': [ 'mac' ] | |
| 51 }], | |
| 52 ], | 76 ], |
| 53 }, | 77 }], |
| 54 ], | 78 ], |
| 55 } | 79 } |
| 56 | 80 |
| 57 # Local Variables: | 81 # Local Variables: |
| 58 # tab-width:2 | 82 # tab-width:2 |
| 59 # indent-tabs-mode:nil | 83 # indent-tabs-mode:nil |
| 60 # End: | 84 # End: |
| 61 # vim: set expandtab tabstop=2 shiftwidth=2: | 85 # vim: set expandtab tabstop=2 shiftwidth=2: |
| OLD | NEW |