Makefile: Add generic rule for precompiling linker scripts

Add a general build rule to precompile *.lds.S files to *.ld files.
Remove the custom rules in src/atsamd/Makefile and src/stm32/Makefile.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2019-08-21 12:18:13 -04:00
parent 9c15f00e60
commit 351910c5ac
3 changed files with 12 additions and 18 deletions

View File

@@ -66,6 +66,10 @@ $(OUT)%.o: %.c $(OUT)autoconf.h $(OUT)board-link
@echo " Compiling $@"
$(Q)$(CC) $(CFLAGS) -c $< -o $@
$(OUT)%.ld: %.lds.S $(OUT)board-link
@echo " Preprocessing $@"
$(Q)$(CPP) -I$(OUT) -P -MD -MT $@ $< -o $@
################ Main build rules
$(OUT)board-link: $(KCONFIG_CONFIG)