From 4bbddc1579eada9b729548b53610dc31c222e79d Mon Sep 17 00:00:00 2001 From: firebadnofire Date: Fri, 25 Apr 2025 19:10:33 -0400 Subject: [PATCH] commit --- makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 makefile diff --git a/makefile b/makefile new file mode 100644 index 0000000..d57dd9e --- /dev/null +++ b/makefile @@ -0,0 +1,28 @@ +# Makefile for magnet-to-torrent + +BINARY_NAME := magnet-to-torrent + +.PHONY: all build run clean fmt test install uninstall + +all: build + +build: + go build -o $(BINARY_NAME) main.go + +run: build + ./$(BINARY_NAME) + +fmt: + gofmt -w main.go + +test: + go test ./... + +install: build + install -Dm755 $(BINARY_NAME) $(DESTDIR)/usr/local/bin/$(BINARY_NAME) + +uninstall: + rm -f $(DESTDIR)/usr/local/bin/$(BINARY_NAME) + +clean: + rm -f $(BINARY_NAME)