Generate and use compiler dep rules
SDCC supports the `-MMD` option. Use it instead of having every file depend on *all* the headers. Reduces incremental build time after modifying headers as it will now only rebuild the actual dependents and not the entire project. Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
committed by
Tim Crawford
parent
84fe76cad4
commit
9a52042f95
@@ -15,7 +15,7 @@ SCRATCH_CFLAGS=$(CFLAGS)
|
||||
|
||||
# Include scratch source
|
||||
SCRATCH_DIR=$(SYSTEM76_COMMON_DIR)/scratch
|
||||
SCRATCH_INCLUDE+=$(wildcard $(SCRATCH_DIR)/include/scratch/*.h) $(SCRATCH_DIR)/scratch.mk
|
||||
SCRATCH_INCLUDE += $(SCRATCH_DIR)/scratch.mk
|
||||
SCRATCH_CFLAGS+=-I$(SCRATCH_DIR)/include -D__SCRATCH__
|
||||
SCRATCH_SRC += $(foreach src, $(scratch-y), $(SCRATCH_DIR)/$(src))
|
||||
|
||||
@@ -24,6 +24,7 @@ SCRATCH_OBJ=$(sort $(patsubst src/%.c,$(SCRATCH_BUILD)/%.rel,$(SCRATCH_SRC)))
|
||||
SCRATCH_CC=\
|
||||
sdcc \
|
||||
-mmcs51 \
|
||||
-MMD \
|
||||
--model-small \
|
||||
--code-loc $(SCRATCH_OFFSET) \
|
||||
--code-size $(SCRATCH_SIZE) \
|
||||
|
Reference in New Issue
Block a user