From 12de594337a46e823c43745b8a240b7203d39065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20Bagu=C3=A9?= Date: Tue, 7 Jan 2020 21:09:51 +0100 Subject: [PATCH] add makefile to build multiple binaries --- .gitignore | 4 ++++ Makefile | 11 +++++++++++ bin/.gitkeep | 0 3 files changed, 15 insertions(+) create mode 100644 Makefile create mode 100644 bin/.gitkeep diff --git a/.gitignore b/.gitignore index f3ed435..d1d4354 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,7 @@ Icon Network Trash Folder Temporary Items .apdisk + +# Ignore binaries +bin/* +!bin/.gitkeep \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d9d2af2 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +OUT=sfs + +run: + go run main.go + +build: clean + GOOS=linux GOARCH=arm go build -o bin/$(OUT)-linux-arm + GOOS=darwin GOARCH=amd64 go build -o bin/$(OUT)-darwin-amd64 + +clean: + find bin ! -name '.gitkeep' -type f -exec rm {} + diff --git a/bin/.gitkeep b/bin/.gitkeep new file mode 100644 index 0000000..e69de29