2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2014-10-04 13:02:24 +04:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2017-03-09 13:33:31 +03:00
|
|
|
with Files('**'):
|
|
|
|
BUG_COMPONENT = ('Core', 'General')
|
|
|
|
|
2017-08-09 13:45:39 +03:00
|
|
|
EXPORTS.brotli += [
|
|
|
|
'include/brotli/decode.h',
|
|
|
|
'include/brotli/encode.h',
|
|
|
|
'include/brotli/port.h',
|
|
|
|
'include/brotli/types.h',
|
|
|
|
]
|
|
|
|
|
2014-10-04 13:02:24 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2017-08-09 13:45:39 +03:00
|
|
|
'common/dictionary.c',
|
2018-05-31 19:49:40 +03:00
|
|
|
'common/transform.c',
|
2014-10-04 13:02:24 +04:00
|
|
|
'dec/bit_reader.c',
|
|
|
|
'dec/decode.c',
|
|
|
|
'dec/huffman.c',
|
2015-09-19 01:40:05 +03:00
|
|
|
'dec/state.c',
|
2014-10-04 13:02:24 +04:00
|
|
|
]
|
|
|
|
|
2015-10-20 04:05:20 +03:00
|
|
|
# We allow warnings for third-party code that can be updated from upstream.
|
2017-10-26 01:12:09 +03:00
|
|
|
AllowCompilerWarnings()
|
2015-09-19 01:40:05 +03:00
|
|
|
|
2016-01-28 20:48:08 +03:00
|
|
|
CFLAGS += ['-DBROTLI_BUILD_PORTABLE']
|
|
|
|
|
2014-10-04 13:02:24 +04:00
|
|
|
Library('brotli')
|
2017-04-07 11:02:54 +03:00
|
|
|
|
2017-09-28 10:58:54 +03:00
|
|
|
HostProgram('brotli')
|
2017-04-07 11:02:54 +03:00
|
|
|
|
|
|
|
HOST_SOURCES += UNIFIED_SOURCES
|
|
|
|
|
|
|
|
HOST_SOURCES += [
|
2017-08-09 13:45:39 +03:00
|
|
|
'enc/backward_references.c',
|
|
|
|
'enc/backward_references_hq.c',
|
|
|
|
'enc/bit_cost.c',
|
|
|
|
'enc/block_splitter.c',
|
|
|
|
'enc/brotli_bit_stream.c',
|
|
|
|
'enc/cluster.c',
|
|
|
|
'enc/compress_fragment.c',
|
|
|
|
'enc/compress_fragment_two_pass.c',
|
|
|
|
'enc/dictionary_hash.c',
|
|
|
|
'enc/encode.c',
|
2018-05-31 19:49:40 +03:00
|
|
|
'enc/encoder_dict.c',
|
2017-08-09 13:45:39 +03:00
|
|
|
'enc/entropy_encode.c',
|
|
|
|
'enc/histogram.c',
|
|
|
|
'enc/literal_cost.c',
|
|
|
|
'enc/memory.c',
|
|
|
|
'enc/metablock.c',
|
|
|
|
'enc/static_dict.c',
|
|
|
|
'enc/utf8_util.c',
|
2017-09-28 10:58:54 +03:00
|
|
|
'tools/brotli.c',
|
2017-04-07 11:02:54 +03:00
|
|
|
]
|
2017-08-09 13:45:39 +03:00
|
|
|
|
2019-02-15 00:45:27 +03:00
|
|
|
if CONFIG['HOST_CC_TYPE'] != 'clang-cl':
|
2017-08-09 13:45:39 +03:00
|
|
|
HOST_OS_LIBS += [
|
|
|
|
'm' # for log2() function used by Brotli encoder
|
|
|
|
]
|