Move "public" to "include/brotli"

This commit is contained in:
Eugene Kliuchnikov 2016-08-23 14:40:33 +02:00
parent 2032f41ffa
commit 8148001158
60 changed files with 81 additions and 86 deletions

32
BUILD
View File

@ -23,7 +23,7 @@ STRICT_C_OPTIONS = [
filegroup( filegroup(
name = "public_headers", name = "public_headers",
srcs = glob(["public/*.h"]), srcs = glob(["include/brotli/*.h"]),
) )
filegroup( filegroup(
@ -56,40 +56,34 @@ filegroup(
srcs = glob(["enc/*.c"]), srcs = glob(["enc/*.c"]),
) )
cc_inc_library(
name = "brotli",
hdrs = [":public_headers"],
prefix = "include",
)
cc_library( cc_library(
name = "brotli_common", name = "brotli_common",
srcs = [":common_sources"], srcs = [":common_sources"],
hdrs = [ hdrs = [":common_headers"],
":common_headers", deps = [":brotli"],
":public_headers",
],
copts = STRICT_C_OPTIONS, copts = STRICT_C_OPTIONS,
) )
cc_library( cc_library(
name = "brotli_dec", name = "brotli_dec",
srcs = [":dec_sources"], srcs = [":dec_sources"],
hdrs = [ hdrs = [":dec_headers"],
":dec_headers",
":public_headers",
],
copts = STRICT_C_OPTIONS, copts = STRICT_C_OPTIONS,
deps = [ deps = [":brotli_common"],
":brotli_common",
],
) )
cc_library( cc_library(
name = "brotli_enc", name = "brotli_enc",
srcs = [":enc_sources"], srcs = [":enc_sources"],
hdrs = [ hdrs = [":enc_headers"],
":enc_headers",
":public_headers",
],
copts = STRICT_C_OPTIONS, copts = STRICT_C_OPTIONS,
deps = [ deps = [":brotli_common"],
":brotli_common",
],
) )
cc_binary( cc_binary(

View File

@ -5,7 +5,7 @@ include dec/*.c
include dec/*.h include dec/*.h
include enc/*.c include enc/*.c
include enc/*.h include enc/*.h
include public/*.h include include/brotli/*.h
include LICENSE include LICENSE
include MANIFEST.in include MANIFEST.in
include python/bro.py include python/bro.py

View File

@ -23,7 +23,7 @@ $(DIRS):
mkdir -p $@ mkdir -p $@
$(OBJECTS): $(DIRS) $(OBJECTS): $(DIRS)
$(CC) $(CFLAGS) $(CPPFLAGS) \ $(CC) $(CFLAGS) $(CPPFLAGS) -Iinclude \
-c $(patsubst %.o,%.c,$(patsubst $(OBJDIR)/%,%,$@)) -o $@ -c $(patsubst %.o,%.c,$(patsubst $(OBJDIR)/%,%,$@)) -o $@
$(EXECUTABLE): $(OBJECTS) $(EXECUTABLE): $(OBJECTS)

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_COMMON_DICTIONARY_H_ #ifndef BROTLI_COMMON_DICTIONARY_H_
#define BROTLI_COMMON_DICTIONARY_H_ #define BROTLI_COMMON_DICTIONARY_H_
#include "../public/types.h" #include <brotli/types.h>
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)
extern "C" { extern "C" {

View File

@ -8,7 +8,7 @@
#include "./bit_reader.h" #include "./bit_reader.h"
#include "../public/types.h" #include <brotli/types.h>
#include "./port.h" #include "./port.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -11,7 +11,7 @@
#include <string.h> /* memcpy */ #include <string.h> /* memcpy */
#include "../public/types.h" #include <brotli/types.h>
#include "./port.h" #include "./port.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -99,7 +99,7 @@
#ifndef BROTLI_DEC_CONTEXT_H_ #ifndef BROTLI_DEC_CONTEXT_H_
#define BROTLI_DEC_CONTEXT_H_ #define BROTLI_DEC_CONTEXT_H_
#include "../public/types.h" #include <brotli/types.h>
enum ContextType { enum ContextType {
CONTEXT_LSB6 = 0, CONTEXT_LSB6 = 0,

View File

@ -4,7 +4,7 @@
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/ */
#include "../public/decode.h" #include <brotli/decode.h>
#ifdef __ARM_NEON__ #ifdef __ARM_NEON__
#include <arm_neon.h> #include <arm_neon.h>

View File

@ -11,7 +11,7 @@
#include <string.h> /* memcpy, memset */ #include <string.h> /* memcpy, memset */
#include "../common/constants.h" #include "../common/constants.h"
#include "../public/types.h" #include <brotli/types.h>
#include "./port.h" #include "./port.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_DEC_HUFFMAN_H_ #ifndef BROTLI_DEC_HUFFMAN_H_
#define BROTLI_DEC_HUFFMAN_H_ #define BROTLI_DEC_HUFFMAN_H_
#include "../public/types.h" #include <brotli/types.h>
#include "./port.h" #include "./port.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -12,7 +12,7 @@
#define BROTLI_DEC_PREFIX_H_ #define BROTLI_DEC_PREFIX_H_
#include "../common/constants.h" #include "../common/constants.h"
#include "../public/types.h" #include <brotli/types.h>
/* Represents the range of values belonging to a prefix code: */ /* Represents the range of values belonging to a prefix code: */
/* [offset, offset + 2^nbits) */ /* [offset, offset + 2^nbits) */

View File

@ -8,7 +8,7 @@
#include <stdlib.h> /* free, malloc */ #include <stdlib.h> /* free, malloc */
#include "../public/types.h" #include <brotli/types.h>
#include "./huffman.h" #include "./huffman.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -10,7 +10,7 @@
#define BROTLI_DEC_STATE_H_ #define BROTLI_DEC_STATE_H_
#include "../common/constants.h" #include "../common/constants.h"
#include "../public/types.h" #include <brotli/types.h>
#include "./bit_reader.h" #include "./bit_reader.h"
#include "./huffman.h" #include "./huffman.h"
#include "./port.h" #include "./port.h"

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_DEC_TRANSFORM_H_ #ifndef BROTLI_DEC_TRANSFORM_H_
#define BROTLI_DEC_TRANSFORM_H_ #define BROTLI_DEC_TRANSFORM_H_
#include "../public/types.h" #include <brotli/types.h>
#include "./port.h" #include "./port.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -12,7 +12,7 @@
#include <string.h> /* memcpy, memset */ #include <string.h> /* memcpy, memset */
#include "../common/constants.h" #include "../common/constants.h"
#include "../public/types.h" #include <brotli/types.h>
#include "./command.h" #include "./command.h"
#include "./fast_log.h" #include "./fast_log.h"
#include "./find_match_length.h" #include "./find_match_length.h"

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_ENC_BACKWARD_REFERENCES_H_ #ifndef BROTLI_ENC_BACKWARD_REFERENCES_H_
#define BROTLI_ENC_BACKWARD_REFERENCES_H_ #define BROTLI_ENC_BACKWARD_REFERENCES_H_
#include "../public/types.h" #include <brotli/types.h>
#include "./command.h" #include "./command.h"
#include "./hash.h" #include "./hash.h"
#include "./memory.h" #include "./memory.h"

View File

@ -9,7 +9,7 @@
#include "./bit_cost.h" #include "./bit_cost.h"
#include "../common/constants.h" #include "../common/constants.h"
#include "../public/types.h" #include <brotli/types.h>
#include "./fast_log.h" #include "./fast_log.h"
#include "./histogram.h" #include "./histogram.h"
#include "./port.h" #include "./port.h"

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_ENC_BIT_COST_H_ #ifndef BROTLI_ENC_BIT_COST_H_
#define BROTLI_ENC_BIT_COST_H_ #define BROTLI_ENC_BIT_COST_H_
#include "../public/types.h" #include <brotli/types.h>
#include "./fast_log.h" #include "./fast_log.h"
#include "./histogram.h" #include "./histogram.h"
#include "./port.h" #include "./port.h"

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_ENC_BLOCK_SPLITTER_H_ #ifndef BROTLI_ENC_BLOCK_SPLITTER_H_
#define BROTLI_ENC_BLOCK_SPLITTER_H_ #define BROTLI_ENC_BLOCK_SPLITTER_H_
#include "../public/types.h" #include <brotli/types.h>
#include "./command.h" #include "./command.h"
#include "./memory.h" #include "./memory.h"
#include "./port.h" #include "./port.h"

View File

@ -13,7 +13,7 @@
#include <string.h> /* memcpy, memset */ #include <string.h> /* memcpy, memset */
#include "../common/constants.h" #include "../common/constants.h"
#include "../public/types.h" #include <brotli/types.h>
#include "./context.h" #include "./context.h"
#include "./entropy_encode.h" #include "./entropy_encode.h"
#include "./entropy_encode_static.h" #include "./entropy_encode_static.h"

View File

@ -16,7 +16,7 @@
#ifndef BROTLI_ENC_BROTLI_BIT_STREAM_H_ #ifndef BROTLI_ENC_BROTLI_BIT_STREAM_H_
#define BROTLI_ENC_BROTLI_BIT_STREAM_H_ #define BROTLI_ENC_BROTLI_BIT_STREAM_H_
#include "../public/types.h" #include <brotli/types.h>
#include "./command.h" #include "./command.h"
#include "./context.h" #include "./context.h"
#include "./entropy_encode.h" #include "./entropy_encode.h"

View File

@ -8,7 +8,7 @@
#include "./cluster.h" #include "./cluster.h"
#include "../public/types.h" #include <brotli/types.h>
#include "./bit_cost.h" /* BrotliPopulationCost */ #include "./bit_cost.h" /* BrotliPopulationCost */
#include "./fast_log.h" #include "./fast_log.h"
#include "./histogram.h" #include "./histogram.h"

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_ENC_CLUSTER_H_ #ifndef BROTLI_ENC_CLUSTER_H_
#define BROTLI_ENC_CLUSTER_H_ #define BROTLI_ENC_CLUSTER_H_
#include "../public/types.h" #include <brotli/types.h>
#include "./histogram.h" #include "./histogram.h"
#include "./memory.h" #include "./memory.h"
#include "./port.h" #include "./port.h"

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_ENC_COMMAND_H_ #ifndef BROTLI_ENC_COMMAND_H_
#define BROTLI_ENC_COMMAND_H_ #define BROTLI_ENC_COMMAND_H_
#include "../public/types.h" #include <brotli/types.h>
#include "../common/port.h" #include "../common/port.h"
#include "./fast_log.h" #include "./fast_log.h"
#include "./prefix.h" #include "./prefix.h"

View File

@ -16,7 +16,7 @@
#include <string.h> /* memcmp, memcpy, memset */ #include <string.h> /* memcmp, memcpy, memset */
#include "../public/types.h" #include <brotli/types.h>
#include "./brotli_bit_stream.h" #include "./brotli_bit_stream.h"
#include "./entropy_encode.h" #include "./entropy_encode.h"
#include "./fast_log.h" #include "./fast_log.h"

View File

@ -12,7 +12,7 @@
#ifndef BROTLI_ENC_COMPRESS_FRAGMENT_H_ #ifndef BROTLI_ENC_COMPRESS_FRAGMENT_H_
#define BROTLI_ENC_COMPRESS_FRAGMENT_H_ #define BROTLI_ENC_COMPRESS_FRAGMENT_H_
#include "../public/types.h" #include <brotli/types.h>
#include "./memory.h" #include "./memory.h"
#include "./port.h" #include "./port.h"

View File

@ -14,7 +14,7 @@
#include <string.h> /* memcmp, memcpy, memset */ #include <string.h> /* memcmp, memcpy, memset */
#include "../public/types.h" #include <brotli/types.h>
#include "./bit_cost.h" #include "./bit_cost.h"
#include "./brotli_bit_stream.h" #include "./brotli_bit_stream.h"
#include "./entropy_encode.h" #include "./entropy_encode.h"

View File

@ -13,7 +13,7 @@
#ifndef BROTLI_ENC_COMPRESS_FRAGMENT_TWO_PASS_H_ #ifndef BROTLI_ENC_COMPRESS_FRAGMENT_TWO_PASS_H_
#define BROTLI_ENC_COMPRESS_FRAGMENT_TWO_PASS_H_ #define BROTLI_ENC_COMPRESS_FRAGMENT_TWO_PASS_H_
#include "../public/types.h" #include <brotli/types.h>
#include "./memory.h" #include "./memory.h"
#include "./port.h" #include "./port.h"

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_ENC_CONTEXT_H_ #ifndef BROTLI_ENC_CONTEXT_H_
#define BROTLI_ENC_CONTEXT_H_ #define BROTLI_ENC_CONTEXT_H_
#include "../public/types.h" #include <brotli/types.h>
#include "../common/port.h" #include "../common/port.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_ENC_DICTIONARY_HASH_H_ #ifndef BROTLI_ENC_DICTIONARY_HASH_H_
#define BROTLI_ENC_DICTIONARY_HASH_H_ #define BROTLI_ENC_DICTIONARY_HASH_H_
#include "../public/types.h" #include <brotli/types.h>
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)
extern "C" { extern "C" {

View File

@ -6,7 +6,7 @@
/* Implementation of Brotli compressor. */ /* Implementation of Brotli compressor. */
#include "../public/encode.h" #include <brotli/encode.h>
#include <stdlib.h> /* free, malloc */ #include <stdlib.h> /* free, malloc */
#include <string.h> /* memcpy, memset */ #include <string.h> /* memcpy, memset */

View File

@ -11,7 +11,7 @@
#include <string.h> /* memset */ #include <string.h> /* memset */
#include "../common/constants.h" #include "../common/constants.h"
#include "../public/types.h" #include <brotli/types.h>
#include "./port.h" #include "./port.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_ENC_ENTROPY_ENCODE_H_ #ifndef BROTLI_ENC_ENTROPY_ENCODE_H_
#define BROTLI_ENC_ENTROPY_ENCODE_H_ #define BROTLI_ENC_ENTROPY_ENCODE_H_
#include "../public/types.h" #include <brotli/types.h>
#include "./port.h" #include "./port.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -11,7 +11,7 @@
#include "../common/constants.h" #include "../common/constants.h"
#include "../common/port.h" #include "../common/port.h"
#include "../public/types.h" #include <brotli/types.h>
#include "./write_bits.h" #include "./write_bits.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -11,7 +11,7 @@
#include <math.h> #include <math.h>
#include "../public/types.h" #include <brotli/types.h>
#include "../common/port.h" #include "../common/port.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_ENC_FIND_MATCH_LENGTH_H_ #ifndef BROTLI_ENC_FIND_MATCH_LENGTH_H_
#define BROTLI_ENC_FIND_MATCH_LENGTH_H_ #define BROTLI_ENC_FIND_MATCH_LENGTH_H_
#include "../public/types.h" #include <brotli/types.h>
#include "./port.h" #include "./port.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -14,7 +14,7 @@
#include "../common/constants.h" #include "../common/constants.h"
#include "../common/dictionary.h" #include "../common/dictionary.h"
#include "../public/types.h" #include <brotli/types.h>
#include "./dictionary_hash.h" #include "./dictionary_hash.h"
#include "./fast_log.h" #include "./fast_log.h"
#include "./find_match_length.h" #include "./find_match_length.h"

View File

@ -12,7 +12,7 @@
#include <string.h> /* memset */ #include <string.h> /* memset */
#include "../common/constants.h" #include "../common/constants.h"
#include "../public/types.h" #include <brotli/types.h>
#include "./block_splitter.h" #include "./block_splitter.h"
#include "./command.h" #include "./command.h"
#include "./context.h" #include "./context.h"

View File

@ -9,7 +9,7 @@
#include "./literal_cost.h" #include "./literal_cost.h"
#include "../public/types.h" #include <brotli/types.h>
#include "./fast_log.h" #include "./fast_log.h"
#include "./port.h" #include "./port.h"
#include "./utf8_util.h" #include "./utf8_util.h"

View File

@ -10,7 +10,7 @@
#ifndef BROTLI_ENC_LITERAL_COST_H_ #ifndef BROTLI_ENC_LITERAL_COST_H_
#define BROTLI_ENC_LITERAL_COST_H_ #define BROTLI_ENC_LITERAL_COST_H_
#include "../public/types.h" #include <brotli/types.h>
#include "./port.h" #include "./port.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -13,7 +13,7 @@
#include <stdlib.h> /* exit, free, malloc */ #include <stdlib.h> /* exit, free, malloc */
#include <string.h> /* memcpy */ #include <string.h> /* memcpy */
#include "../public/types.h" #include <brotli/types.h>
#include "./port.h" #include "./port.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_ENC_MEMORY_H_ #ifndef BROTLI_ENC_MEMORY_H_
#define BROTLI_ENC_MEMORY_H_ #define BROTLI_ENC_MEMORY_H_
#include "../public/types.h" #include <brotli/types.h>
#include "./port.h" #include "./port.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -10,7 +10,7 @@
#include "./metablock.h" #include "./metablock.h"
#include "../common/constants.h" #include "../common/constants.h"
#include "../public/types.h" #include <brotli/types.h>
#include "./bit_cost.h" #include "./bit_cost.h"
#include "./block_splitter.h" #include "./block_splitter.h"
#include "./cluster.h" #include "./cluster.h"

View File

@ -10,7 +10,7 @@
#ifndef BROTLI_ENC_METABLOCK_H_ #ifndef BROTLI_ENC_METABLOCK_H_
#define BROTLI_ENC_METABLOCK_H_ #define BROTLI_ENC_METABLOCK_H_
#include "../public/types.h" #include <brotli/types.h>
#include "./block_splitter.h" #include "./block_splitter.h"
#include "./command.h" #include "./command.h"
#include "./context.h" #include "./context.h"

View File

@ -13,7 +13,7 @@
#include <string.h> /* memcpy */ #include <string.h> /* memcpy */
#include "../common/port.h" #include "../common/port.h"
#include "../public/types.h" #include <brotli/types.h>
#if defined OS_LINUX || defined OS_CYGWIN #if defined OS_LINUX || defined OS_CYGWIN
#include <endian.h> #include <endian.h>

View File

@ -12,7 +12,7 @@
#include "../common/constants.h" #include "../common/constants.h"
#include "../common/port.h" #include "../common/port.h"
#include "../public/types.h" #include <brotli/types.h>
#include "./fast_log.h" #include "./fast_log.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -10,7 +10,7 @@
#ifndef BROTLI_ENC_QUALITY_H_ #ifndef BROTLI_ENC_QUALITY_H_
#define BROTLI_ENC_QUALITY_H_ #define BROTLI_ENC_QUALITY_H_
#include "../public/encode.h" #include <brotli/encode.h>
#define FAST_ONE_PASS_COMPRESSION_QUALITY 0 #define FAST_ONE_PASS_COMPRESSION_QUALITY 0
#define FAST_TWO_PASS_COMPRESSION_QUALITY 1 #define FAST_TWO_PASS_COMPRESSION_QUALITY 1

View File

@ -11,7 +11,7 @@
#include <string.h> /* memcpy */ #include <string.h> /* memcpy */
#include "../public/types.h" #include <brotli/types.h>
#include "./memory.h" #include "./memory.h"
#include "./port.h" #include "./port.h"
#include "./quality.h" #include "./quality.h"

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_ENC_STATIC_DICT_H_ #ifndef BROTLI_ENC_STATIC_DICT_H_
#define BROTLI_ENC_STATIC_DICT_H_ #define BROTLI_ENC_STATIC_DICT_H_
#include "../public/types.h" #include <brotli/types.h>
#include "./port.h" #include "./port.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_ENC_STATIC_DICT_LUT_H_ #ifndef BROTLI_ENC_STATIC_DICT_LUT_H_
#define BROTLI_ENC_STATIC_DICT_LUT_H_ #define BROTLI_ENC_STATIC_DICT_LUT_H_
#include "../public/types.h" #include <brotli/types.h>
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)
extern "C" { extern "C" {

View File

@ -8,7 +8,7 @@
#include "./utf8_util.h" #include "./utf8_util.h"
#include "../public/types.h" #include <brotli/types.h>
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)
extern "C" { extern "C" {

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_ENC_UTF8_UTIL_H_ #ifndef BROTLI_ENC_UTF8_UTIL_H_
#define BROTLI_ENC_UTF8_UTIL_H_ #define BROTLI_ENC_UTF8_UTIL_H_
#include "../public/types.h" #include <brotli/types.h>
#include "./port.h" #include "./port.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -12,7 +12,7 @@
#include <assert.h> #include <assert.h>
#include <stdio.h> /* printf */ #include <stdio.h> /* printf */
#include "../public/types.h" #include <brotli/types.h>
#include "./port.h" #include "./port.h"
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_DEC_DECODE_H_ #ifndef BROTLI_DEC_DECODE_H_
#define BROTLI_DEC_DECODE_H_ #define BROTLI_DEC_DECODE_H_
#include "./types.h" #include <brotli/types.h>
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)
extern "C" { extern "C" {

View File

@ -9,7 +9,7 @@
#ifndef BROTLI_ENC_ENCODE_H_ #ifndef BROTLI_ENC_ENCODE_H_
#define BROTLI_ENC_ENCODE_H_ #define BROTLI_ENC_ENCODE_H_
#include "./types.h" #include <brotli/types.h>
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)
extern "C" { extern "C" {

View File

@ -4,6 +4,7 @@ configurations { "Release", "Debug" }
targetdir "bin" targetdir "bin"
location "buildfiles" location "buildfiles"
flags "RelativeLinks" flags "RelativeLinks"
includedirs { "include" }
filter "configurations:Release" filter "configurations:Release"
optimize "Speed" optimize "Speed"
@ -28,38 +29,38 @@ configuration { "macosx" }
project "brotli_common" project "brotli_common"
kind "SharedLib" kind "SharedLib"
language "C" language "C"
files { "common/**.h", "common/**.c", "public/**.h" } files { "common/**.h", "common/**.c" }
project "brotli_common_static" project "brotli_common_static"
kind "StaticLib" kind "StaticLib"
targetname "brotli_common" targetname "brotli_common"
language "C" language "C"
files { "common/**.h", "common/**.c", "public/**.h" } files { "common/**.h", "common/**.c" }
project "brotli_dec" project "brotli_dec"
kind "SharedLib" kind "SharedLib"
language "C" language "C"
files { "dec/**.h", "dec/**.c", "public/**.h" } files { "dec/**.h", "dec/**.c" }
links "brotli_common" links "brotli_common"
project "brotli_dec_static" project "brotli_dec_static"
kind "StaticLib" kind "StaticLib"
targetname "brotli_dec" targetname "brotli_dec"
language "C" language "C"
files { "dec/**.h", "dec/**.c", "public/**.h" } files { "dec/**.h", "dec/**.c" }
links "brotli_common_static" links "brotli_common_static"
project "brotli_enc" project "brotli_enc"
kind "SharedLib" kind "SharedLib"
language "C" language "C"
files { "enc/**.h", "enc/**.c", "public/**.h" } files { "enc/**.h", "enc/**.c" }
links "brotli_common" links "brotli_common"
project "brotli_enc_static" project "brotli_enc_static"
kind "StaticLib" kind "StaticLib"
targetname "brotli_enc" targetname "brotli_enc"
language "C" language "C"
files { "enc/**.h", "enc/**.c", "public/**.h" } files { "enc/**.h", "enc/**.c" }
links "brotli_common_static" links "brotli_common_static"
project "bro" project "bro"

View File

@ -4,8 +4,8 @@
#include <cstdio> #include <cstdio>
#include <vector> #include <vector>
#include "../common/version.h" #include "../common/version.h"
#include "../public/encode.h" #include <brotli/decode.h>
#include "../public/decode.h" #include <brotli/encode.h>
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
#define PyInt_Check PyLong_Check #define PyInt_Check PyLong_Check

View File

@ -192,9 +192,9 @@ brotli = Extension("brotli",
"enc/static_dict_lut.h", "enc/static_dict_lut.h",
"enc/utf8_util.h", "enc/utf8_util.h",
"enc/write_bits.h", "enc/write_bits.h",
"public/decode.h", "include/brotli/decode.h",
"public/encode.h", "include/brotli/encode.h",
"public/types.h", "include/brotli/types.h",
], ],
language="c++", language="c++",
) )

View File

@ -14,8 +14,8 @@
#include <sys/types.h> #include <sys/types.h>
#include <time.h> #include <time.h>
#include "../public/decode.h" #include <brotli/decode.h>
#include "../public/encode.h" #include <brotli/encode.h>
#if !defined(_WIN32) #if !defined(_WIN32)
#include <unistd.h> #include <unistd.h>