aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 60dd7b894c27a436aeedcc6d1f66397ebeabc0ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
APP_NAME := parser

GO := go

PLATFORMS := linux/amd64 linux/arm64 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;)