From 42598c7eca430ffbf8c144cb7dc4c9defeb24e36 Mon Sep 17 00:00:00 2001 From: Urko Date: Mon, 10 Jul 2023 12:57:38 +0200 Subject: [PATCH] fix makefile --- Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index ca68a84..b0ce12a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ BIN_DIR := ./bin APP_NAME := backblaze-backup +MAIN := ./cmd/main.go .PHONY: local_run local_run: @@ -8,32 +9,32 @@ local_run: .PHONY: build_linux_amd64 build_linux_amd64: @mkdir -p $(BIN_DIR) - GOOS=linux GOARCH=amd64 go build -o $(BIN_DIR)/$(APP_NAME)_linux_amd64 + GOOS=linux GOARCH=amd64 go build -o $(BIN_DIR)/$(APP_NAME)_linux_amd64 $(MAIN) .PHONY: build_linux_arm64 build_linux_arm64: @mkdir -p $(BIN_DIR) - GOOS=linux GOARCH=arm64 go build -o $(BIN_DIR)/$(APP_NAME)_linux_arm64 + GOOS=linux GOARCH=arm64 go build -o $(BIN_DIR)/$(APP_NAME)_linux_arm64 $(MAIN) .PHONY: build_windows_amd64 build_windows_amd64: @mkdir -p $(BIN_DIR) - GOOS=windows GOARCH=amd64 go build -o $(BIN_DIR)/$(APP_NAME)_windows_amd64.exe + GOOS=windows GOARCH=amd64 go build -o $(BIN_DIR)/$(APP_NAME)_windows_amd64.exe $(MAIN) .PHONY: build_windows_386 build_windows_386: @mkdir -p $(BIN_DIR) - GOOS=windows GOARCH=386 go build -o $(BIN_DIR)/$(APP_NAME)_windows_386.exe + GOOS=windows GOARCH=386 go build -o $(BIN_DIR)/$(APP_NAME)_windows_386.exe $(MAIN) .PHONY: build_mac_amd64 build_mac_amd64: @mkdir -p $(BIN_DIR) - GOOS=darwin GOARCH=amd64 go build -o $(BIN_DIR)/$(APP_NAME)_mac_amd64 + GOOS=darwin GOARCH=amd64 go build -o $(BIN_DIR)/$(APP_NAME)_mac_amd64 $(MAIN) .PHONY: build_mac_arm64 build_mac_arm64: @mkdir -p $(BIN_DIR) - GOOS=darwin GOARCH=arm64 go build -o $(BIN_DIR)/$(APP_NAME)_mac_arm64 + GOOS=darwin GOARCH=arm64 go build -o $(BIN_DIR)/$(APP_NAME)_mac_arm64 $(MAIN) .PHONY: clean clean: