From c460aaf4acf7b886c3343296352bf85bf03e7d5b Mon Sep 17 00:00:00 2001 From: Kied Llaentenn <32681240+Kiedtl@users.noreply.github.com> Date: Sat, 14 Dec 2019 16:25:12 -0500 Subject: [PATCH] udpate --- README.md | 11 ++++++++--- makefile | 10 ++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7351309..befae06 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,18 @@ It's described nicely by Fabien Sanglard on his ### building from source You will need: -- `git` +- `git` or `wget` - a c99 compiler (gcc or clang) - GNU Make (unknown if other `make`s will work) -Clone the source via `git`: +Retrieve the source: ``` +$ # via git: $ git --recurse clone https://github.com/lptstr/fire +$ +$ # via wget: +$ wget https://github.com/lptstr/fire/archive/master.tar.gz +$ tar xvf master.tar.gz ``` Build: @@ -37,7 +42,7 @@ and install: Uninstall, if you wish: ``` -# rm -f /usr/bin/fire +# make uninstall ``` ## how? diff --git a/makefile b/makefile index a0a7a4c..3245e26 100644 --- a/makefile +++ b/makefile @@ -18,6 +18,9 @@ TRMBOX = sub/termbox_next/bin/termbox.a SRC = main.c draw.c OBJ = $(SRC:.c=.o) +DESTDIR = / +PREFIX = /usr/local/ + all: $(NAME) clean: @@ -36,7 +39,10 @@ $(NAME): $(OBJ) $(TRMBOX) @$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) install: $(NAME) - @echo "\tINSTALL\t$(NAME)\t/usr/bin/$(NAME)" - @install -m755 ./$(NAME) /usr/bin/$(NAME) + @echo "\tINSTALL\t\t$(NAME)\t$(DESTDIR)/$(PREFIX)/bin/$(NAME)" + @install -m755 ./$(NAME) $(DESTDIR)/$(PREFIX)/bin/$(NAME) +uninstall: + @echo "\tRM\t\t$(DESTDIR)/$(PREFIX)/bin/$(NAME)" + @rm -f $(DESTDIR)/$(PREFIX)/bin/$(NAME) .PHONY: all clean install