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(
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(

View File

@ -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

View File

@ -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)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,7 +16,7 @@
#ifndef 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 "./context.h"
#include "./entropy_encode.h"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 <brotli/types.h>
#include "./memory.h"
#include "./port.h"

View File

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

View File

@ -9,7 +9,7 @@
#ifndef 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)
extern "C" {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
#ifndef 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_TWO_PASS_COMPRESSION_QUALITY 1

View File

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

View File

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

View File

@ -9,7 +9,7 @@
#ifndef 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)
extern "C" {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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"

View File

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

View File

@ -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++",
)

View File

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