minor Makefile fixes

This commit is contained in:
Yann Collet 2017-09-06 17:41:44 -07:00
parent 1ad9a36cfb
commit ee5332438b
2 changed files with 10 additions and 9 deletions

View File

@ -117,7 +117,8 @@ clean:
ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS)) ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS))
DESTDIR ?= 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 # support both lower and uppercase (BSD), use uppercase in script
prefix ?= /usr/local prefix ?= /usr/local
PREFIX ?= $(prefix) PREFIX ?= $(prefix)

View File

@ -42,7 +42,6 @@ LIBVER_PATCH := $(shell echo $(LIBVER_PATCH_SCRIPT))
LIBVER := $(shell echo $(LIBVER_SCRIPT)) LIBVER := $(shell echo $(LIBVER_SCRIPT))
SRCFILES := $(sort $(wildcard $(LZ4DIR)/*.c) $(wildcard *.c)) SRCFILES := $(sort $(wildcard $(LZ4DIR)/*.c) $(wildcard *.c))
#OBJFILES := $(patsubst %.c,%.o,$(SRCFILES))
OBJFILES := $(SRCFILES:.c=.o) OBJFILES := $(SRCFILES:.c=.o)
CPPFLAGS += -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_ CPPFLAGS += -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_
@ -118,14 +117,9 @@ unlz4: lz4
lz4cat: lz4 lz4cat: lz4
ln -s lz4 lz4cat ln -s lz4 lz4cat
ifneq (,$(filter $(shell uname),SunOS))
INSTALL ?= ginstall
else
INSTALL ?= install
endif
DESTDIR ?= 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 # support both lower and uppercase (BSD), use uppercase in script
prefix ?= /usr/local prefix ?= /usr/local
PREFIX ?= $(prefix) PREFIX ?= $(prefix)
@ -142,6 +136,12 @@ else
MANDIR ?= $(man1dir) MANDIR ?= $(man1dir)
endif endif
ifneq (,$(filter $(shell uname),SunOS))
INSTALL ?= ginstall
else
INSTALL ?= install
endif
INSTALL_PROGRAM ?= $(INSTALL) -m 755 INSTALL_PROGRAM ?= $(INSTALL) -m 755
INSTALL_DATA ?= $(INSTALL) -m 644 INSTALL_DATA ?= $(INSTALL) -m 644