Fixed installation on MacOs (#81)

This commit is contained in:
TheDarkBug 2021-06-07 00:34:07 +02:00
parent ee077ce0c8
commit a518735cb8

View file

@ -2,7 +2,13 @@ NAME = uwufetch
FILES = uwufetch.c FILES = uwufetch.c
CFLAGS = -O3 CFLAGS = -O3
CFLAGS_DEBUG = -Wall -Wextra CFLAGS_DEBUG = -Wall -Wextra
ifeq ($(shell uname), Linux)
PREFIX = /usr/bin PREFIX = /usr/bin
LIBDIR = /usr/lib
else ifeq ($(shell uname), Darwin)
PREFIX = /usr/local/bin
LIBDIR = /usr/local/lib
endif
CC = cc CC = cc
MAN_COMPILER = pandoc MAN_COMPILER = pandoc
@ -16,13 +22,13 @@ debug:
install: build man install: build man
cp $(NAME) $(DESTDIR)$(PREFIX)/$(NAME) cp $(NAME) $(DESTDIR)$(PREFIX)/$(NAME)
ls $(DESTDIR)/usr/lib/uwufetch/ 2> /dev/null || mkdir $(DESTDIR)/usr/lib/uwufetch/ ls $(DESTDIR)/$(LIBDIR)/ 2> /dev/null || mkdir $(DESTDIR)/$(LIBDIR)/
cp res/* $(DESTDIR)/usr/lib/uwufetch/ cp res/* $(DESTDIR)/$(LIBDIR)/
cp ./$(NAME).1.gz $(DESTDIR)/usr/share/man/man1/ cp ./$(NAME).1.gz $(DESTDIR)/usr/share/man/man1/
uninstall: uninstall:
rm -f $(DESTDIR)$(PREFIX)/$(NAME) 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 rm -rf $(DESTDIR)/usr/share/man/man1/$(NAME).1.gz
termux: build termux: build