blob: 831b5ff4be585d643a675656cb0104c8dd50992c [file] [log] [blame]
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'optimize_target_for_speed': 1,
},
'targets': [
{
'target_name': 'headers',
'type': 'static_library',
'sources': [
'c/include/brotli/decode.h',
'c/include/brotli/encode.h',
'c/include/brotli/port.h',
'c/include/brotli/types.h',
],
'toolsets': ['host', 'target'],
},
{
'target_name': 'common',
'type': 'static_library',
'include_dirs': [
'c/include',
],
'sources': [
'c/common/constants.h',
'c/common/dictionary.c',
'c/common/dictionary.h',
'c/common/platform.h',
'c/common/version.h',
],
'dependencies': [
'headers',
],
'toolsets': ['host', 'target'],
},
{
'target_name': 'common_no_dictionary_data',
'type': 'static_library',
'include_dirs': [
'c/include',
],
'sources': [
'c/common/constants.h',
'c/common/dictionary.c',
'c/common/dictionary.h',
'c/common/platform.h',
'c/common/version.h',
],
'dependencies': [
'headers',
],
'defines': [
'BROTLI_EXTERNAL_DICTIONARY_DATA',
],
'toolsets': ['host', 'target'],
},
{
'target_name': 'dec',
'type': 'static_library',
'include_dirs': [
'c/include',
],
'sources': [
'c/dec/bit_reader.c',
'c/dec/bit_reader.h',
'c/dec/context.h',
'c/dec/decode.c',
'c/dec/huffman.c',
'c/dec/huffman.h',
'c/dec/prefix.h',
'c/dec/state.c',
'c/dec/state.h',
'c/dec/transform.h',
],
'dependencies': [
'headers',
'common',
],
'conditions': [
['os_posix==1 and (target_arch=="arm" or target_arch=="armv7" or target_arch=="arm64")', {
'cflags!': ['-Os'],
'cflags': ['-O2'],
}],
],
'toolsets': ['host', 'target'],
},
{
'target_name': 'dec_no_dictionary_data',
'type': 'static_library',
'include_dirs': [
'c/include',
],
'sources': [
'c/dec/bit_reader.c',
'c/dec/bit_reader.h',
'c/dec/context.h',
'c/dec/decode.c',
'c/dec/huffman.c',
'c/dec/huffman.h',
'c/dec/prefix.h',
'c/dec/state.c',
'c/dec/state.h',
'c/dec/transform.h',
],
'dependencies': [
'headers',
'common_no_dictionary_data',
],
'toolsets': ['host', 'target'],
},
{
'target_name': 'bro',
'type': 'executable',
'dependencies': [
'headers',
'common',
'dec',
],
'include_dirs': [
'c/include',
],
'sources': [
'c/enc/backward_references.c',
'c/enc/backward_references.h',
'c/enc/backward_references_hq.c',
'c/enc/backward_references_hq.h',
'c/enc/backward_references_inc.h',
'c/enc/bit_cost.c',
'c/enc/bit_cost.h',
'c/enc/bit_cost_inc.h',
'c/enc/block_encoder_inc.h',
'c/enc/block_splitter.c',
'c/enc/block_splitter.h',
'c/enc/block_splitter_inc.h',
'c/enc/brotli_bit_stream.c',
'c/enc/brotli_bit_stream.h',
'c/enc/cluster.c',
'c/enc/cluster.h',
'c/enc/cluster_inc.h',
'c/enc/command.h',
'c/enc/compress_fragment.c',
'c/enc/compress_fragment.h',
'c/enc/compress_fragment_two_pass.c',
'c/enc/compress_fragment_two_pass.h',
'c/enc/context.h',
'c/enc/dictionary_hash.c',
'c/enc/dictionary_hash.h',
'c/enc/encode.c',
'c/enc/entropy_encode.c',
'c/enc/entropy_encode.h',
'c/enc/entropy_encode_static.h',
'c/enc/fast_log.h',
'c/enc/find_match_length.h',
'c/enc/hash_forgetful_chain_inc.h',
'c/enc/hash.h',
'c/enc/hash_longest_match64_inc.h',
'c/enc/hash_longest_match_inc.h',
'c/enc/hash_longest_match_quickly_inc.h',
'c/enc/hash_to_binary_tree_inc.h',
'c/enc/histogram.c',
'c/enc/histogram.h',
'c/enc/histogram_inc.h',
'c/enc/literal_cost.c',
'c/enc/literal_cost.h',
'c/enc/memory.c',
'c/enc/memory.h',
'c/enc/metablock.c',
'c/enc/metablock.h',
'c/enc/metablock_inc.h',
'c/enc/params.h',
'c/enc/prefix.h',
'c/enc/quality.h',
'c/enc/ringbuffer.h',
'c/enc/static_dict.c',
'c/enc/static_dict.h',
'c/enc/static_dict_lut.h',
'c/enc/utf8_util.c',
'c/enc/utf8_util.h',
'c/enc/write_bits.h',
'c/tools/brotli.c',
],
'toolsets': ['host'],
'conditions': [
['OS=="win" and MSVS_VERSION == "2015"', {
# Disabling "result of 32-bit shift implicitly converted to 64 bits",
# caused by code like: foo |= (1 << i); // warning 4334
'msvs_disabled_warnings': [ 4334, ],
}],
],
}
],
}