From 642767d1c5cbbd154d46cf1f22a988ffa83a6180 Mon Sep 17 00:00:00 2001 From: "mingang.he" Date: Sat, 26 Jun 2021 15:17:15 +0000 Subject: [PATCH] Update Makefile --- .gitignore | 4 ++-- Makefile | 2 +- local/Makefile | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index df3d9d7..889f990 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ graftcp -graftcp-local/graftcp-local -graftcp-local/.gopath +local/cmd/graftcp-local/graftcp-local +local/cmd/mgraftcp/mgraftcp *.o *.d diff --git a/Makefile b/Makefile index 26755b8..81c6106 100644 --- a/Makefile +++ b/Makefile @@ -95,5 +95,5 @@ sinclude $(SRC:.c=.d) rm -f $@.$$$$ clean:: - -rm -f *.o graftcp *.d + -rm -f *.o *.a graftcp *.d $(MAKE) -C local $@ diff --git a/local/Makefile b/local/Makefile index effc435..2987ef6 100644 --- a/local/Makefile +++ b/local/Makefile @@ -14,9 +14,12 @@ all:: $(TARGET) cmd/graftcp-local/graftcp-local: $(wildcard *.go) $(wildcard cmd/graftcp-local/*.go) cd cmd/graftcp-local && go build -ldflags "-s -w -X main.version=${VERSION}" -cmd/mgraftcp/mgraftcp: $(wildcard *.go) $(wildcard cmd/mgraftcp/*.go) +cmd/mgraftcp/mgraftcp: $(wildcard *.go) $(wildcard cmd/mgraftcp/*.go) ../libgraftcp.a cd cmd/mgraftcp && go build -ldflags "-s -w -X main.version=${VERSION}" +../libgraftcp.a: + $(MAKE) -C .. libgraftcp.a + install:: cmd/graftcp-local/graftcp-local $(INSTALL) $< $(DESTDIR)$(BINDIR)/$<