Merge pull request #187 from TheDarkBug/termux-as-linux
Merge termux and linux installation targets
This commit is contained in:
commit
439d282aaa
2 changed files with 12 additions and 19 deletions
21
Makefile
21
Makefile
|
@ -4,22 +4,26 @@ CFLAGS = -O3
|
|||
CFLAGS_DEBUG = -Wall -Wextra -g -pthread
|
||||
CC = cc
|
||||
DESTDIR = /usr
|
||||
PLATFORM = $(shell uname)
|
||||
|
||||
ifeq ($(shell uname), Linux)
|
||||
ifeq ($(PLATFORM), Linux)
|
||||
PREFIX = bin
|
||||
LIBDIR = lib
|
||||
MANDIR = share/man/man1
|
||||
else ifeq ($(shell uname), Darwin)
|
||||
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 ($(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 +48,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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue