-PROGS := $(addsuffix $(EXESUF), $(PROGS-yes))
-PROGS_G = $(addsuffix _g$(EXESUF), $(PROGS-yes))
-OBJS = $(addsuffix .o, $(PROGS-yes)) cmdutils.o
-MANPAGES = $(addprefix doc/, $(addsuffix .1, $(PROGS-yes)))
-PODPAGES = $(addprefix doc/, $(addsuffix .pod, $(PROGS-yes)))
-HTMLPAGES = $(addprefix doc/, $(addsuffix .html, $(PROGS-yes)))
-TOOLS = $(addprefix tools/, $(addsuffix $(EXESUF), cws2fws pktdumper probetest qt-faststart trasher))
-HOSTPROGS = $(addprefix tests/, audiogen videogen rotozoom tiny_psnr base64)
+PROGS := $(PROGS-yes:%=%$(EXESUF))
+PROGS_G = $(PROGS-yes:%=%_g$(EXESUF))
+OBJS = $(PROGS-yes:%=%.o) cmdutils.o
+MANPAGES = $(PROGS-yes:%=doc/%.1)
+PODPAGES = $(PROGS-yes:%=doc/%.pod)
+HTMLPAGES = $(PROGS-yes:%=doc/%.html)
+TOOLS = $(addprefix tools/, $(addsuffix $(EXESUF), cws2fws graph2dot lavfi-showfiltfmts pktdumper probetest qt-faststart trasher))
+TESTTOOLS = audiogen videogen rotozoom tiny_psnr base64
+HOSTPROGS := $(TESTTOOLS:%=tests/%)