summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2023-08-03 15:57:02 +1000
committerDamien George <damien@micropython.org>2023-11-03 13:57:47 +1100
commit2eda5138701d6a7d36f8d8e3700d136b3c1161b7 (patch)
tree7085560566359ef7cfa275cea0b65c62a4effd92 /py
parentaa329d11ea375b692342e76304b764b688a5f371 (diff)
py/mkrules.mk: Add rule for compiling auto-generated source files.
This prevents each port Makefile from having to add an explicit rule for `build-BOARD/pins_BOARD.c`. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'py')
-rw-r--r--py/mkrules.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/mkrules.mk b/py/mkrules.mk
index 8b21c7974..507655932 100644
--- a/py/mkrules.mk
+++ b/py/mkrules.mk
@@ -97,6 +97,10 @@ $(BUILD)/%.pp: %.c
$(ECHO) "PreProcess $<"
$(Q)$(CPP) $(CFLAGS) -Wp,-C,-dD,-dI -o $@ $<
+# Special case for compiling auto-generated source files.
+$(BUILD)/%.o: $(BUILD)/%.c
+ $(call compile_c)
+
# The following rule uses | to create an order only prerequisite. Order only
# prerequisites only get built if they don't exist. They don't cause timestamp
# checking to be performed.