mirror of
https://github.com/facebook/zstd.git
synced 2024-12-15 19:50:10 +08:00
update library builder
This commit is contained in:
parent
b2549846ba
commit
dcac00e7a6
13
lib/Makefile
13
lib/Makefile
@ -27,8 +27,8 @@
|
|||||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
# You can contact the author at :
|
# You can contact the author at :
|
||||||
|
# - ZSTD homepage : http://www.zstd.net
|
||||||
# - ZSTD source repository : https://github.com/Cyan4973/zstd
|
# - ZSTD source repository : https://github.com/Cyan4973/zstd
|
||||||
# - Public forum : https://groups.google.com/forum/#!forum/lz4c
|
|
||||||
# ################################################################
|
# ################################################################
|
||||||
|
|
||||||
# Version numbers
|
# Version numbers
|
||||||
@ -63,14 +63,17 @@ else
|
|||||||
SHARED_EXT_VER = $(SHARED_EXT).$(LIBVER)
|
SHARED_EXT_VER = $(SHARED_EXT).$(LIBVER)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
default: libzstd
|
|
||||||
|
|
||||||
all: libzstd
|
.PHONY: default all clean install uninstall
|
||||||
|
|
||||||
libzstd: zstd_compress.c zstd_decompress.c huff0.c fse.c
|
default: clean libzstd
|
||||||
|
|
||||||
|
all: clean libzstd
|
||||||
|
|
||||||
|
libzstd: zstd_compress.c zstd_decompress.c huff0.c fse.c legacy/zstd_v01.c legacy/zstd_v02.c
|
||||||
@echo compiling static library
|
@echo compiling static library
|
||||||
@$(CC) $(FLAGS) -c $^
|
@$(CC) $(FLAGS) -c $^
|
||||||
@$(AR) rcs libzstd.a zstd_compress.o zstd_decompress.o huff0.o fse.o
|
@$(AR) rcs libzstd.a *.o
|
||||||
@echo compiling dynamic library $(LIBVER)
|
@echo compiling dynamic library $(LIBVER)
|
||||||
@$(CC) $(FLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER)
|
@$(CC) $(FLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER)
|
||||||
@echo creating versioned links
|
@echo creating versioned links
|
||||||
|
@ -35,9 +35,8 @@
|
|||||||
*****************************************************************/
|
*****************************************************************/
|
||||||
/*!
|
/*!
|
||||||
* HEAPMODE :
|
* HEAPMODE :
|
||||||
* Select how default compression functions will allocate memory for their hash table,
|
* Select how default functions will allocate memory for their context,
|
||||||
* in memory stack (0, fastest), or in memory heap (1, requires malloc())
|
* in memory stack (0, fastest), or in memory heap (1, requires malloc())
|
||||||
* Note that compression context is fairly large, as a consequence heap memory is recommended.
|
|
||||||
*/
|
*/
|
||||||
#ifndef ZSTD_HEAPMODE
|
#ifndef ZSTD_HEAPMODE
|
||||||
# define ZSTD_HEAPMODE 1
|
# define ZSTD_HEAPMODE 1
|
||||||
@ -393,6 +392,10 @@ typedef struct {
|
|||||||
} seqState_t;
|
} seqState_t;
|
||||||
|
|
||||||
|
|
||||||
|
/** ZSTD_decodeSequence
|
||||||
|
* Decode the next sequence, defined as nbLiterals, PtrToLiterals, nbMatches, Offset
|
||||||
|
* @seq : store sequence into this seq_t
|
||||||
|
*/
|
||||||
static void ZSTD_decodeSequence(seq_t* seq, seqState_t* seqState)
|
static void ZSTD_decodeSequence(seq_t* seq, seqState_t* seqState)
|
||||||
{
|
{
|
||||||
size_t litLength;
|
size_t litLength;
|
||||||
|
Loading…
Reference in New Issue
Block a user