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
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?

View File

@ -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