diff mbox series

[XEN,33/57] tools/vchan: Collect targets in TARGETS

Message ID 20211206170241.13165-34-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show
Series Toolstack build system improvement, toward non-recursive makefiles | expand

Commit Message

Anthony PERARD Dec. 6, 2021, 5:02 p.m. UTC
And use the new TARGETS to clean them. Now "clean" will remove
"vchan-socket-proxy".

$(RM) already have the "-f" flags, so remove the second one.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 tools/vchan/Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/tools/vchan/Makefile b/tools/vchan/Makefile
index a731e0e073..c886c22e12 100644
--- a/tools/vchan/Makefile
+++ b/tools/vchan/Makefile
@@ -11,8 +11,10 @@  NODE2_OBJS = node-select.o
 $(NODE_OBJS) $(NODE2_OBJS): CFLAGS += $(CFLAGS_libxenvchan) $(CFLAGS_libxengnttab) $(CFLAGS_libxenevtchn)
 vchan-socket-proxy.o: CFLAGS += $(CFLAGS_libxenvchan) $(CFLAGS_libxenstore) $(CFLAGS_libxenctrl) $(CFLAGS_libxengnttab) $(CFLAGS_libxenevtchn)
 
+TARGETS := vchan-node1 vchan-node2 vchan-socket-proxy
+
 .PHONY: all
-all: vchan-node1 vchan-node2 vchan-socket-proxy
+all: $(TARGETS)
 
 vchan-node1: $(NODE_OBJS)
 	$(CC) $(LDFLAGS) -o $@ $(NODE_OBJS) $(LDLIBS_libxenvchan) $(APPEND_LDFLAGS)
@@ -30,7 +32,7 @@  install: all
 
 .PHONY: clean
 clean:
-	$(RM) -f *.o vchan-node1 vchan-node2 $(DEPS_RM)
+	$(RM) *.o $(TARGETS) $(DEPS_RM)
 
 distclean: clean