forked from caris-events/tunalog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
34 lines (28 loc) · 994 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Define the Go binary name
BINARY_NAME=tunalog
# Define the output directory
OUTPUT_DIR=bin
# Entry point
all: clean build
# Remove bin directory if it exists
clean:
@if [ -d $(OUTPUT_DIR) ]; then rm -rf $(OUTPUT_DIR); fi
# Build all binaries
build:
@echo "Building Windows x64..."
GOOS=windows GOARCH=amd64 go build -o $(OUTPUT_DIR)/$(BINARY_NAME)_windows_x64.exe && \
\
echo "Building macOS x64..." && \
GOOS=darwin GOARCH=amd64 go build -o $(OUTPUT_DIR)/$(BINARY_NAME)_macos_x64 && \
\
echo "Building Linux x64..." && \
GOOS=linux GOARCH=amd64 go build -o $(OUTPUT_DIR)/$(BINARY_NAME)_linux_x64 && \
\
echo "Building Windows ARM64..." && \
GOOS=windows GOARCH=arm64 go build -o $(OUTPUT_DIR)/$(BINARY_NAME)_windows_arm64.exe && \
\
echo "Building macOS ARM64..." && \
GOOS=darwin GOARCH=arm64 go build -o $(OUTPUT_DIR)/$(BINARY_NAME)_macos_arm64 && \
\
echo "Building Linux ARM64..." && \
GOOS=linux GOARCH=arm64 go build -o $(OUTPUT_DIR)/$(BINARY_NAME)_linux_arm64