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:
4
Makefile
4
Makefile
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user