aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLena <lena@omega>2026-04-01 00:00:00 +0000
committerLena <lena@omega>2026-04-01 00:00:00 +0000
commit459f5935aab505cdb8174e5f9f04a9a3c426f37e (patch)
tree525a5b39b05ef2c799b953ad3969e869ab484745 /Makefile
downloadpdfstamp-459f5935aab505cdb8174e5f9f04a9a3c426f37e.tar.gz
Enter pdfstampHEADmaster
Terminal-only PDF stamp picker. Renders a coarse page preview in the terminal, places text and image stamps with the keyboard, saves the layout as a JSON plan, and burns it into an output PDF. MuPDF (via go-fitz) renders the preview; pdfcpu overlays the generated stamp PDF onto the source 1:1 and validates the result.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..6653599
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+BIN := pdfstamp
+CC ?= cc
+
+build:
+ CC=$(CC) CGO_ENABLED=1 go build -tags musl \
+ -ldflags '-linkmode external -extldflags -static' -o $(BIN) .
+
+test:
+ CC=$(CC) CGO_ENABLED=1 go vet -tags musl ./...
+ CC=$(CC) CGO_ENABLED=1 go test -tags musl ./...
+
+fmt:
+ gofmt -w *.go
+
+run: build
+ ./$(BIN) pick example.pdf -o plan.json
+
+clean:
+ rm -f $(BIN)
+
+.PHONY: build test fmt run clean