From bce463bf73943aab9f983252b480fb9f4d59ec66 Mon Sep 17 00:00:00 2001 From: TheDarkBug Date: Sat, 29 Jan 2022 11:52:50 +0100 Subject: [PATCH 1/2] Updated makefile for termux --- Makefile | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index d41b969..9327b35 100644 --- a/Makefile +++ b/Makefile @@ -4,22 +4,28 @@ CFLAGS = -O3 CFLAGS_DEBUG = -Wall -Wextra -g -pthread CC = cc DESTDIR = /usr +PLATFORM = $(shell uname -o) -ifeq ($(shell uname), Linux) +ifeq ($(PLATFORM), GNU/Linux) PREFIX = bin LIBDIR = lib 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 LIBDIR = local/lib MANDIR = local/share/man/man1 -else ifeq ($(shell uname), FreeBSD) +else ifeq ($(PLATFORM), FreeBSD) CFLAGS += -D__FREEBSD__ CFLAGS_DEBUG += -D__FREEBSD__ PREFIX = bin LIBDIR = lib MANDIR = share/man/man1 -else ifeq ($(shell uname), windows32) +else ifeq ($(PLATFORM), windows32) CC = gcc PREFIX = "C:\Program Files" LIBDIR = @@ -44,15 +50,6 @@ uninstall: rm -rf $(DESTDIR)/$(LIBDIR)/uwufetch 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: rm $(NAME) From e69aa5566d4a3496477239f22002f029ccd38ded Mon Sep 17 00:00:00 2001 From: TheDarkBug Date: Sat, 29 Jan 2022 12:00:48 +0100 Subject: [PATCH 2/2] Merged linux and termux installation targets. Updated Readme --- Makefile | 16 +++++++--------- README.md | 6 ++---- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 9327b35..f8607ba 100644 --- a/Makefile +++ b/Makefile @@ -4,29 +4,27 @@ CFLAGS = -O3 CFLAGS_DEBUG = -Wall -Wextra -g -pthread CC = cc DESTDIR = /usr -PLATFORM = $(shell uname -o) +PLATFORM = $(shell uname) -ifeq ($(PLATFORM), GNU/Linux) +ifeq ($(PLATFORM), Linux) PREFIX = bin LIBDIR = lib MANDIR = share/man/man1 -else ifeq ($(PLATFORM), Android) - PREFIX = bin - LIBDIR = lib - MANDIR = share/man/man1 - DESTDIR = /data/data/com.termux/file + ifeq ($(shell uname -o), Android) + DESTDIR = /data/data/com.termux/file + endif else ifeq ($(PLATFORM), Darwin) PREFIX = local/bin LIBDIR = local/lib MANDIR = local/share/man/man1 else ifeq ($(PLATFORM), FreeBSD) - CFLAGS += -D__FREEBSD__ + CFLAGS += -D__FREEBSD__ CFLAGS_DEBUG += -D__FREEBSD__ PREFIX = bin LIBDIR = lib MANDIR = share/man/man1 else ifeq ($(PLATFORM), windows32) - CC = gcc + CC = gcc PREFIX = "C:\Program Files" LIBDIR = MANDIR = diff --git a/README.md b/README.md index b10800f..3906cef 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ To install UwUfetch from the source, type these commands in the terminal: git clone https://github.com/TheDarkBug/uwufetch.git cd uwufetch make build # add "CFLAGS+=-D__IPHONE__" if you are building for iOS -sudo make install # for termux, use `make termux` +sudo make install ``` To uninstall: @@ -72,8 +72,6 @@ make build # builds uwufetch make debug # use for debug make install # installs uwufetch (needs root permissons) make uninstall # uninstalls uwufetch (needs root permissons) -make termux # build and install for termux -make termux_uninstall # uninstall for termux ``` ## Images and copyright info @@ -101,4 +99,4 @@ See [COPYRIGHT.md](/res/COPYRIGHT.md). ## License -This program is provided under the [GPL-3.0 License](/LICENSE). \ No newline at end of file +This program is provided under the [GPL-3.0 License](/LICENSE).