about summary refs log tree commit diff
path: root/Makerules
diff options
context:
space:
mode:
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index ba0116b0ac..b9cdc5e424 100644
--- a/Makerules
+++ b/Makerules
@@ -426,9 +426,15 @@ extra-libs-left := $(extra-libs)
 include $(patsubst %,$(..)extra-lib.mk,$(extra-libs))
 endif
 
+ifeq ($(build-programs),yes)
 +depfiles := $(strip $(sources:.c=.d) \
 		     $(patsubst %.o,%.d,$(filter %.o,$(extra-objs:.so=.o))) \
 		     $(addsuffix .d,$(others) $(tests) $(test-srcs)))
+else
++depfiles := $(strip $(sources:.c=.d) \
+		     $(patsubst %.o,%.d,$(filter %.o,$(extra-objs:.so=.o))) \
+		     $(addsuffix .d,$(tests) $(test-srcs)))
+endif
 +depfiles := $(addprefix $(objpfx),\
 			 $(filter-out $(addsuffix .d,$(omit-deps)),\
 				      $(+depfiles)))