summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2017-09-07 00:41:44 (GMT)
committerYann Collet <cyan@fb.com>2017-09-07 00:41:44 (GMT)
commitee5332438b9a4c65147003334bcdbb9915930603 (patch)
treea5a9d83953134e2f5e3d9b3baf0e3c8b250af249
parent1ad9a36cfb9fc669b0b18bfcd902d3e52a3d2cbb (diff)
downloadlz4-ee5332438b9a4c65147003334bcdbb9915930603.zip
lz4-ee5332438b9a4c65147003334bcdbb9915930603.tar.gz
lz4-ee5332438b9a4c65147003334bcdbb9915930603.tar.bz2
minor Makefile fixes
-rw-r--r--lib/Makefile3
-rw-r--r--programs/Makefile16
2 files changed, 10 insertions, 9 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 5907aac..dd33f50 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -117,7 +117,8 @@ clean:
ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS))
DESTDIR ?=
-# directory variables : GNU convention prefers lowercase
+# directory variables : GNU conventions prefer lowercase
+# see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html
# support both lower and uppercase (BSD), use uppercase in script
prefix ?= /usr/local
PREFIX ?= $(prefix)
diff --git a/programs/Makefile b/programs/Makefile
index a551b01..ed1a779 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -42,7 +42,6 @@ LIBVER_PATCH := $(shell echo $(LIBVER_PATCH_SCRIPT))
LIBVER := $(shell echo $(LIBVER_SCRIPT))
SRCFILES := $(sort $(wildcard $(LZ4DIR)/*.c) $(wildcard *.c))
-#OBJFILES := $(patsubst %.c,%.o,$(SRCFILES))
OBJFILES := $(SRCFILES:.c=.o)
CPPFLAGS += -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_
@@ -118,14 +117,9 @@ unlz4: lz4
lz4cat: lz4
ln -s lz4 lz4cat
-ifneq (,$(filter $(shell uname),SunOS))
-INSTALL ?= ginstall
-else
-INSTALL ?= install
-endif
-
DESTDIR ?=
-# directory variables : GNU convention prefers lowercase
+# directory variables : GNU conventions prefer lowercase
+# see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html
# support both lower and uppercase (BSD), use uppercase in script
prefix ?= /usr/local
PREFIX ?= $(prefix)
@@ -142,6 +136,12 @@ else
MANDIR ?= $(man1dir)
endif
+ifneq (,$(filter $(shell uname),SunOS))
+INSTALL ?= ginstall
+else
+INSTALL ?= install
+endif
+
INSTALL_PROGRAM ?= $(INSTALL) -m 755
INSTALL_DATA ?= $(INSTALL) -m 644