Init: bootstrap go module
This commit is contained in:
20
Makefile
Normal file
20
Makefile
Normal file
@@ -0,0 +1,20 @@
|
||||
.PHONY: all install clean swagger
|
||||
|
||||
SWAG ?= ~/go/bin/swag
|
||||
|
||||
TARGET := $(shell find . -type f -name '*.go')
|
||||
|
||||
all: swagger install
|
||||
|
||||
install: game
|
||||
CGO_ENABLED=0 go install
|
||||
|
||||
game: $(TARGET)
|
||||
CGO_ENABLED=0 go build -o $@
|
||||
|
||||
swagger:
|
||||
$(SWAG) fmt
|
||||
$(SWAG) init -o backend/docs -g cmd/serve/backend.go -pdl 1
|
||||
|
||||
clean:
|
||||
-rm -f game
|
||||
Reference in New Issue
Block a user