21 lines
483 B
Makefile
21 lines
483 B
Makefile
# Makefile for building the packer command-line tool
|
|
|
|
# Variables
|
|
BINARY_NAME := packer
|
|
BUILD_DIR := ./bin
|
|
SRC_DIR := ./cmd/packer
|
|
|
|
# Build the packer tool
|
|
build:
|
|
@echo "Building $(BINARY_NAME)..."
|
|
@mkdir -p $(BUILD_DIR)
|
|
@go build -o $(BUILD_DIR)/$(BINARY_NAME) $(SRC_DIR)
|
|
@echo "Build completed. Binary saved to $(BUILD_DIR)/$(BINARY_NAME)"
|
|
|
|
# Clean build artifacts
|
|
clean:
|
|
@echo "Cleaning build artifacts..."
|
|
@rm -rf $(BUILD_DIR)
|
|
@echo "Clean completed."
|
|
|
|
.PHONY: build clean |