31 lines
499 B
Makefile
31 lines
499 B
Makefile
|
# Makefile for building the Go module
|
||
|
APP_NAME := maddy-hostux-check-password
|
||
|
|
||
|
# Set the source directory
|
||
|
SRC_DIR := .
|
||
|
|
||
|
# Go files
|
||
|
SRC := $(wildcard $(SRC_DIR)/*.go)
|
||
|
|
||
|
# Build directory
|
||
|
BUILD_DIR := ./build
|
||
|
|
||
|
# Set the Go compiler
|
||
|
GO := go
|
||
|
|
||
|
# Flags for go build
|
||
|
BUILD_FLAGS := -o $(BUILD_DIR)/$(APP_NAME)
|
||
|
|
||
|
.PHONY: all build clean
|
||
|
|
||
|
all: build
|
||
|
|
||
|
build: $(BUILD_DIR)/$(APP_NAME)
|
||
|
|
||
|
$(BUILD_DIR)/$(APP_NAME): $(SRC)
|
||
|
@mkdir -p $(BUILD_DIR)
|
||
|
$(GO) build $(BUILD_FLAGS) $(SRC_DIR)
|
||
|
|
||
|
clean:
|
||
|
rm -rf $(BUILD_DIR)
|