Updated makefile for termux
This commit is contained in:
parent
30904e3a64
commit
bce463bf73
1 changed files with 10 additions and 13 deletions
23
Makefile
23
Makefile
|
@ -4,22 +4,28 @@ CFLAGS = -O3
|
||||||
CFLAGS_DEBUG = -Wall -Wextra -g -pthread
|
CFLAGS_DEBUG = -Wall -Wextra -g -pthread
|
||||||
CC = cc
|
CC = cc
|
||||||
DESTDIR = /usr
|
DESTDIR = /usr
|
||||||
|
PLATFORM = $(shell uname -o)
|
||||||
|
|
||||||
ifeq ($(shell uname), Linux)
|
ifeq ($(PLATFORM), GNU/Linux)
|
||||||
PREFIX = bin
|
PREFIX = bin
|
||||||
LIBDIR = lib
|
LIBDIR = lib
|
||||||
MANDIR = share/man/man1
|
MANDIR = share/man/man1
|
||||||
else ifeq ($(shell uname), Darwin)
|
else ifeq ($(PLATFORM), Android)
|
||||||
|
PREFIX = bin
|
||||||
|
LIBDIR = lib
|
||||||
|
MANDIR = share/man/man1
|
||||||
|
DESTDIR = /data/data/com.termux/file
|
||||||
|
else ifeq ($(PLATFORM), Darwin)
|
||||||
PREFIX = local/bin
|
PREFIX = local/bin
|
||||||
LIBDIR = local/lib
|
LIBDIR = local/lib
|
||||||
MANDIR = local/share/man/man1
|
MANDIR = local/share/man/man1
|
||||||
else ifeq ($(shell uname), FreeBSD)
|
else ifeq ($(PLATFORM), FreeBSD)
|
||||||
CFLAGS += -D__FREEBSD__
|
CFLAGS += -D__FREEBSD__
|
||||||
CFLAGS_DEBUG += -D__FREEBSD__
|
CFLAGS_DEBUG += -D__FREEBSD__
|
||||||
PREFIX = bin
|
PREFIX = bin
|
||||||
LIBDIR = lib
|
LIBDIR = lib
|
||||||
MANDIR = share/man/man1
|
MANDIR = share/man/man1
|
||||||
else ifeq ($(shell uname), windows32)
|
else ifeq ($(PLATFORM), windows32)
|
||||||
CC = gcc
|
CC = gcc
|
||||||
PREFIX = "C:\Program Files"
|
PREFIX = "C:\Program Files"
|
||||||
LIBDIR =
|
LIBDIR =
|
||||||
|
@ -44,15 +50,6 @@ uninstall:
|
||||||
rm -rf $(DESTDIR)/$(LIBDIR)/uwufetch
|
rm -rf $(DESTDIR)/$(LIBDIR)/uwufetch
|
||||||
rm -f $(DESTDIR)/$(MANDIR)/$(NAME).1.gz
|
rm -f $(DESTDIR)/$(MANDIR)/$(NAME).1.gz
|
||||||
|
|
||||||
termux: build
|
|
||||||
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 -r res/* /data/data/com.termux/files/usr/lib/uwufetch/
|
|
||||||
|
|
||||||
termux_uninstall:
|
|
||||||
rm -rf $(DESTDIR)/data/data/com.termux/files$(PREFIX)/$(NAME)
|
|
||||||
rm -rf $(DESTDIR)/data/data/com.termux/files/usr/lib/uwufetch/
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm $(NAME)
|
rm $(NAME)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue