2024-11-14 11:16:34 +08:00
|
|
|
APP_NAME := tunnelserver
|
|
|
|
BIN_DIR := ../dist/tunnelserver
|
|
|
|
|
|
|
|
all: $(BIN_DIR) $(BIN_DIR)/$(APP_NAME) copy
|
|
|
|
|
|
|
|
$(BIN_DIR):
|
|
|
|
mkdir -p $(BIN_DIR)
|
|
|
|
|
|
|
|
$(BIN_DIR)/$(APP_NAME): main.go
|
|
|
|
go build -o $@ $<
|
|
|
|
copy:
|
|
|
|
cp -r ./conf.json $(BIN_DIR)
|
|
|
|
|
|
|
|
clean:
|
2024-11-14 11:35:22 +08:00
|
|
|
rm -rf $(BIN_DIR)
|
2024-11-14 11:16:34 +08:00
|
|
|
test:
|
|
|
|
go test -v ./...
|
|
|
|
|
2024-11-14 11:35:22 +08:00
|
|
|
.PHONY: clean all
|