← history for Makefile
b3f7b553Makefile23 lines⬡ raw↓ download
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.PHONY:	all oldswagger openapi clean server client

BUILD_DIR:= ./build

all: server client

oldswagger:
	swag init  -g cmd/yats-server/main.go

openapi:
	test -d ./openapi || mkdir -p ./openapi \
	swag2op init --output=./internal/docs --openapiOutputDir=./openapi -g cmd/yats-server/main.go
	#swag2op init --openapiOutputDir=./internal/docs -g cmd/yats-server/main.go

server: openapi
	test -d $(BUILD_DIR) || mkdir -p $(BUILD_DIR) && \
                (export CGO_ENABLED=0; go build -o $(BUILD_DIR)/yats-server cmd/yats-server/main.go)

client: 
	test -d $(BUILD_DIR) || mkdir -p $(BUILD_DIR) && \
                (export CGO_ENABLED=0; go build -o $(BUILD_DIR)/yats cmd/yats-client/main.go)
clean:
	rm -fr build/