neowofetch/Makefile

62 lines
1.5 KiB
Makefile
Raw Normal View History

NAME = uwufetch
FILES = uwufetch.c
CFLAGS = -O3
CFLAGS_DEBUG = -Wall -Wextra -g -pthread
CC = cc
DESTDIR = /usr
2021-11-01 16:48:54 +01:00
2021-06-07 00:34:07 +02:00
ifeq ($(shell uname), Linux)
PREFIX = bin
LIBDIR = lib
MANDIR = share/man/man1
2021-06-07 00:34:07 +02:00
else ifeq ($(shell uname), Darwin)
PREFIX = local/bin
LIBDIR = local/lib
MANDIR = 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 = bin
LIBDIR = lib
MANDIR = share/man/man1
2021-11-01 16:48:54 +01:00
else ifeq ($(shell uname), windows32)
CC = gcc
PREFIX = "C:\Program Files"
LIBDIR =
MANDIR =
2021-06-07 00:34:07 +02:00
endif
build: $(FILES)
$(CC) $(CFLAGS) -o $(NAME) $(FILES)
2021-01-18 21:19:20 +01:00
debug:
$(CC) $(CFLAGS_DEBUG) -o $(NAME) $(FILES)
./$(NAME)
2021-08-28 10:49:45 +02:00
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)/
uninstall:
rm -f $(DESTDIR)/$(PREFIX)/$(NAME)
rm -rf $(DESTDIR)/$(LIBDIR)/uwufetch
rm -f $(DESTDIR)/$(MANDIR)/$(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/
2021-08-26 14:58:46 +02:00
cp -r 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:
2021-08-27 20:30:54 +02:00
gzip --keep $(NAME).1
man_debug:
2021-04-12 13:16:45 +02:00
@clear
2021-08-27 20:30:54 +02:00
man -P cat ./uwufetch.1