summaryrefslogtreecommitdiff
path: root/makefile
blob: 8ec4e5576e4b6b9d4f5fcedea60d857541d432ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
version=$(shell git tag --points-at HEAD)
date=$(shell date "+%b %Y")
name=laboravi
.PHONY: all

all:
	@echo " make <cmd>"
	@echo ""
	@echo "Commands:"
	@echo "  build             - runs go build with ldflags version=${version} & date=${date}"
	@echo "  fetch_stuff       - installs all needed libaries"
	@echo ""


build: clean
	@go build -v -ldflags '-X "main.version=${version}" -X "main.compdate=${date}"' -o ${name}

clean:
	@rm -f ${name}

fetch_stuff:
	@go get github.com/fatih/color
	@go get github.com/mattn/go-sqlite3
	@go get github.com/abiosoft/ishell
	@go get github.com/BurntSushi/toml
	@go get github.com/atrox/homedir
	@go get github.com/pborman/getopt/v2
	@go get github.com/atotto/encoding/csv
	@mkdir -p outpdf
	@mkdir -p outtex
	@echo "All nessecary libaries installed"