This commit is contained in:
Kied Llaentenn 2019-12-14 16:25:12 -05:00
parent e38315c816
commit c460aaf4ac
2 changed files with 16 additions and 5 deletions

View File

@ -16,13 +16,18 @@ It's described nicely by Fabien Sanglard on his
### building from source ### building from source
You will need: You will need:
- `git` - `git` or `wget`
- a c99 compiler (gcc or clang) - a c99 compiler (gcc or clang)
- GNU Make (unknown if other `make`s will work) - 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 $ 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: Build:
@ -37,7 +42,7 @@ and install:
Uninstall, if you wish: Uninstall, if you wish:
``` ```
# rm -f /usr/bin/fire # make uninstall
``` ```
## how? ## how?

View File

@ -18,6 +18,9 @@ TRMBOX = sub/termbox_next/bin/termbox.a
SRC = main.c draw.c SRC = main.c draw.c
OBJ = $(SRC:.c=.o) OBJ = $(SRC:.c=.o)
DESTDIR = /
PREFIX = /usr/local/
all: $(NAME) all: $(NAME)
clean: clean:
@ -36,7 +39,10 @@ $(NAME): $(OBJ) $(TRMBOX)
@$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) @$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
install: $(NAME) install: $(NAME)
@echo "\tINSTALL\t$(NAME)\t/usr/bin/$(NAME)" @echo "\tINSTALL\t\t$(NAME)\t$(DESTDIR)/$(PREFIX)/bin/$(NAME)"
@install -m755 ./$(NAME) /usr/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 .PHONY: all clean install