]> git.proxmox.com Git - mirror_qemu.git/commitdiff
rules: filter out irrelevant files
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 17 Feb 2016 14:59:36 +0000 (16:59 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 17 Feb 2016 14:59:36 +0000 (16:59 +0200)
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: Michael S. Tsirkin <mst@redhat.com>
rules.mak

index fc5ee41e476c8a6479808c4098fb98a6131fa751..d1ff311254948b2f61d91e6eb0befd2fa620e157 100644 (file)
--- a/rules.mak
+++ b/rules.mak
@@ -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)$@")