2021-04-06 14:43:34 +02:00
|
|
|
NAME = uwufetch
|
|
|
|
FILES = uwufetch.c
|
2021-04-14 18:19:17 +02:00
|
|
|
CFLAGS = -O3
|
2021-07-21 22:45:16 +02:00
|
|
|
CFLAGS_DEBUG = -Wall -Wextra -g -pthread
|
2021-06-07 00:34:07 +02:00
|
|
|
ifeq ($(shell uname), Linux)
|
|
|
|
PREFIX = /usr/bin
|
|
|
|
LIBDIR = /usr/lib
|
2021-06-07 00:37:35 +02:00
|
|
|
MANDIR = /usr/share/man/man1
|
2021-06-07 00:34:07 +02:00
|
|
|
else ifeq ($(shell uname), Darwin)
|
|
|
|
PREFIX = /usr/local/bin
|
|
|
|
LIBDIR = /usr/local/lib
|
2021-06-07 00:37:35 +02:00
|
|
|
MANDIR = /usr/local/share/man/man1
|
2021-07-24 12:56:18 +02:00
|
|
|
else ifeq ($(shell uname), FreeBSD)
|
|
|
|
CFLAGS += -D__FREEBSD__
|
|
|
|
CFLAGS_DEBUG += -D__FREEBSD__
|
|
|
|
PREFIX = /usr/bin
|
|
|
|
LIBDIR = /usr/lib
|
|
|
|
MANDIR = /usr/share/man/man1
|
2021-06-07 00:34:07 +02:00
|
|
|
endif
|
2021-07-21 22:36:10 +02:00
|
|
|
|
2021-08-27 20:30:54 +02:00
|
|
|
CC = cc
|
2021-01-18 21:19:20 +01:00
|
|
|
|
2021-07-21 22:36:10 +02:00
|
|
|
|
2021-04-06 14:43:34 +02:00
|
|
|
build: $(FILES)
|
2021-04-23 18:02:05 +02:00
|
|
|
$(CC) $(CFLAGS) -o $(NAME) $(FILES)
|
2021-01-18 21:19:20 +01:00
|
|
|
|
2021-03-11 22:39:16 +01:00
|
|
|
debug:
|
2021-03-17 10:38:48 +01:00
|
|
|
@clear
|
2021-04-23 18:02:05 +02:00
|
|
|
$(CC) $(CFLAGS_DEBUG) -o $(NAME) $(FILES)
|
2021-04-14 12:33:05 +02:00
|
|
|
./uwufetch
|
2021-03-07 22:04:05 +01:00
|
|
|
|
2021-07-04 17:35:19 +02:00
|
|
|
install: build
|
2021-04-08 04:06:36 +02:00
|
|
|
cp $(NAME) $(DESTDIR)$(PREFIX)/$(NAME)
|
2021-06-13 13:52:32 +02:00
|
|
|
ls $(DESTDIR)$(LIBDIR)/uwufetch > /dev/null || mkdir $(DESTDIR)$(LIBDIR)/uwufetch
|
2021-07-23 00:32:09 +02:00
|
|
|
cp -r res/* $(DESTDIR)$(LIBDIR)/uwufetch
|
2021-06-07 00:37:35 +02:00
|
|
|
cp ./$(NAME).1.gz $(DESTDIR)$(MANDIR)/
|
2021-03-05 12:03:09 +01:00
|
|
|
|
|
|
|
uninstall:
|
2021-04-08 04:06:36 +02:00
|
|
|
rm -f $(DESTDIR)$(PREFIX)/$(NAME)
|
2021-06-13 13:52:32 +02:00
|
|
|
rm -rf $(DESTDIR)$(LIBDIR)/uwufetch
|
|
|
|
rm -f $(DESTDIR)$(MANDIR)/$(NAME).1.gz
|
2021-03-07 00:19:03 +01:00
|
|
|
|
2021-03-07 22:04:05 +01:00
|
|
|
termux: build
|
2021-04-08 04:06:36 +02:00
|
|
|
cp $(NAME) $(DESTDIR)/data/data/com.termux/files$(PREFIX)/$(NAME)
|
2021-04-06 14:43:34 +02:00
|
|
|
ls $(DESTDIR)/data/data/com.termux/files/usr/lib/uwufetch/ > /dev/null || mkdir $(DESTDIR)/data/data/com.termux/files/usr/lib/uwufetch/
|
2021-08-26 14:58:46 +02:00
|
|
|
cp -r res/* /data/data/com.termux/files/usr/lib/uwufetch/
|
2021-04-06 14:43:34 +02:00
|
|
|
|
2021-03-07 22:04:05 +01:00
|
|
|
termux_uninstall:
|
2021-04-08 04:06:36 +02:00
|
|
|
rm -rf $(DESTDIR)/data/data/com.termux/files$(PREFIX)/$(NAME)
|
2021-04-06 14:43:34 +02:00
|
|
|
rm -rf $(DESTDIR)/data/data/com.termux/files/usr/lib/uwufetch/
|
2021-04-12 13:16:45 +02:00
|
|
|
|
2021-04-23 18:02:05 +02:00
|
|
|
man:
|
2021-08-27 20:30:54 +02:00
|
|
|
gzip --keep $(NAME).1
|
2021-04-23 18:02:05 +02:00
|
|
|
|
2021-04-18 23:51:32 +02:00
|
|
|
man_debug:
|
2021-04-12 13:16:45 +02:00
|
|
|
@clear
|
2021-08-27 20:30:54 +02:00
|
|
|
man -P cat ./uwufetch.1
|