diff options
-rw-r--r-- | lib/Makefile | 17 | ||||
-rw-r--r-- | programs/Makefile | 17 |
2 files changed, 22 insertions, 12 deletions
diff --git a/lib/Makefile b/lib/Makefile index f9fad29..13d0482 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -108,15 +108,20 @@ clean: ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS)) ifneq (,$(filter $(shell uname),SunOS)) -PREFIX ?= /usr INSTALL ?= ginstall else -PREFIX ?= /usr/local INSTALL ?= install endif -DESTDIR ?= -LIBDIR ?= $(PREFIX)/lib -INCLUDEDIR=$(PREFIX)/include + +ifneq (,$(filter $(shell uname),OpenBSD FreeBSD NetBSD DragonFly SunOS)) +PREFIX ?= /usr +else +PREFIX ?= /usr/local +endif + +DESTDIR ?= +LIBDIR ?= $(PREFIX)/lib +INCLUDEDIR ?= $(PREFIX)/include ifneq (,$(filter $(shell uname),OpenBSD FreeBSD NetBSD DragonFly)) PKGCONFIGDIR ?= $(PREFIX)/libdata/pkgconfig @@ -124,7 +129,7 @@ else PKGCONFIGDIR ?= $(LIBDIR)/pkgconfig endif -INSTALL_LIB ?= $(INSTALL) -m 755 +INSTALL_LIB ?= $(INSTALL) -m 755 INSTALL_DATA ?= $(INSTALL) -m 644 liblz4.pc: liblz4.pc.in Makefile diff --git a/programs/Makefile b/programs/Makefile index f91a326..14b042a 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -116,19 +116,24 @@ lz4cat: lz4 ifneq (,$(filter $(shell uname),SunOS)) -PREFIX ?= /usr INSTALL ?= ginstall else -PREFIX ?= /usr/local INSTALL ?= install endif + +ifneq (,$(filter $(shell uname),OpenBSD FreeBSD NetBSD DragonFly SunOS)) +PREFIX ?= /usr +else +PREFIX ?= /usr/local +endif + DESTDIR ?= -BINDIR = $(PREFIX)/bin -MANDIR = $(PREFIX)/share/man/man1 +BINDIR ?= $(PREFIX)/bin +MANDIR ?= $(PREFIX)/share/man/man1 INSTALL_PROGRAM ?= $(INSTALL) -m 755 -INSTALL_SCRIPT ?= $(INSTALL) -m 755 -INSTALL_MAN ?= $(INSTALL) -m 644 +INSTALL_SCRIPT ?= $(INSTALL) -m 755 +INSTALL_MAN ?= $(INSTALL) -m 644 install: lz4$(EXT) lz4c$(EXT) |