From 10d6c0f001a50a455dcbf22757509f3510dac61b Mon Sep 17 00:00:00 2001 From: Frederic Guilbault <2@0464.ca> Date: Mon, 12 Oct 2020 18:23:02 -0400 Subject: [PATCH 1/2] fix default prefix location for linux. Under linux every binary that are not provided by a package manager should be under a local/ folder. Default value should expect manual build As each Distro have it's own package builder that will launch the makefile from their own build procedure. it's in their role to define the prefix used in their respective distro. --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index becccc6..138f465 100644 --- a/Makefile +++ b/Makefile @@ -7,18 +7,17 @@ else BASE_VERSION := $(shell cat base_version) endif ifeq ($(OS),Linux) -PREFIX?=/usr MANDIR?=$(PREFIX)/share/man LDLIBS?=-pthread -lutil INSTGROUP?=root else -PREFIX?=/usr/local MANDIR?=$(PREFIX)/man INSTGROUP?=wheel ifneq ($(OS),Darwin) LDLIBS?=-lpthread -lutil endif endif +PREFIX?=/usr/local DESTDIR?= "" BINDIR?=$(PREFIX)/bin SHAREDIR=$(PREFIX)/share/kplex From 243d0d20bfc0a0da67c15bdcdb511957f089de5c Mon Sep 17 00:00:00 2001 From: Frederic Guilbault <2@0464.ca> Date: Mon, 12 Oct 2020 20:13:35 -0400 Subject: [PATCH 2/2] Refactor previous commit: Define PREFIX earlier. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 138f465..ef80342 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ OS=$(shell uname -s) +PREFIX?=/usr/local ifneq ("$(wildcard .git)","") CFLAGS?=-g -Wall VERSION := $(shell git describe --dirty --tags | sed 's/^v//') @@ -17,7 +18,7 @@ ifneq ($(OS),Darwin) LDLIBS?=-lpthread -lutil endif endif -PREFIX?=/usr/local + DESTDIR?= "" BINDIR?=$(PREFIX)/bin SHAREDIR=$(PREFIX)/share/kplex