1PREFIX ?=/usr/local
2BINDIR ?=$(PREFIX)/bin
3BIN?=apkdoc
4OUT=./bin/$(BIN)
5GO_RUN?= go run -v
6GO_BUILD?= go build -v -ldflags "-s -w"
7
8all: build
9
10run: tmpl
11 $(GO_RUN) .
12
13build:
14 $(GO_BUILD) \
15 -o $(OUT) \
16 .
17
18install:
19 install -Dm755 $(OUT) $(BINDIR)/$(BIN)
20
21compress:
22 upx --best --ultra-brute $(OUT)
23
24check:
25 $(OUT) \
26 -f example.md \
27 -t text \
28 -u https://alpine.mirror.wearetriple.com/v3.18/main/x86_64/APKINDEX.tar.gz \
29 -o index.txt