aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 6e3507afc123060b0b22fdba56825e4726f1cdee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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;)