summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 652ad92f6ffa838358fef47baec157e05b255a3e (plain) (blame)
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
BINARY := qpass
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
GO ?= go

.PHONY: all build clean fmt install test uninstall

all: build

build:
	mkdir -p bin
	CGO_ENABLED=0 $(GO) build -buildvcs=false -trimpath -ldflags="-s -w" -o bin/$(BINARY) ./cmd/qpass

fmt:
	$(GO) fmt ./...

test:
	$(GO) test ./...

install: build
	install -Dm755 bin/$(BINARY) "$(DESTDIR)$(BINDIR)/$(BINARY)"

uninstall:
	rm -f "$(DESTDIR)$(BINDIR)/$(BINARY)"

clean:
	rm -rf bin