summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGab Virebent <gabriel1@virebent.art>2026-07-07 16:24:30 +0200
committerGab Virebent <gabriel1@virebent.art>2026-07-07 16:24:30 +0200
commitcc21fb4978b54d643d8fb3f5a454e62da4b396c2 (patch)
tree3050c8d4b68e28989cbe611001f8c6e961a08e51 /Makefile
downloadqpass-cc21fb4978b54d643d8fb3f5a454e62da4b396c2.tar.gz
qpass-cc21fb4978b54d643d8fb3f5a454e62da4b396c2.tar.xz
qpass-cc21fb4978b54d643d8fb3f5a454e62da4b396c2.zip
Initial commitHEADmain
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..652ad92
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,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