set proper dependency in Makefile

This commit is contained in:
hyung-hwan 2024-11-23 12:41:49 +09:00
parent dcc0c6afc6
commit afb3ad33af
2 changed files with 21 additions and 3 deletions

View File

@ -1,6 +1,23 @@
all: hodu.pb.go hodu_grpc.pb.go SRCS=\
go build -x -o hodu cmd/main.go c-peer.go \
client.go \
frame.go \
hodu.go \
hodu.pb.go \
hodu_grpc.pb.go \
packet.go \
s-peer.go \
server.go \
cmd/main.go
all: hodu
hodu: $(SRCS)
go build -x -o $@ cmd/main.go
clean:
go clean -x -i
rm -f hodu
hodu.pb.go: hodu.proto hodu.pb.go: hodu.proto
protoc --go_out=. --go_opt=paths=source_relative \ protoc --go_out=. --go_opt=paths=source_relative \
@ -11,3 +28,5 @@ hodu_grpc.pb.go: hodu.proto
protoc --go_out=. --go_opt=paths=source_relative \ protoc --go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \ --go-grpc_out=. --go-grpc_opt=paths=source_relative \
hodu.proto hodu.proto
.PHONY: clean

View File

@ -98,7 +98,6 @@ func (sh *signal_handler) StartService(data interface{}) {
// this isn't actually used standalone.. // this isn't actually used standalone..
// if we are to implement it, it must use the wait group for signal handler itself // if we are to implement it, it must use the wait group for signal handler itself
// however, this service is run through another service. // however, this service is run through another service.
//
// sh.wg.Add(1) // sh.wg.Add(1)
// go sh.RunTask(&sh.wg) // go sh.RunTask(&sh.wg)
} }