From bc23662634618d8462b3cf30b7b050b80c26c6c5 Mon Sep 17 00:00:00 2001 From: phoenix Date: Wed, 10 Mar 2021 10:07:01 +0100 Subject: [PATCH] Add go module file and make all rule Improves the build system by adding a go.mod file and adding a make all rule together with optional GOARGS. This is required for a build in OBS --- Makefile | 6 ++++-- go.mod | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 go.mod diff --git a/Makefile b/Makefile index dd4b243..4377a62 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,11 @@ -default: disko-san +default: all +all: disko-san PREFIX=/usr/local/bin +GOARGS= disko-san: cmd/disko-san/disko-san.go cmd/disko-san/chunk.go cmd/disko-san/disk.go cmd/disko-san/progress.go - go build -o $@ $^ + go build $(GOARGS) -o $@ $^ install: disko-san install disko-san $(PREFIX) diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..35a1b39 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/grisu48/disko-san + +go 1.14