summaryrefslogtreecommitdiffstats
path: root/Rules.make
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
commitd6434e1042f3b0a6dfe1b1f615af369486f9b1fa (patch)
treee2be02f33984c48ec019c654051d27964e42c441 /Rules.make
parent609d1e803baf519487233b765eb487f9ec227a18 (diff)
Merge with 2.3.19.
Diffstat (limited to 'Rules.make')
-rw-r--r--Rules.make10
1 files changed, 5 insertions, 5 deletions
diff --git a/Rules.make b/Rules.make
index 948c33dcd..6f8a10f2e 100644
--- a/Rules.make
+++ b/Rules.make
@@ -73,11 +73,11 @@ ifdef O_TARGET
ALL_O = $(OX_OBJS) $(O_OBJS)
$(O_TARGET): $(ALL_O)
rm -f $@
-ifneq "$(strip $(ALL_O))" ""
- $(LD) $(EXTRA_LDFLAGS) -r -o $@ $(ALL_O)
-else
- $(AR) rcs $@
-endif
+ ifneq "$(strip $(ALL_O))" ""
+ $(LD) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(ALL_O), $^)
+ else
+ $(AR) rcs $@ $(filter $(ALL_O), $^)
+ endif
@ ( \
echo 'ifeq ($(strip $(subst $(comma),:,$(EXTRA_LDFLAGS) $(ALL_O))),$$(strip $$(subst $$(comma),:,$$(EXTRA_LDFLAGS) $$(ALL_O))))' ; \
echo 'FILES_FLAGS_UP_TO_DATE += $@' ; \