- use []byte instead of unnecessary string conversions - make LogManager.Broadcast private - make LogManager.GetHistory public - add tests
36 lines
794 B
Makefile
36 lines
794 B
Makefile
# Define variables for the application
|
|
APP_NAME = llama-swap
|
|
BUILD_DIR = build
|
|
|
|
# Default target: Builds binaries for both OSX and Linux
|
|
all: mac linux simple-responder
|
|
|
|
# Clean build directory
|
|
clean:
|
|
rm -rf $(BUILD_DIR)
|
|
|
|
test:
|
|
go test -v ./proxy
|
|
|
|
# Build OSX binary
|
|
mac:
|
|
@echo "Building Mac binary..."
|
|
GOOS=darwin GOARCH=arm64 go build -o $(BUILD_DIR)/$(APP_NAME)-darwin-arm64
|
|
|
|
# Build Linux binary
|
|
linux:
|
|
@echo "Building Linux binary..."
|
|
GOOS=linux GOARCH=amd64 go build -o $(BUILD_DIR)/$(APP_NAME)-linux-amd64
|
|
|
|
# for testing things
|
|
simple-responder:
|
|
@echo "Building simple responder"
|
|
go build -o $(BUILD_DIR)/simple-responder misc/simple-responder/simple-responder.go
|
|
|
|
# Ensure build directory exists
|
|
$(BUILD_DIR):
|
|
mkdir -p $(BUILD_DIR)
|
|
|
|
# Phony targets
|
|
.PHONY: all clean osx linux
|