neowofetch/Makefile

51 lines
1.3 KiB
Makefile
Raw Normal View History

NAME = uwufetch
FILES = uwufetch.c
2021-04-14 18:19:17 +02:00
CFLAGS = -O3
CFLAGS_DEBUG = -Wall -Wextra
2021-06-07 00:34:07 +02:00
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
2021-04-12 13:16:45 +02:00
MAN_COMPILER = pandoc
2021-01-18 21:19:20 +01:00
build: $(FILES)
$(CC) $(CFLAGS) -o $(NAME) $(FILES)
2021-01-18 21:19:20 +01:00
debug:
@clear
$(CC) $(CFLAGS_DEBUG) -o $(NAME) $(FILES)
./uwufetch
install: build man
2021-04-08 04:06:36 +02:00
cp $(NAME) $(DESTDIR)$(PREFIX)/$(NAME)
2021-06-07 00:34:07 +02:00
ls $(DESTDIR)/$(LIBDIR)/ 2> /dev/null || mkdir $(DESTDIR)/$(LIBDIR)/
cp res/* $(DESTDIR)/$(LIBDIR)/
2021-04-12 13:16:45 +02:00
cp ./$(NAME).1.gz $(DESTDIR)/usr/share/man/man1/
uninstall:
2021-04-08 04:06:36 +02:00
rm -f $(DESTDIR)$(PREFIX)/$(NAME)
2021-06-07 00:34:07 +02:00
rm -rf $(DESTDIR)/$(LIBDIR)/
2021-04-12 13:16:45 +02:00
rm -rf $(DESTDIR)/usr/share/man/man1/$(NAME).1.gz
termux: build
2021-04-08 04:06:36 +02:00
cp $(NAME) $(DESTDIR)/data/data/com.termux/files$(PREFIX)/$(NAME)
ls $(DESTDIR)/data/data/com.termux/files/usr/lib/uwufetch/ > /dev/null || mkdir $(DESTDIR)/data/data/com.termux/files/usr/lib/uwufetch/
cp res/* /data/data/com.termux/files/usr/lib/uwufetch/
termux_uninstall:
2021-04-08 04:06:36 +02:00
rm -rf $(DESTDIR)/data/data/com.termux/files$(PREFIX)/$(NAME)
rm -rf $(DESTDIR)/data/data/com.termux/files/usr/lib/uwufetch/
2021-04-12 13:16:45 +02:00
man:
$(MAN_COMPILER) $(NAME)_man.md -st man -o $(NAME).1
@gzip $(NAME).1
man_debug:
$(MAN_COMPILER) $(NAME)_man.md -st man -o $(NAME).1
2021-04-12 13:16:45 +02:00
@clear
@man -P cat ./uwufetch.1