In macOS, /usr/bin and /usr/share/man belong to root:wheel so install to /usr/local/bin and /usr/local/share/man instead. Signed-off-by: Joe van Tunen <joevt@xxxxxxx> --- Makefile | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 287b72d..adf6123 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,23 @@ -bindir ?= /usr/bin -mandir ?= /usr/share/man +ifeq ($(OS),Windows_NT) + bindir ?= /usr/bin + mandir ?= /usr/share/man +else + UNAME_S := $(shell uname -s) + ifeq ($(UNAME_S),Darwin) + bindir ?= /usr/local/sbin + mandir ?= /usr/local/share/man + else + bindir ?= /usr/bin + mandir ?= /usr/share/man + endif +endif EMXX ?= em++ -SOURCES = edid-decode.cpp parse-base-block.cpp parse-cta-block.cpp \ - parse-displayid-block.cpp parse-ls-ext-block.cpp \ - parse-di-ext-block.cpp parse-vtb-ext-block.cpp calc-gtf-cvt.cpp +SOURCES = \ + edid-decode.cpp parse-base-block.cpp parse-cta-block.cpp \ + parse-displayid-block.cpp parse-ls-ext-block.cpp \ + parse-di-ext-block.cpp parse-vtb-ext-block.cpp calc-gtf-cvt.cpp WARN_FLAGS = -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter all: edid-decode -- 2.24.3 (Apple Git-128)