diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-16 21:32:26 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-16 21:39:44 +0300 |
| commit | 7fc7211f6f27adae1ecfd6e8fa6321c84f86cbda (patch) | |
| tree | 07d1821b7348adb528be92808266dcba50b6b7c0 | |
| parent | ignore executables generated by Makefile (diff) | |
| download | sdp.go-7fc7211f6f27adae1ecfd6e8fa6321c84f86cbda.tar.gz sdp.go-7fc7211f6f27adae1ecfd6e8fa6321c84f86cbda.tar.bz2 sdp.go-7fc7211f6f27adae1ecfd6e8fa6321c84f86cbda.zip | |
makefile for building easier
| -rw-r--r-- | Makefile | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6e3507a --- /dev/null +++ b/Makefile | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | APP_NAME := parser | ||
| 2 | |||
| 3 | GO := go | ||
| 4 | |||
| 5 | PLATFORMS := linux/amd64 linux/arm windows/amd64 | ||
| 6 | |||
| 7 | all: build | ||
| 8 | |||
| 9 | build: | ||
| 10 | $(foreach platform, $(PLATFORMS), \ | ||
| 11 | GOARCH=$(word 2, $(subst /, , $(platform))) GOOS=$(word 1, $(subst /, , $(platform))) \ | ||
| 12 | $(GO) build -o $(APP_NAME)-$(word 1, $(subst /, , $(platform)))-$(word 2, $(subst /, , $(platform)))$(if $(filter windows,$(word 1, $(subst /, , $(platform)))),.exe,) ./cmd;) | ||