diff --git a/Makefile b/Makefile
index 17e424db62b5ef0e9004443ef74860eda86f84ce..c235179e4f8088760a7a6fc842a3c5a2814fa6d6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,26 @@
-GIT_COMMIT ?= $(shell git rev-parse --short HEAD)
-LDFLAGS := "-X 'git.gabrielgio.me/cerrado/templates.Slug=.$(GIT_COMMIT)' -s -w"
+GIT_COMMIT ?= $(shell git rev-parse --short HEAD)
+LDFLAGS := "-X 'git.gabrielgio.me/cerrado/templates.Slug=.$(GIT_COMMIT)' -s -w"
-TEMPLATES_DIR := templates
-TEMPLATES := $(wildcard $(TEMPLATES_DIR)/*.qtpl)
-GO_TEMPLATES_FILES := $(TEMPLATES:.qtpl=.qtpl.go)
+BIN ?= cerrado
+PREFIX ?= /usr/local
+BINDIR ?= $(PREFIX)/bin
-SASS_DIR := scss
-CSS_DIR := static
-OUTPUT_CSS := $(CSS_DIR)/main.$(GIT_COMMIT).css
-SASS_FILES := $(wildcard $(SASS_DIR)/*.scss)
+TEMPLATES_DIR := templates
+TEMPLATES := $(wildcard $(TEMPLATES_DIR)/*.qtpl)
+GO_TEMPLATES_FILES := $(TEMPLATES:.qtpl=.qtpl.go)
+
+SASS_DIR := scss
+CSS_DIR := static
+OUTPUT_CSS := $(CSS_DIR)/main.$(GIT_COMMIT).css
+SASS_FILES := $(wildcard $(SASS_DIR)/*.scss)
build: sass tmpl
go build \
-ldflags=$(LDFLAGS) \
- -o bin/cerrado
+ -o bin/$(BIN)
+
+install:
+ install -Dm755 bin/$(BIN) $(BINDIR)/$(BIN)
run: sass tmpl
go run .
@@ -34,5 +41,6 @@ qtc $(TEMPLATES_DIR)/$*.qtpl
clean:
rm -f $(OUTPUT_CSS)
+ rm bin/$(BIN)
.PHONY: sass tmpl
diff --git a/README.md b/README.md
index 267a30614fe7430b180885880a2a907d758a2368..ec8ee174a283c4aae815b5c99f1a7b8095542f0a 100644
--- a/README.md
+++ b/README.md
@@ -27,12 +27,24 @@ To run the project you just need to do a make run.
### Installations
-The only installation process available so far is through my apk
-repository[^2][^3].
+One installation process available is through my apk repository[^2][^3].
-You can check openrc files for the details how it is run, but in general you'd
-need the cerrado binary and scfg file. I can easily be integration with
-systemd.
+You could also run:
+
+```sh
+make
+make install
+```
+
+Or you could also pick another prefix:
+
+```sh
+PREFIX=$HOME/.local/ make install
+```
+
+You can check openrc files for the details how it is run with a init system,
+but in general you'd need the cerrado binary and scfg file, which can easily be
+integrated with systemd.
### Contributing