Added : $(EXT) within install for cross-compilation support
authorYann Collet <yann.collet.73@gmail.com>
Sun, 23 Nov 2014 17:36:04 +0000 (18:36 +0100)
committerYann Collet <yann.collet.73@gmail.com>
Sun, 23 Nov 2014 17:36:04 +0000 (18:36 +0100)
Makefile
lz4.c
programs/Makefile

index 586ac5e..c2bbd57 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,7 @@
 # ################################################################
 
 # Version numbers
-VERSION=124
+VERSION=125
 export RELEASE=r$(VERSION)
 LIBVER_MAJOR=`sed -n '/define LZ4_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lz4.h`
 LIBVER_MINOR=`sed -n '/define LZ4_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lz4.h`
@@ -50,13 +50,6 @@ PRGDIR = programs
 DISTRIBNAME=lz4-$(RELEASE).tar.gz
 
 
-# Define *.exe as extension for Windows systems
-ifneq (,$(filter Windows%,$(OS)))
-EXT =.exe
-else
-EXT =
-endif
-
 # OS X linker doesn't support -soname, and use different extension
 # see : https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html
 ifeq ($(shell uname), Darwin)
diff --git a/lz4.c b/lz4.c
index 7e454fd..8e81cc2 100644 (file)
--- a/lz4.c
+++ b/lz4.c
 
 /*
  * CPU_HAS_EFFICIENT_UNALIGNED_MEMORY_ACCESS :
- * You can force the code to use unaligned memory access if you know your CPU can handle it efficiently.
+ * You can force the code to use unaligned memory access, should you know your CPU can handle it efficiently.
+ * If it effectively results in better speed (up to 50% improvement can be expected)
+ * please report your configuration to upstream (https://groups.google.com/forum/#!forum/lz4c)
+ * so that an automatic detection macro can be added to mainline.
  */
 /* #define CPU_HAS_EFFICIENT_UNALIGNED_MEMORY_ACCESS 1 */
 
index 1d7e17f..fcfb32c 100644 (file)
@@ -30,7 +30,7 @@
 # fullbench32: Same as fullbench, but forced to compile in 32-bits mode
 # ##########################################################################
 
-RELEASE=r124
+RELEASE=r125
 
 DESTDIR?=
 PREFIX ?= /usr
@@ -113,9 +113,9 @@ ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU))
 install: lz4 lz4c
        @echo Installing binaries
        @install -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MANDIR)/
-       @install -m 755 lz4   $(DESTDIR)$(BINDIR)/lz4
-       @ln -sf lz4 $(DESTDIR)$(BINDIR)/lz4cat
-       @install -m 755 lz4c  $(DESTDIR)$(BINDIR)/lz4c
+       @install -m 755 lz4$(EXT) $(DESTDIR)$(BINDIR)/lz4$(EXT)
+       @ln -sf lz4$(EXT) $(DESTDIR)$(BINDIR)/lz4cat
+       @install -m 755 lz4c$(EXT) $(DESTDIR)$(BINDIR)/lz4c$(EXT)
        @echo Installing man pages
        @install -m 644 lz4.1 $(DESTDIR)$(MANDIR)/lz4.1
        @install -m 644 lz4c.1 $(DESTDIR)$(MANDIR)/lz4c.1
@@ -124,12 +124,12 @@ install: lz4 lz4c
 
 uninstall:
        rm -f $(DESTDIR)$(BINDIR)/lz4cat
-       [ -x $(DESTDIR)$(BINDIR)/lz4 ] && rm -f $(DESTDIR)$(BINDIR)/lz4
-       [ -x $(DESTDIR)$(BINDIR)/lz4c ] && rm -f $(DESTDIR)$(BINDIR)/lz4c
+       [ -x $(DESTDIR)$(BINDIR)/lz4$(EXT) ] && rm -f $(DESTDIR)$(BINDIR)/lz4$(EXT)
+       [ -x $(DESTDIR)$(BINDIR)/lz4c$(EXT) ] && rm -f $(DESTDIR)$(BINDIR)/lz4c$(EXT)
        [ -f $(DESTDIR)$(MANDIR)/lz4.1 ] && rm -f $(DESTDIR)$(MANDIR)/lz4.1
        [ -f $(DESTDIR)$(MANDIR)/lz4c.1 ] && rm -f $(DESTDIR)$(MANDIR)/lz4c.1
        [ -f $(DESTDIR)$(MANDIR)/lz4cat.1 ] && rm -f $(DESTDIR)$(MANDIR)/lz4cat.1
-       @echo lz4 successfully uninstalled
+       @echo lz4 programs successfully uninstalled
 
 test: test-lz4 test-lz4c test-frametest test-fullbench test-fuzzer test-mem