Add automatic dependencies
This commit is contained in:
parent
294553ee84
commit
24ee77720d
3 changed files with 16 additions and 2 deletions
6
Makefile
6
Makefile
|
@ -16,8 +16,10 @@ default: $(PROG).hex
|
|||
clean:
|
||||
rm -rf *.o drivers/*.o *.elf *.lst *.hex *.bin *.asm
|
||||
|
||||
# dependencies
|
||||
blink.elf: drivers/led.o
|
||||
# automatic dependencies
|
||||
include deps.mk
|
||||
deps.mk: *.c drivers/*.c
|
||||
for i in *.c; do echo $${i%.c}.elf: $$(./finddeps.sh "$$i"); echo; done > deps.mk
|
||||
|
||||
# generic rules
|
||||
%.o: %.c
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue