提交 cefa2bbd 编写于 作者: M Michael S. Tsirkin

rules: filter out irrelevant files

It's often handy to make executables depend on each other, e.g. make a
test depend on a helper. This doesn't work now, as linker
will attempt to use the helper as an object.
To fix, filter only relevant file types before linking an executable.
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 9cfaa007
......@@ -102,7 +102,7 @@ LD_REL := $(CC) -nostdlib -Wl,-r
modules:
%$(EXESUF): %.o
$(call LINK,$^)
$(call LINK,$(filter %.o %.a %.mo, $^))
%.a:
$(call quiet-command,rm -f $@ && $(AR) rcs $@ $^," AR $(TARGET_DIR)$@")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册