From 7fc7211f6f27adae1ecfd6e8fa6321c84f86cbda Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Sat, 16 Sep 2023 21:32:26 +0300 Subject: makefile for building easier --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6e3507a --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +APP_NAME := parser + +GO := go + +PLATFORMS := linux/amd64 linux/arm windows/amd64 + +all: build + +build: + $(foreach platform, $(PLATFORMS), \ + GOARCH=$(word 2, $(subst /, , $(platform))) GOOS=$(word 1, $(subst /, , $(platform))) \ + $(GO) build -o $(APP_NAME)-$(word 1, $(subst /, , $(platform)))-$(word 2, $(subst /, , $(platform)))$(if $(filter windows,$(word 1, $(subst /, , $(platform)))),.exe,) ./cmd;) -- cgit v1.2.3