go-jsonapi-example/Makefile
2021-03-18 21:52:41 +03:00

24 lines
360 B
Makefile

NAME = go-jsonapi-example
GOCMD = go
GOBUILD = $(GOCMD) build
SRCMAIN = ./cmd/$(NAME)
BINDIR = bin
BIN = $(BINDIR)/$(NAME)
.PHONY: all prep build check-build clean
all: build
prep: clean
go mod init $(NAME); go mod tidy
mkdir $(BINDIR)
build: prep
$(GOBUILD) -o $(BIN) $(SRCMAIN)
check-build:
test -e $(BIN)
clean:
rm -rf $(BINDIR)