diff --git a/Makefile b/Makefile index 2e3cd14..7d31a0c 100644 --- a/Makefile +++ b/Makefile @@ -1,23 +1,24 @@ -NAME = uwufetch -FILES = uwufetch.c -CFLAGS = -O3 -CFLAGS_DEBUG = -Wall -Wextra -g -pthread -CC = cc +NAME = uwufetch +FILES = uwufetch.c +CFLAGS = -O3 +CFLAGS_DEBUG = -Wall -Wextra -g -pthread +CC = cc +DESTDIR = /usr ifeq ($(shell uname), Linux) - PREFIX = /usr/bin - LIBDIR = /usr/lib - MANDIR = /usr/share/man/man1 + PREFIX = bin + LIBDIR = lib + MANDIR = share/man/man1 else ifeq ($(shell uname), Darwin) - PREFIX = /usr/local/bin - LIBDIR = /usr/local/lib - MANDIR = /usr/local/share/man/man1 + PREFIX = local/bin + LIBDIR = local/lib + MANDIR = local/share/man/man1 else ifeq ($(shell uname), FreeBSD) CFLAGS += -D__FREEBSD__ CFLAGS_DEBUG += -D__FREEBSD__ - PREFIX = /usr/bin - LIBDIR = /usr/lib - MANDIR = /usr/share/man/man1 + PREFIX = bin + LIBDIR = lib + MANDIR = share/man/man1 else ifeq ($(shell uname), windows32) CC = gcc PREFIX = "C:\Program Files" @@ -33,15 +34,15 @@ debug: ./$(NAME) install: - mkdir -p $(DESTDIR)$(PREFIX) $(DESTDIR)$(LIBDIR)/uwufetch $(DESTDIR)$(MANDIR) - cp $(NAME) $(DESTDIR)$(PREFIX)/$(NAME) - cp -r res/* $(DESTDIR)$(LIBDIR)/uwufetch - cp ./$(NAME).1.gz $(DESTDIR)$(MANDIR)/ + mkdir -p $(DESTDIR)/$(PREFIX) $(DESTDIR)/$(LIBDIR)/uwufetch $(DESTDIR)/$(MANDIR) + cp $(NAME) $(DESTDIR)/$(PREFIX)/$(NAME) + cp -r res/* $(DESTDIR)/$(LIBDIR)/uwufetch + cp ./$(NAME).1.gz $(DESTDIR)/$(MANDIR)/ uninstall: - rm -f $(DESTDIR)$(PREFIX)/$(NAME) - rm -rf $(DESTDIR)$(LIBDIR)/uwufetch - rm -f $(DESTDIR)$(MANDIR)/$(NAME).1.gz + rm -f $(DESTDIR)/$(PREFIX)/$(NAME) + rm -rf $(DESTDIR)/$(LIBDIR)/uwufetch + rm -f $(DESTDIR)/$(MANDIR)/$(NAME).1.gz termux: build cp $(NAME) $(DESTDIR)/data/data/com.termux/files$(PREFIX)/$(NAME)