mirror of
https://github.com/gl-inet/glkvm-cloud.git
synced 2026-09-16 23:55:08 +00:00
6b7987163c
Update makefile comment Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
42 lines
711 B
Makefile
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 .
|