Commit 3a3c3806 authored by Alessandro Rubini's avatar Alessandro Rubini

Makefile: add a depend rule, long missing

Yesterday I was eventually fussed up by the need to "make clean" every
time. So here's a stupid depend rule, not perfect but better than
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <>
parent 225511b4
......@@ -16,3 +16,4 @@
......@@ -144,7 +144,8 @@ config.o: .config
$(AUTOCONF): silentoldconfig
rm -f $(OBJS) $(OUTPUT).elf $(OUTPUT).bin $(OUTPUT).ram $(LDS)
rm -f $(OBJS) $(OUTPUT).elf $(OUTPUT).bin $(OUTPUT).ram \
$(LDS) .depend
$(MAKE) -C $(PPSI) clean
$(MAKE) -C sdb-lib clean
$(MAKE) -C tools clean
......@@ -178,7 +179,9 @@ defconfig:
.config: silentoldconfig
# This forces more compilations than needed, but it's useful
# (we depend on .config and not on include/generated/autoconf.h
# because the latter is touched by silentoldconfig at each build)
$(obj-y): .config $(wildcard include/*.h)
# Trivial depend rule. We can't $(obj-y:.o=.c) because some objects come from
# assembly source. In glob avoid the toold directory, and ppsi/pp-printf
.depend: $(wildcard *.c [^pt]/*.c)
-include .depend
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment