From 81480011581d1bb40e2ed26566a95d060f2767b3 Mon Sep 17 00:00:00 2001 From: Eugene Kliuchnikov Date: Tue, 23 Aug 2016 14:40:33 +0200 Subject: [PATCH] Move "public" to "include/brotli" --- BUILD | 32 ++++++++++++----------------- MANIFEST.in | 2 +- Makefile | 2 +- common/dictionary.h | 2 +- dec/bit_reader.c | 2 +- dec/bit_reader.h | 2 +- dec/context.h | 2 +- dec/decode.c | 2 +- dec/huffman.c | 2 +- dec/huffman.h | 2 +- dec/prefix.h | 2 +- dec/state.c | 2 +- dec/state.h | 2 +- dec/transform.h | 2 +- enc/backward_references.c | 2 +- enc/backward_references.h | 2 +- enc/bit_cost.c | 2 +- enc/bit_cost.h | 2 +- enc/block_splitter.h | 2 +- enc/brotli_bit_stream.c | 2 +- enc/brotli_bit_stream.h | 2 +- enc/cluster.c | 2 +- enc/cluster.h | 2 +- enc/command.h | 2 +- enc/compress_fragment.c | 2 +- enc/compress_fragment.h | 2 +- enc/compress_fragment_two_pass.c | 2 +- enc/compress_fragment_two_pass.h | 2 +- enc/context.h | 2 +- enc/dictionary_hash.h | 2 +- enc/encode.c | 2 +- enc/entropy_encode.c | 2 +- enc/entropy_encode.h | 2 +- enc/entropy_encode_static.h | 2 +- enc/fast_log.h | 2 +- enc/find_match_length.h | 2 +- enc/hash.h | 2 +- enc/histogram.h | 2 +- enc/literal_cost.c | 2 +- enc/literal_cost.h | 2 +- enc/memory.c | 2 +- enc/memory.h | 2 +- enc/metablock.c | 2 +- enc/metablock.h | 2 +- enc/port.h | 2 +- enc/prefix.h | 2 +- enc/quality.h | 2 +- enc/ringbuffer.h | 2 +- enc/static_dict.h | 2 +- enc/static_dict_lut.h | 2 +- enc/utf8_util.c | 2 +- enc/utf8_util.h | 2 +- enc/write_bits.h | 2 +- {public => include/brotli}/decode.h | 2 +- {public => include/brotli}/encode.h | 2 +- {public => include/brotli}/types.h | 0 premake5.lua | 13 ++++++------ python/brotlimodule.cc | 4 ++-- setup.py | 6 +++--- tools/bro.c | 4 ++-- 60 files changed, 81 insertions(+), 86 deletions(-) rename {public => include/brotli}/decode.h (99%) rename {public => include/brotli}/encode.h (99%) rename {public => include/brotli}/types.h (100%) diff --git a/BUILD b/BUILD index 75275d3..c0ac6d8 100644 --- a/BUILD +++ b/BUILD @@ -23,7 +23,7 @@ STRICT_C_OPTIONS = [ filegroup( name = "public_headers", - srcs = glob(["public/*.h"]), + srcs = glob(["include/brotli/*.h"]), ) filegroup( @@ -56,40 +56,34 @@ filegroup( srcs = glob(["enc/*.c"]), ) +cc_inc_library( + name = "brotli", + hdrs = [":public_headers"], + prefix = "include", +) + cc_library( name = "brotli_common", srcs = [":common_sources"], - hdrs = [ - ":common_headers", - ":public_headers", - ], + hdrs = [":common_headers"], + deps = [":brotli"], copts = STRICT_C_OPTIONS, ) cc_library( name = "brotli_dec", srcs = [":dec_sources"], - hdrs = [ - ":dec_headers", - ":public_headers", - ], + hdrs = [":dec_headers"], copts = STRICT_C_OPTIONS, - deps = [ - ":brotli_common", - ], + deps = [":brotli_common"], ) cc_library( name = "brotli_enc", srcs = [":enc_sources"], - hdrs = [ - ":enc_headers", - ":public_headers", - ], + hdrs = [":enc_headers"], copts = STRICT_C_OPTIONS, - deps = [ - ":brotli_common", - ], + deps = [":brotli_common"], ) cc_binary( diff --git a/MANIFEST.in b/MANIFEST.in index c8b25ff..edad2ed 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,7 +5,7 @@ include dec/*.c include dec/*.h include enc/*.c include enc/*.h -include public/*.h +include include/brotli/*.h include LICENSE include MANIFEST.in include python/bro.py diff --git a/Makefile b/Makefile index c728037..838f212 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ $(DIRS): mkdir -p $@ $(OBJECTS): $(DIRS) - $(CC) $(CFLAGS) $(CPPFLAGS) \ + $(CC) $(CFLAGS) $(CPPFLAGS) -Iinclude \ -c $(patsubst %.o,%.c,$(patsubst $(OBJDIR)/%,%,$@)) -o $@ $(EXECUTABLE): $(OBJECTS) diff --git a/common/dictionary.h b/common/dictionary.h index 5a4bc0a..423529e 100644 --- a/common/dictionary.h +++ b/common/dictionary.h @@ -9,7 +9,7 @@ #ifndef BROTLI_COMMON_DICTIONARY_H_ #define BROTLI_COMMON_DICTIONARY_H_ -#include "../public/types.h" +#include #if defined(__cplusplus) || defined(c_plusplus) extern "C" { diff --git a/dec/bit_reader.c b/dec/bit_reader.c index 0320a6d..014a8ed 100644 --- a/dec/bit_reader.c +++ b/dec/bit_reader.c @@ -8,7 +8,7 @@ #include "./bit_reader.h" -#include "../public/types.h" +#include #include "./port.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/dec/bit_reader.h b/dec/bit_reader.h index 57e0bd5..11d2b1f 100644 --- a/dec/bit_reader.h +++ b/dec/bit_reader.h @@ -11,7 +11,7 @@ #include /* memcpy */ -#include "../public/types.h" +#include #include "./port.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/dec/context.h b/dec/context.h index 8adfe5e..9402cbe 100644 --- a/dec/context.h +++ b/dec/context.h @@ -99,7 +99,7 @@ #ifndef BROTLI_DEC_CONTEXT_H_ #define BROTLI_DEC_CONTEXT_H_ -#include "../public/types.h" +#include enum ContextType { CONTEXT_LSB6 = 0, diff --git a/dec/decode.c b/dec/decode.c index 22a6e9a..eb47734 100644 --- a/dec/decode.c +++ b/dec/decode.c @@ -4,7 +4,7 @@ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ -#include "../public/decode.h" +#include #ifdef __ARM_NEON__ #include diff --git a/dec/huffman.c b/dec/huffman.c index 0d751e7..7b1f4cf 100644 --- a/dec/huffman.c +++ b/dec/huffman.c @@ -11,7 +11,7 @@ #include /* memcpy, memset */ #include "../common/constants.h" -#include "../public/types.h" +#include #include "./port.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/dec/huffman.h b/dec/huffman.h index 06f3636..d3b4d53 100644 --- a/dec/huffman.h +++ b/dec/huffman.h @@ -9,7 +9,7 @@ #ifndef BROTLI_DEC_HUFFMAN_H_ #define BROTLI_DEC_HUFFMAN_H_ -#include "../public/types.h" +#include #include "./port.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/dec/prefix.h b/dec/prefix.h index b3b32c4..aa776c7 100644 --- a/dec/prefix.h +++ b/dec/prefix.h @@ -12,7 +12,7 @@ #define BROTLI_DEC_PREFIX_H_ #include "../common/constants.h" -#include "../public/types.h" +#include /* Represents the range of values belonging to a prefix code: */ /* [offset, offset + 2^nbits) */ diff --git a/dec/state.c b/dec/state.c index 7461799..b550a51 100644 --- a/dec/state.c +++ b/dec/state.c @@ -8,7 +8,7 @@ #include /* free, malloc */ -#include "../public/types.h" +#include #include "./huffman.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/dec/state.h b/dec/state.h index 6158fad..0338f3b 100644 --- a/dec/state.h +++ b/dec/state.h @@ -10,7 +10,7 @@ #define BROTLI_DEC_STATE_H_ #include "../common/constants.h" -#include "../public/types.h" +#include #include "./bit_reader.h" #include "./huffman.h" #include "./port.h" diff --git a/dec/transform.h b/dec/transform.h index 91bebac..0f5413a 100644 --- a/dec/transform.h +++ b/dec/transform.h @@ -9,7 +9,7 @@ #ifndef BROTLI_DEC_TRANSFORM_H_ #define BROTLI_DEC_TRANSFORM_H_ -#include "../public/types.h" +#include #include "./port.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/enc/backward_references.c b/enc/backward_references.c index ec286f2..293cc84 100644 --- a/enc/backward_references.c +++ b/enc/backward_references.c @@ -12,7 +12,7 @@ #include /* memcpy, memset */ #include "../common/constants.h" -#include "../public/types.h" +#include #include "./command.h" #include "./fast_log.h" #include "./find_match_length.h" diff --git a/enc/backward_references.h b/enc/backward_references.h index 54c1ceb..1dcd850 100644 --- a/enc/backward_references.h +++ b/enc/backward_references.h @@ -9,7 +9,7 @@ #ifndef BROTLI_ENC_BACKWARD_REFERENCES_H_ #define BROTLI_ENC_BACKWARD_REFERENCES_H_ -#include "../public/types.h" +#include #include "./command.h" #include "./hash.h" #include "./memory.h" diff --git a/enc/bit_cost.c b/enc/bit_cost.c index ce742c4..01e30f6 100644 --- a/enc/bit_cost.c +++ b/enc/bit_cost.c @@ -9,7 +9,7 @@ #include "./bit_cost.h" #include "../common/constants.h" -#include "../public/types.h" +#include #include "./fast_log.h" #include "./histogram.h" #include "./port.h" diff --git a/enc/bit_cost.h b/enc/bit_cost.h index 5d02bcf..e69ee04 100644 --- a/enc/bit_cost.h +++ b/enc/bit_cost.h @@ -9,7 +9,7 @@ #ifndef BROTLI_ENC_BIT_COST_H_ #define BROTLI_ENC_BIT_COST_H_ -#include "../public/types.h" +#include #include "./fast_log.h" #include "./histogram.h" #include "./port.h" diff --git a/enc/block_splitter.h b/enc/block_splitter.h index 00f664a..6abac08 100644 --- a/enc/block_splitter.h +++ b/enc/block_splitter.h @@ -9,7 +9,7 @@ #ifndef BROTLI_ENC_BLOCK_SPLITTER_H_ #define BROTLI_ENC_BLOCK_SPLITTER_H_ -#include "../public/types.h" +#include #include "./command.h" #include "./memory.h" #include "./port.h" diff --git a/enc/brotli_bit_stream.c b/enc/brotli_bit_stream.c index 09b78fe..72f3163 100644 --- a/enc/brotli_bit_stream.c +++ b/enc/brotli_bit_stream.c @@ -13,7 +13,7 @@ #include /* memcpy, memset */ #include "../common/constants.h" -#include "../public/types.h" +#include #include "./context.h" #include "./entropy_encode.h" #include "./entropy_encode_static.h" diff --git a/enc/brotli_bit_stream.h b/enc/brotli_bit_stream.h index b2c698b..a98f98f 100644 --- a/enc/brotli_bit_stream.h +++ b/enc/brotli_bit_stream.h @@ -16,7 +16,7 @@ #ifndef BROTLI_ENC_BROTLI_BIT_STREAM_H_ #define BROTLI_ENC_BROTLI_BIT_STREAM_H_ -#include "../public/types.h" +#include #include "./command.h" #include "./context.h" #include "./entropy_encode.h" diff --git a/enc/cluster.c b/enc/cluster.c index 9a4a0c0..bb66327 100644 --- a/enc/cluster.c +++ b/enc/cluster.c @@ -8,7 +8,7 @@ #include "./cluster.h" -#include "../public/types.h" +#include #include "./bit_cost.h" /* BrotliPopulationCost */ #include "./fast_log.h" #include "./histogram.h" diff --git a/enc/cluster.h b/enc/cluster.h index 2aaaee8..be58614 100644 --- a/enc/cluster.h +++ b/enc/cluster.h @@ -9,7 +9,7 @@ #ifndef BROTLI_ENC_CLUSTER_H_ #define BROTLI_ENC_CLUSTER_H_ -#include "../public/types.h" +#include #include "./histogram.h" #include "./memory.h" #include "./port.h" diff --git a/enc/command.h b/enc/command.h index c3b990d..8037ccf 100644 --- a/enc/command.h +++ b/enc/command.h @@ -9,7 +9,7 @@ #ifndef BROTLI_ENC_COMMAND_H_ #define BROTLI_ENC_COMMAND_H_ -#include "../public/types.h" +#include #include "../common/port.h" #include "./fast_log.h" #include "./prefix.h" diff --git a/enc/compress_fragment.c b/enc/compress_fragment.c index 7296648..eb8cbe7 100644 --- a/enc/compress_fragment.c +++ b/enc/compress_fragment.c @@ -16,7 +16,7 @@ #include /* memcmp, memcpy, memset */ -#include "../public/types.h" +#include #include "./brotli_bit_stream.h" #include "./entropy_encode.h" #include "./fast_log.h" diff --git a/enc/compress_fragment.h b/enc/compress_fragment.h index 2c0208e..b513b4f 100644 --- a/enc/compress_fragment.h +++ b/enc/compress_fragment.h @@ -12,7 +12,7 @@ #ifndef BROTLI_ENC_COMPRESS_FRAGMENT_H_ #define BROTLI_ENC_COMPRESS_FRAGMENT_H_ -#include "../public/types.h" +#include #include "./memory.h" #include "./port.h" diff --git a/enc/compress_fragment_two_pass.c b/enc/compress_fragment_two_pass.c index 882e228..bca914c 100644 --- a/enc/compress_fragment_two_pass.c +++ b/enc/compress_fragment_two_pass.c @@ -14,7 +14,7 @@ #include /* memcmp, memcpy, memset */ -#include "../public/types.h" +#include #include "./bit_cost.h" #include "./brotli_bit_stream.h" #include "./entropy_encode.h" diff --git a/enc/compress_fragment_two_pass.h b/enc/compress_fragment_two_pass.h index dd94df5..83e3d6b 100644 --- a/enc/compress_fragment_two_pass.h +++ b/enc/compress_fragment_two_pass.h @@ -13,7 +13,7 @@ #ifndef BROTLI_ENC_COMPRESS_FRAGMENT_TWO_PASS_H_ #define BROTLI_ENC_COMPRESS_FRAGMENT_TWO_PASS_H_ -#include "../public/types.h" +#include #include "./memory.h" #include "./port.h" diff --git a/enc/context.h b/enc/context.h index ecd8265..3c2f192 100644 --- a/enc/context.h +++ b/enc/context.h @@ -9,7 +9,7 @@ #ifndef BROTLI_ENC_CONTEXT_H_ #define BROTLI_ENC_CONTEXT_H_ -#include "../public/types.h" +#include #include "../common/port.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/enc/dictionary_hash.h b/enc/dictionary_hash.h index 0eed81d..f4f47aa 100644 --- a/enc/dictionary_hash.h +++ b/enc/dictionary_hash.h @@ -9,7 +9,7 @@ #ifndef BROTLI_ENC_DICTIONARY_HASH_H_ #define BROTLI_ENC_DICTIONARY_HASH_H_ -#include "../public/types.h" +#include #if defined(__cplusplus) || defined(c_plusplus) extern "C" { diff --git a/enc/encode.c b/enc/encode.c index ba0a937..274a146 100644 --- a/enc/encode.c +++ b/enc/encode.c @@ -6,7 +6,7 @@ /* Implementation of Brotli compressor. */ -#include "../public/encode.h" +#include #include /* free, malloc */ #include /* memcpy, memset */ diff --git a/enc/entropy_encode.c b/enc/entropy_encode.c index 4866d99..2cae661 100644 --- a/enc/entropy_encode.c +++ b/enc/entropy_encode.c @@ -11,7 +11,7 @@ #include /* memset */ #include "../common/constants.h" -#include "../public/types.h" +#include #include "./port.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/enc/entropy_encode.h b/enc/entropy_encode.h index 0233269..e8f0c7f 100644 --- a/enc/entropy_encode.h +++ b/enc/entropy_encode.h @@ -9,7 +9,7 @@ #ifndef BROTLI_ENC_ENTROPY_ENCODE_H_ #define BROTLI_ENC_ENTROPY_ENCODE_H_ -#include "../public/types.h" +#include #include "./port.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/enc/entropy_encode_static.h b/enc/entropy_encode_static.h index cdb68a8..8501680 100644 --- a/enc/entropy_encode_static.h +++ b/enc/entropy_encode_static.h @@ -11,7 +11,7 @@ #include "../common/constants.h" #include "../common/port.h" -#include "../public/types.h" +#include #include "./write_bits.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/enc/fast_log.h b/enc/fast_log.h index d9cd51c..c6bdc8c 100644 --- a/enc/fast_log.h +++ b/enc/fast_log.h @@ -11,7 +11,7 @@ #include -#include "../public/types.h" +#include #include "../common/port.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/enc/find_match_length.h b/enc/find_match_length.h index f898165..5658394 100644 --- a/enc/find_match_length.h +++ b/enc/find_match_length.h @@ -9,7 +9,7 @@ #ifndef BROTLI_ENC_FIND_MATCH_LENGTH_H_ #define BROTLI_ENC_FIND_MATCH_LENGTH_H_ -#include "../public/types.h" +#include #include "./port.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/enc/hash.h b/enc/hash.h index 8caa8aa..64aaeb6 100644 --- a/enc/hash.h +++ b/enc/hash.h @@ -14,7 +14,7 @@ #include "../common/constants.h" #include "../common/dictionary.h" -#include "../public/types.h" +#include #include "./dictionary_hash.h" #include "./fast_log.h" #include "./find_match_length.h" diff --git a/enc/histogram.h b/enc/histogram.h index 6d3eb48..2161574 100644 --- a/enc/histogram.h +++ b/enc/histogram.h @@ -12,7 +12,7 @@ #include /* memset */ #include "../common/constants.h" -#include "../public/types.h" +#include #include "./block_splitter.h" #include "./command.h" #include "./context.h" diff --git a/enc/literal_cost.c b/enc/literal_cost.c index 81610bb..f2da69b 100644 --- a/enc/literal_cost.c +++ b/enc/literal_cost.c @@ -9,7 +9,7 @@ #include "./literal_cost.h" -#include "../public/types.h" +#include #include "./fast_log.h" #include "./port.h" #include "./utf8_util.h" diff --git a/enc/literal_cost.h b/enc/literal_cost.h index 5a008e2..8e7fb0f 100644 --- a/enc/literal_cost.h +++ b/enc/literal_cost.h @@ -10,7 +10,7 @@ #ifndef BROTLI_ENC_LITERAL_COST_H_ #define BROTLI_ENC_LITERAL_COST_H_ -#include "../public/types.h" +#include #include "./port.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/enc/memory.c b/enc/memory.c index 540502e..5aa5a22 100644 --- a/enc/memory.c +++ b/enc/memory.c @@ -13,7 +13,7 @@ #include /* exit, free, malloc */ #include /* memcpy */ -#include "../public/types.h" +#include #include "./port.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/enc/memory.h b/enc/memory.h index d41db2b..eea91a9 100644 --- a/enc/memory.h +++ b/enc/memory.h @@ -9,7 +9,7 @@ #ifndef BROTLI_ENC_MEMORY_H_ #define BROTLI_ENC_MEMORY_H_ -#include "../public/types.h" +#include #include "./port.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/enc/metablock.c b/enc/metablock.c index cd626fb..cbf7e08 100644 --- a/enc/metablock.c +++ b/enc/metablock.c @@ -10,7 +10,7 @@ #include "./metablock.h" #include "../common/constants.h" -#include "../public/types.h" +#include #include "./bit_cost.h" #include "./block_splitter.h" #include "./cluster.h" diff --git a/enc/metablock.h b/enc/metablock.h index d23846f..da29d81 100644 --- a/enc/metablock.h +++ b/enc/metablock.h @@ -10,7 +10,7 @@ #ifndef BROTLI_ENC_METABLOCK_H_ #define BROTLI_ENC_METABLOCK_H_ -#include "../public/types.h" +#include #include "./block_splitter.h" #include "./command.h" #include "./context.h" diff --git a/enc/port.h b/enc/port.h index 39b7528..3ef7f43 100644 --- a/enc/port.h +++ b/enc/port.h @@ -13,7 +13,7 @@ #include /* memcpy */ #include "../common/port.h" -#include "../public/types.h" +#include #if defined OS_LINUX || defined OS_CYGWIN #include diff --git a/enc/prefix.h b/enc/prefix.h index 66de904..d8af9e6 100644 --- a/enc/prefix.h +++ b/enc/prefix.h @@ -12,7 +12,7 @@ #include "../common/constants.h" #include "../common/port.h" -#include "../public/types.h" +#include #include "./fast_log.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/enc/quality.h b/enc/quality.h index 3e031c5..e2883e9 100755 --- a/enc/quality.h +++ b/enc/quality.h @@ -10,7 +10,7 @@ #ifndef BROTLI_ENC_QUALITY_H_ #define BROTLI_ENC_QUALITY_H_ -#include "../public/encode.h" +#include #define FAST_ONE_PASS_COMPRESSION_QUALITY 0 #define FAST_TWO_PASS_COMPRESSION_QUALITY 1 diff --git a/enc/ringbuffer.h b/enc/ringbuffer.h index 5d7045b..cc954eb 100644 --- a/enc/ringbuffer.h +++ b/enc/ringbuffer.h @@ -11,7 +11,7 @@ #include /* memcpy */ -#include "../public/types.h" +#include #include "./memory.h" #include "./port.h" #include "./quality.h" diff --git a/enc/static_dict.h b/enc/static_dict.h index 277e95c..86476d1 100644 --- a/enc/static_dict.h +++ b/enc/static_dict.h @@ -9,7 +9,7 @@ #ifndef BROTLI_ENC_STATIC_DICT_H_ #define BROTLI_ENC_STATIC_DICT_H_ -#include "../public/types.h" +#include #include "./port.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/enc/static_dict_lut.h b/enc/static_dict_lut.h index 80b6b27..a1517bd 100644 --- a/enc/static_dict_lut.h +++ b/enc/static_dict_lut.h @@ -9,7 +9,7 @@ #ifndef BROTLI_ENC_STATIC_DICT_LUT_H_ #define BROTLI_ENC_STATIC_DICT_LUT_H_ -#include "../public/types.h" +#include #if defined(__cplusplus) || defined(c_plusplus) extern "C" { diff --git a/enc/utf8_util.c b/enc/utf8_util.c index 4fab2d9..a334927 100644 --- a/enc/utf8_util.c +++ b/enc/utf8_util.c @@ -8,7 +8,7 @@ #include "./utf8_util.h" -#include "../public/types.h" +#include #if defined(__cplusplus) || defined(c_plusplus) extern "C" { diff --git a/enc/utf8_util.h b/enc/utf8_util.h index 7846212..a248059 100644 --- a/enc/utf8_util.h +++ b/enc/utf8_util.h @@ -9,7 +9,7 @@ #ifndef BROTLI_ENC_UTF8_UTIL_H_ #define BROTLI_ENC_UTF8_UTIL_H_ -#include "../public/types.h" +#include #include "./port.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/enc/write_bits.h b/enc/write_bits.h index 9c7fedc..3999c91 100644 --- a/enc/write_bits.h +++ b/enc/write_bits.h @@ -12,7 +12,7 @@ #include #include /* printf */ -#include "../public/types.h" +#include #include "./port.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/public/decode.h b/include/brotli/decode.h similarity index 99% rename from public/decode.h rename to include/brotli/decode.h index 65d5904..dd065cc 100755 --- a/public/decode.h +++ b/include/brotli/decode.h @@ -9,7 +9,7 @@ #ifndef BROTLI_DEC_DECODE_H_ #define BROTLI_DEC_DECODE_H_ -#include "./types.h" +#include #if defined(__cplusplus) || defined(c_plusplus) extern "C" { diff --git a/public/encode.h b/include/brotli/encode.h similarity index 99% rename from public/encode.h rename to include/brotli/encode.h index c52062b..cd81700 100755 --- a/public/encode.h +++ b/include/brotli/encode.h @@ -9,7 +9,7 @@ #ifndef BROTLI_ENC_ENCODE_H_ #define BROTLI_ENC_ENCODE_H_ -#include "./types.h" +#include #if defined(__cplusplus) || defined(c_plusplus) extern "C" { diff --git a/public/types.h b/include/brotli/types.h similarity index 100% rename from public/types.h rename to include/brotli/types.h diff --git a/premake5.lua b/premake5.lua index 383b670..085236f 100644 --- a/premake5.lua +++ b/premake5.lua @@ -4,6 +4,7 @@ configurations { "Release", "Debug" } targetdir "bin" location "buildfiles" flags "RelativeLinks" +includedirs { "include" } filter "configurations:Release" optimize "Speed" @@ -28,38 +29,38 @@ configuration { "macosx" } project "brotli_common" kind "SharedLib" language "C" - files { "common/**.h", "common/**.c", "public/**.h" } + files { "common/**.h", "common/**.c" } project "brotli_common_static" kind "StaticLib" targetname "brotli_common" language "C" - files { "common/**.h", "common/**.c", "public/**.h" } + files { "common/**.h", "common/**.c" } project "brotli_dec" kind "SharedLib" language "C" - files { "dec/**.h", "dec/**.c", "public/**.h" } + files { "dec/**.h", "dec/**.c" } links "brotli_common" project "brotli_dec_static" kind "StaticLib" targetname "brotli_dec" language "C" - files { "dec/**.h", "dec/**.c", "public/**.h" } + files { "dec/**.h", "dec/**.c" } links "brotli_common_static" project "brotli_enc" kind "SharedLib" language "C" - files { "enc/**.h", "enc/**.c", "public/**.h" } + files { "enc/**.h", "enc/**.c" } links "brotli_common" project "brotli_enc_static" kind "StaticLib" targetname "brotli_enc" language "C" - files { "enc/**.h", "enc/**.c", "public/**.h" } + files { "enc/**.h", "enc/**.c" } links "brotli_common_static" project "bro" diff --git a/python/brotlimodule.cc b/python/brotlimodule.cc index 88e687c..4849bca 100644 --- a/python/brotlimodule.cc +++ b/python/brotlimodule.cc @@ -4,8 +4,8 @@ #include #include #include "../common/version.h" -#include "../public/encode.h" -#include "../public/decode.h" +#include +#include #if PY_MAJOR_VERSION >= 3 #define PyInt_Check PyLong_Check diff --git a/setup.py b/setup.py index b36a439..8eb3f22 100644 --- a/setup.py +++ b/setup.py @@ -192,9 +192,9 @@ brotli = Extension("brotli", "enc/static_dict_lut.h", "enc/utf8_util.h", "enc/write_bits.h", - "public/decode.h", - "public/encode.h", - "public/types.h", + "include/brotli/decode.h", + "include/brotli/encode.h", + "include/brotli/types.h", ], language="c++", ) diff --git a/tools/bro.c b/tools/bro.c index 940930a..b8fc13f 100644 --- a/tools/bro.c +++ b/tools/bro.c @@ -14,8 +14,8 @@ #include #include -#include "../public/decode.h" -#include "../public/encode.h" +#include +#include #if !defined(_WIN32) #include