From a518735cb808707b8ff15f5ec26794cc2e0c7e8f Mon Sep 17 00:00:00 2001 From: TheDarkBug Date: Mon, 7 Jun 2021 00:34:07 +0200 Subject: [PATCH] Fixed installation on MacOs (#81) --- Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 48f5d0c..914216f 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,13 @@ NAME = uwufetch FILES = uwufetch.c CFLAGS = -O3 CFLAGS_DEBUG = -Wall -Wextra -PREFIX = /usr/bin +ifeq ($(shell uname), Linux) + PREFIX = /usr/bin + LIBDIR = /usr/lib +else ifeq ($(shell uname), Darwin) + PREFIX = /usr/local/bin + LIBDIR = /usr/local/lib +endif CC = cc MAN_COMPILER = pandoc @@ -16,13 +22,13 @@ debug: install: build man cp $(NAME) $(DESTDIR)$(PREFIX)/$(NAME) - ls $(DESTDIR)/usr/lib/uwufetch/ 2> /dev/null || mkdir $(DESTDIR)/usr/lib/uwufetch/ - cp res/* $(DESTDIR)/usr/lib/uwufetch/ + ls $(DESTDIR)/$(LIBDIR)/ 2> /dev/null || mkdir $(DESTDIR)/$(LIBDIR)/ + cp res/* $(DESTDIR)/$(LIBDIR)/ cp ./$(NAME).1.gz $(DESTDIR)/usr/share/man/man1/ uninstall: rm -f $(DESTDIR)$(PREFIX)/$(NAME) - rm -rf $(DESTDIR)/usr/lib/uwufetch/ + rm -rf $(DESTDIR)/$(LIBDIR)/ rm -rf $(DESTDIR)/usr/share/man/man1/$(NAME).1.gz termux: build