-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
26 lines (26 loc) · 867 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
OBJ_NAME =
LDFLAGS =
install:
$(eval SOCKET_APP += chess-engine)
$(eval BLOG_APP += blog-engine)
$(eval LDFLAGS += "-w -s")
go mod tidy
cd ./frontend/ && npm install
cd ./chessapi/cmd/; go build -v -ldflags $(LDFLAGS) -o $(SOCKET_APP); mv $(SOCKET_APP) ../bin;
cd ./blogapi/cmd/; go build -v -ldflags $(LDFLAGS) -o $(BLOG_APP); mv $(BLOG_APP) ../bin
build:
$(eval SOCKET_APP += chess-engine)
$(eval BLOG_APP += blog-engine)
$(eval LDFLAGS += "-w -s")
cd ./chessapi/cmd/; go build -v -ldflags $(LDFLAGS) -o $(SOCKET_APP); mv $(SOCKET_APP) ../bin;
cd ./blogapi/cmd/; go build -v -ldflags $(LDFLAGS) -o $(BLOG_APP); mv $(BLOG_APP) ../bin
run-chess:
$(eval OBJ_NAME += chess-engine)
./chessapi/bin/$(OBJ_NAME)
run-blog:
$(eval OBJ_NAME += blog-engine)
./blogapi/bin/$(OBJ_NAME)
dev:
cd ./frontend/; npm run dev
doc:
cd ./cmd/; godoc -http=:6060