mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
9cfaa0079f
commit
cefa2bbd6a
|
@ -102,7 +102,7 @@ LD_REL := $(CC) -nostdlib -Wl,-r
|
||||||
modules:
|
modules:
|
||||||
|
|
||||||
%$(EXESUF): %.o
|
%$(EXESUF): %.o
|
||||||
$(call LINK,$^)
|
$(call LINK,$(filter %.o %.a %.mo, $^))
|
||||||
|
|
||||||
%.a:
|
%.a:
|
||||||
$(call quiet-command,rm -f $@ && $(AR) rcs $@ $^," AR $(TARGET_DIR)$@")
|
$(call quiet-command,rm -f $@ && $(AR) rcs $@ $^," AR $(TARGET_DIR)$@")
|
||||||
|
|
Loading…
Reference in New Issue