Compare commits

...

3 Commits

Author SHA1 Message Date
Urko aca76c1d38 add license 2023-07-10 13:43:10 +02:00
Urko 42598c7eca fix makefile 2023-07-10 12:57:38 +02:00
Urko ad90f771ad feat: add build for all mac, win and linux 2023-07-10 12:56:25 +02:00
2 changed files with 37 additions and 5 deletions

7
License Normal file
View File

@ -0,0 +1,7 @@
---- Definitions ----
license means right to use
author means who had initial idea, who research about jurisprudence and the who who started, in this case : Urko: Bein.
contributors means every man who has helped to improve this software
For the benefit of all men and women by the grace of YAHWEH!

View File

@ -1,19 +1,44 @@
BIN_DIR := ./bin
APP_NAME := backblaze-backup
MAIN := ./cmd/main.go
.PHONY: local_run
local_run:
go run ./cmd/main.go --dir "$(DIR)" --bucket "$(BUCKET)"
.PHONY: build_windows
build_windows:
.PHONY: build_linux_amd64
build_linux_amd64:
@mkdir -p $(BIN_DIR)
GOOS=windows GOARCH=amd64 go build -o $(BIN_DIR)/$(APP_NAME).exe
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 $(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 $(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 $(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 $(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 $(MAIN)
.PHONY: clean
clean:
rm -rf $(BIN_DIR)
.PHONY: rebuild
rebuild: clean build_windows
rebuild: clean build_linux_amd64 build_linux_arm64 build_windows_amd64 build_windows_386 build_mac_amd64 build_mac_arm64