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 __doc__ = """ | 5 __doc__ = """ |
6 Configuration for building bzip2.lib / libbzip2.a. | 6 Configuration for building bzip2.lib / libbzip2.a. |
7 """ | 7 """ |
8 | 8 |
9 Import('env') | 9 Import('env') |
10 | 10 |
| 11 if env.WantSystemLib('bzip2'): |
| 12 Return() |
| 13 |
11 env = env.Clone() | 14 env = env.Clone() |
12 | 15 |
| 16 env.Append( |
| 17 CPPDEFINES = [ |
| 18 'BZ_NO_STDIO', |
| 19 ], |
| 20 ) |
| 21 |
13 if env['PLATFORM'] == 'win32': | 22 if env['PLATFORM'] == 'win32': |
14 env.Append( | 23 env.Append( |
15 CCFLAGS = [ | 24 CCFLAGS = [ |
16 '/TC', | 25 '/TC', |
17 '/wd4996', | 26 '/wd4996', |
18 '/wd4800', | 27 '/wd4800', |
19 ], | 28 ], |
20 ) | 29 ) |
21 | 30 |
22 env.Append( | |
23 CPPDEFINES = [ | |
24 'BZ_NO_STDIO', | |
25 ], | |
26 ) | |
27 | |
28 input_files = [ | 31 input_files = [ |
29 'blocksort.c', | 32 'blocksort.c', |
30 'bzlib.c', | 33 'bzlib.c', |
31 'compress.c', | 34 'compress.c', |
32 'crctable.c', | 35 'crctable.c', |
33 'decompress.c', | 36 'decompress.c', |
34 'huffman.c', | 37 'huffman.c', |
35 'randtable.c', | 38 'randtable.c', |
36 ] | 39 ] |
37 | 40 |
38 env.ChromeStaticLibrary('bzip2', input_files) | 41 env.ChromeStaticLibrary('bzip2', input_files) |
OLD | NEW |