add make
This commit is contained in:
parent
45427d2020
commit
bf00c0c14c
|
@ -0,0 +1,2 @@
|
||||||
|
dist/
|
||||||
|
vendor/
|
|
@ -0,0 +1,19 @@
|
||||||
|
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:
|
||||||
|
rm -f $(BIN_DIR)
|
||||||
|
test:
|
||||||
|
go test -v ./...
|
||||||
|
|
||||||
|
.PHONY: clean test
|
Loading…
Reference in New Issue