about summary refs log tree commit diff
path: root/Makerules
diff options
context:
space:
mode:
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index b155c5551f..64282fb8ec 100644
--- a/Makerules
+++ b/Makerules
@@ -376,7 +376,11 @@ $(foreach o,$(object-suffixes),$(objpfx)stamp$o-$(subdir)): \
 	$(AR) cru$(verbose) ${O%-lib} \
 	      $(patsubst $(objpfx)%,%,$^)
 	touch $@
+ifdef subdir
 O%-lib = $(filter ../,$(firstword $(objdir) ../))$(patsubst %,$(libtype$*),c)
+else
+O%-lib = $(patsubst %,$(libtype$*),c)
+endif
 
 endif