2015-02-02 18:55:54 +00:00
|
|
|
# vim: sts=2 ts=8 sw=2 tw=99 et ft=python:
|
|
|
|
import os, platform
|
|
|
|
|
|
|
|
lib = builder.compiler.StaticLibrary('zlib')
|
|
|
|
|
2018-08-27 19:35:24 +00:00
|
|
|
if builder.target_platform is 'linux' or builder.target_platform is 'mac':
|
|
|
|
lib.compiler.defines += [
|
|
|
|
'HAVE_UNISTD_H'
|
|
|
|
]
|
|
|
|
|
2015-02-02 18:55:54 +00:00
|
|
|
lib.compiler.includes += [
|
2015-03-10 11:08:26 +00:00
|
|
|
os.path.join(builder.sourcePath, 'third_party', 'zlib'),
|
2015-02-02 18:55:54 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
lib.sources += [
|
|
|
|
'adler32.c',
|
|
|
|
'compress.c',
|
|
|
|
'crc32.c',
|
|
|
|
'deflate.c',
|
2015-02-06 14:40:31 +00:00
|
|
|
'gzclose.c',
|
|
|
|
'gzlib.c',
|
|
|
|
'gzread.c',
|
|
|
|
'gzwrite.c',
|
2015-02-02 18:55:54 +00:00
|
|
|
'infback.c',
|
|
|
|
'inffast.c',
|
|
|
|
'inflate.c',
|
|
|
|
'inftrees.c',
|
|
|
|
'trees.c',
|
|
|
|
'uncompr.c',
|
|
|
|
'zutil.c',
|
|
|
|
]
|
|
|
|
|
|
|
|
rvalue = builder.Add(lib)
|