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
nothing.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 225511b4
...@@ -16,3 +16,4 @@ ...@@ -16,3 +16,4 @@
.config.old .config.old
include/config include/config
include/generated include/generated
.depend
...@@ -144,7 +144,8 @@ config.o: .config ...@@ -144,7 +144,8 @@ config.o: .config
$(AUTOCONF): silentoldconfig $(AUTOCONF): silentoldconfig
clean: clean:
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 $(PPSI) clean
$(MAKE) -C sdb-lib clean $(MAKE) -C sdb-lib clean
$(MAKE) -C tools clean $(MAKE) -C tools clean
...@@ -178,7 +179,9 @@ defconfig: ...@@ -178,7 +179,9 @@ defconfig:
.config: silentoldconfig .config: silentoldconfig
# This forces more compilations than needed, but it's useful # Trivial depend rule. We can't $(obj-y:.o=.c) because some objects come from
# (we depend on .config and not on include/generated/autoconf.h # assembly source. In glob avoid the toold directory, and ppsi/pp-printf
# because the latter is touched by silentoldconfig at each build) .depend: $(wildcard *.c [^pt]/*.c)
$(obj-y): .config $(wildcard include/*.h) $(CC) $(CFLAGS) -DSDBFS_BIG_ENDIAN -MM $^ > $@
-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