Files
glkvm-cloud/Makefile
T
GL.iNet-Yongping.Xie 6b7987163c feat: Update makefile comment
Update makefile comment

Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
2025-08-10 20:01:16 -07:00

42 lines
711 B
Makefile

# Makefile
# Go binary name
BINARY_NAME = rttys
# Go build flags
BUILD_FLAGS := -ldflags "-s -w"
# Go build command
GO_BUILD_CMD = go build $(BUILD_FLAGS) -o $(BINARY_NAME)
# Paths
UI_DIR = ui
CONF_FILE = ./rttys.conf
.PHONY: all ui build run build-run full-run
# Build frontend files only
ui:
cd $(UI_DIR) && npm install && npm run build
# Build Go binary only
build:
CGO_ENABLED=0 $(GO_BUILD_CMD)
# Run Go program only
run:
./$(BINARY_NAME) -c $(CONF_FILE)
# Build frontend and Go binary
build-all: ui build
# Build Go binary and run
build-run: build run
# Build frontend, build Go binary, and run
full-run: ui build run
# Build Docker image
docker-build: ui build
docker build -t glkvm:v1 .