From afb3ad33af070a9a328679ca54c7b7e5033ac1e5 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sat, 23 Nov 2024 12:41:49 +0900 Subject: [PATCH] set proper dependency in Makefile --- Makefile | 23 +++++++++++++++++++++-- cmd/main.go | 1 - 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0c5396a..1b27d3e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,23 @@ -all: hodu.pb.go hodu_grpc.pb.go - go build -x -o hodu cmd/main.go +SRCS=\ + 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 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 \ --go-grpc_out=. --go-grpc_opt=paths=source_relative \ hodu.proto + +.PHONY: clean diff --git a/cmd/main.go b/cmd/main.go index 72e3923..1a18ad1 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -98,7 +98,6 @@ func (sh *signal_handler) StartService(data interface{}) { // this isn't actually used standalone.. // if we are to implement it, it must use the wait group for signal handler itself // however, this service is run through another service. - // // sh.wg.Add(1) // go sh.RunTask(&sh.wg) }