Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
hmgle committed Jun 26, 2021
1 parent a3c4ef3 commit 642767d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
graftcp
graftcp-local/graftcp-local
graftcp-local/.gopath
local/cmd/graftcp-local/graftcp-local
local/cmd/mgraftcp/mgraftcp

*.o
*.d
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@
5 changes: 4 additions & 1 deletion local/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)/$<

Expand Down

0 comments on commit 642767d

Please sign in to comment.