aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-08-21 12:18:13 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-08-21 12:31:12 -0400
commit351910c5ac8935341ffa31d644f5a6bbc54b02ed (patch)
tree2abbe737676b0dd7f4504773731bcdffa26680ad /Makefile
parent9c15f00e60ba6b05ca3f4188348833e24269c0e5 (diff)
downloadkutter-351910c5ac8935341ffa31d644f5a6bbc54b02ed.tar.gz
kutter-351910c5ac8935341ffa31d644f5a6bbc54b02ed.tar.xz
kutter-351910c5ac8935341ffa31d644f5a6bbc54b02ed.zip
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>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 6ce1c777..9bd6f9b3 100644
--- a/Makefile
+++ b/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)