aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2016-02-17 16:59:36 +0200
committerMichael S. Tsirkin <mst@redhat.com>2016-02-17 16:59:36 +0200
commitcefa2bbd6ad516a8cde9425a35597487d9a4becb (patch)
tree276a24c751bb5c12a0b09b65ff640a9befef02ce
parent9cfaa0079f5053683c6a632070244c35fa319549 (diff)
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: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r--rules.mak2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules.mak b/rules.mak
index fc5ee41e47..d1ff311254 100644
--- 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)$@")