28 lines
431 B
Makefile
28 lines
431 B
Makefile
# 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)
|