diff options
author | Przemyslaw Skibinski <inikep@gmail.com> | 2016-12-06 12:44:42 (GMT) |
---|---|---|
committer | Przemyslaw Skibinski <inikep@gmail.com> | 2016-12-06 12:44:42 (GMT) |
commit | 5ae0e789fc185dc760d05f17493f85386b515556 (patch) | |
tree | 6035003c4b7e089f730047212046292a704bd14b /lib | |
parent | de0cf5de640eb56775f44c0f4c7c7a065e00447c (diff) | |
parent | 5eb547a6080b8e63b5e522b448e31052fbc6b927 (diff) | |
download | lz4-5ae0e789fc185dc760d05f17493f85386b515556.zip lz4-5ae0e789fc185dc760d05f17493f85386b515556.tar.gz lz4-5ae0e789fc185dc760d05f17493f85386b515556.tar.bz2 |
Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile | 43 | ||||
-rw-r--r-- | lib/lz4.c | 1 | ||||
-rw-r--r-- | lib/lz4.h | 2 |
3 files changed, 24 insertions, 22 deletions
diff --git a/lib/Makefile b/lib/Makefile index 28242cc..2b47fb0 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -38,22 +38,23 @@ LIBVER_SCRIPT:= $(LIBVER_MAJOR_SCRIPT).$(LIBVER_MINOR_SCRIPT).$(LIBVER_PATCH_SCR LIBVER_MAJOR := $(shell echo $(LIBVER_MAJOR_SCRIPT)) LIBVER_MINOR := $(shell echo $(LIBVER_MINOR_SCRIPT)) LIBVER_PATCH := $(shell echo $(LIBVER_PATCH_SCRIPT)) -LIBVER := $(shell echo $(LIBVER_SCRIPT)) +LIBVER := $(shell echo $(LIBVER_SCRIPT)) BUILD_STATIC:= yes -DESTDIR?= -PREFIX ?= /usr/local -CPPFLAGS= -DXXH_NAMESPACE=LZ4_ -CFLAGS ?= -O3 -CFLAGS += -g -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ - -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef \ - -Wpointer-arith -Wstrict-aliasing=1 +DESTDIR ?= +PREFIX ?= /usr/local +LIBDIR ?= $(PREFIX)/lib +INCLUDEDIR=$(PREFIX)/include + +CPPFLAGS+= -DXXH_NAMESPACE=LZ4_ +CFLAGS ?= -O3 +DEBUGFLAGS:=-g -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ + -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef \ + -Wpointer-arith -Wstrict-aliasing=1 CFLAGS += $(MOREFLAGS) -FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) +FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -LIBDIR?= $(PREFIX)/lib -INCLUDEDIR=$(PREFIX)/include # OS X linker doesn't support -soname, and use different extension @@ -72,20 +73,20 @@ endif default: lib-release +lib-release: liblz4.a liblz4 + +lib: CFLAGS += $(DEBUGFLAGS) +lib: lib-release + all: lib all32: CFLAGS+=-m32 all32: all -lib: liblz4.a liblz4 - -lib-release: CFLAGS := -O3 -lib-release: lib - liblz4.a: *.c ifeq ($(BUILD_STATIC),yes) @echo compiling static library - @$(CC) $(FLAGS) -c $^ + @$(CC) $(CPPFLAGS) $(CFLAGS) -c $^ @$(AR) rcs $@ *.o endif @@ -114,10 +115,10 @@ ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU FreeBSD)) liblz4.pc: liblz4.pc.in Makefile @echo creating pkgconfig @sed -e 's|@PREFIX@|$(PREFIX)|' \ - -e 's|@LIBDIR@|$(LIBDIR)|' \ - -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \ - -e 's|@VERSION@|$(LIBVER)|' \ - $< >$@ + -e 's|@LIBDIR@|$(LIBDIR)|' \ + -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \ + -e 's|@VERSION@|$(LIBVER)|' \ + $< >$@ install: lib liblz4.pc @install -d -m 755 $(DESTDIR)$(LIBDIR)/pkgconfig/ $(DESTDIR)$(INCLUDEDIR)/ @@ -391,6 +391,7 @@ typedef enum { full = 0, partial = 1 } earlyEnd_directive; * Local Utils **************************************/ int LZ4_versionNumber (void) { return LZ4_VERSION_NUMBER; } +const char* LZ4_versionString(void) { return LZ4_VERSION_STRING; } int LZ4_compressBound(int isize) { return LZ4_COMPRESSBOUND(isize); } int LZ4_sizeofState() { return LZ4_STREAMSIZE; } @@ -85,7 +85,7 @@ extern "C" { /*========== Version =========== */ #define LZ4_VERSION_MAJOR 1 /* for breaking interface changes */ #define LZ4_VERSION_MINOR 7 /* for new (non-breaking) interface capabilities */ -#define LZ4_VERSION_RELEASE 4 /* for tweaks, bug-fixes, or development */ +#define LZ4_VERSION_RELEASE 5 /* for tweaks, bug-fixes, or development */ #define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE) |