summaryrefslogtreecommitdiffstats
path: root/rules.mak
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2016-02-17 16:59:36 +0200
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:45:29 -0600
commitf8e1a681e0f09fd05e009e48241da9d47809ff24 (patch)
tree29ea4fd4af652d81ab716a81fea18074ce5c2b7a /rules.mak
parent4b8d7cf6b62db098cb27b19e7af75c377b4cc523 (diff)
downloadhqemu-f8e1a681e0f09fd05e009e48241da9d47809ff24.zip
hqemu-f8e1a681e0f09fd05e009e48241da9d47809ff24.tar.gz
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>
Diffstat (limited to 'rules.mak')
-rw-r--r--rules.mak2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules.mak b/rules.mak
index fc5ee41..d1ff311 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)$@")
OpenPOWER on IntegriCloud