mirror of
https://github.com/micropython/micropython.git
synced 2025-12-15 17:30:14 +01:00
py/mkrules.mk: Add %.sz rule to print size of an object file.
It's frequently the case that a developer will want to compare the object code size of various alternatives. When this can be done at the single object code level, the turnaround is faster. Provide a rule `$(BUILD)/%.sz` to print the size of a given object. Because it is a normal Makefile target that depends on an object file, it rebuilds the object file if needed. Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This commit is contained in:
committed by
Damien George
parent
70c4ffa770
commit
7e5c55dc2f
@@ -108,6 +108,10 @@ $(BUILD)/%.pp: %.c FORCE
|
||||
$(ECHO) "PreProcess $<"
|
||||
$(Q)$(CPP) $(CFLAGS) -Wp,-C,-dD,-dI -o $@ $<
|
||||
|
||||
.PHONY: $(BUILD)/%.sz
|
||||
$(BUILD)/%.sz: $(BUILD)/%.o
|
||||
$(Q)$(SIZE) $<
|
||||
|
||||
# Special case for compiling auto-generated source files.
|
||||
$(BUILD)/%.o: $(BUILD)/%.c
|
||||
$(call compile_c)
|
||||
|
||||
Reference in New Issue
Block a user