sgk@google.com | 5137d27 | 2008-10-21 20:24:56 +0000 | [diff] [blame] | 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 | __doc__ = """ |
| 6 | Configuration for building zlib.lib / libzlib.a. |
| 7 | """ |
| 8 | |
| 9 | Import('env') |
| 10 | |
sgk@google.com | ee5d1ac | 2008-11-21 06:04:04 +0000 | [diff] [blame] | 11 | if env.WantSystemLib('zlib'): |
| 12 | env.Append(ZLIB_LIB = ['z']) |
| 13 | Return() |
| 14 | |
sgk@google.com | 5137d27 | 2008-10-21 20:24:56 +0000 | [diff] [blame] | 15 | env = env.Clone() |
| 16 | |
sgk@google.com | ee5d1ac | 2008-11-21 06:04:04 +0000 | [diff] [blame] | 17 | env.Append( |
| 18 | ZLIB_LIB = ['zlib'], |
| 19 | ) |
| 20 | |
sgk@google.com | 5137d27 | 2008-10-21 20:24:56 +0000 | [diff] [blame] | 21 | if env['PLATFORM'] == 'win32': |
| 22 | env.Append( |
| 23 | CCFLAGS = [ |
| 24 | '/TC', |
| 25 | '/wd4800', |
| 26 | ], |
| 27 | ) |
| 28 | |
| 29 | input_files = [ |
| 30 | 'adler32.c', |
| 31 | 'compress.c', |
| 32 | 'crc32.c', |
| 33 | 'deflate.c', |
| 34 | 'gzio.c', |
| 35 | 'infback.c', |
| 36 | 'inffast.c', |
| 37 | 'inflate.c', |
| 38 | 'inftrees.c', |
| 39 | 'trees.c', |
| 40 | 'uncompr.c', |
| 41 | 'zutil.c', |
| 42 | ] |
| 43 | |
| 44 | env.ChromeStaticLibrary('zlib', input_files) |