2019-01-03 17:30:56 -08:00
|
|
|
CC=cc
|
2019-01-03 21:26:55 -08:00
|
|
|
PREFIX=
|
2018-11-23 23:58:54 -08:00
|
|
|
LIBS=-lncurses
|
|
|
|
|
|
|
|
all: build
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm ascii
|
|
|
|
|
|
|
|
ascii: ascii.c
|
|
|
|
$(CC) ascii.c $(LIBS) -o ascii
|
|
|
|
|
|
|
|
build: ascii
|
|
|
|
|
|
|
|
install: ascii
|
2019-01-03 21:26:55 -08:00
|
|
|
@prefix="$(PREFIX)"; \
|
|
|
|
if [[ ! $$prefix ]]; then \
|
|
|
|
read -p $$'\033[1mWhere do you want to install? (default: /usr/local) \033[0m' prefix; \
|
|
|
|
fi; \
|
|
|
|
if [[ ! $$prefix ]]; then \
|
|
|
|
prefix="/usr/local"; \
|
|
|
|
fi; \
|
|
|
|
mkdir -pv $$prefix/bin $$prefix/share/man/man1 \
|
|
|
|
&& cp -v ascii $$prefix/bin/ \
|
|
|
|
&& cp -v doc/ascii.1 $$prefix/share/man/man1/
|