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>
This commit is contained in:
Jim Mussared
2023-08-03 15:57:02 +10:00
committed by Damien George
parent aa329d11ea
commit 2eda513870
7 changed files with 4 additions and 18 deletions

View File

@@ -547,9 +547,6 @@ $(BUILD)/%_gen.c $(HEADER_BUILD)/%.h $(HEADER_BUILD)/%_af_const.h $(BUILD)/%_qst
$(ECHO) "Create $@"
$(Q)$(PYTHON) $(MAKE_PINS) --board $(BOARD_PINS) --af $(AF_FILE) --prefix $(PREFIX_FILE) --hdr $(GEN_PINS_HDR) --qstr $(GEN_PINS_QSTR) --af-const $(GEN_PINS_AF_CONST) --af-py $(GEN_PINS_AF_PY) > $(GEN_PINS_SRC)
$(GEN_PINS_SRC:.c=.o): $(GEN_PINS_SRC)
$(call compile_c)
$(PY_BUILD)/nlr%.o: CFLAGS += -Os -fno-lto
include ../../py/mkrules.mk