Makefile: Rules depend on their output directories
This commit is contained in:
parent
de4855b86c
commit
b50ba19b1f
1 changed files with 3 additions and 3 deletions
6
Makefile
6
Makefile
|
@ -95,7 +95,7 @@ endif
|
||||||
vpath %.c $(SRC_DIR)
|
vpath %.c $(SRC_DIR)
|
||||||
|
|
||||||
define compile-objects
|
define compile-objects
|
||||||
$1/%.o: %.c
|
$1/%.o: %.c $1
|
||||||
$(vecho) "CC $$<"
|
$(vecho) "CC $$<"
|
||||||
$(CC_ARGS) -c $$< -o $$@
|
$(CC_ARGS) -c $$< -o $$@
|
||||||
$(CC_ARGS) -MM -MT $$@ -MF $$(@:.o=.d) $$<
|
$(CC_ARGS) -MM -MT $$@ -MF $$(@:.o=.d) $$<
|
||||||
|
@ -106,11 +106,11 @@ endef
|
||||||
|
|
||||||
all: checkdirs $(TARGET_OUT) $(FW_FILE_1) $(FW_FILE_2)
|
all: checkdirs $(TARGET_OUT) $(FW_FILE_1) $(FW_FILE_2)
|
||||||
|
|
||||||
$(FW_FILE_1): $(TARGET_OUT)
|
$(FW_FILE_1): $(TARGET_OUT) firmware
|
||||||
$(vecho) "FW $@"
|
$(vecho) "FW $@"
|
||||||
$(ESPTOOL) elf2image $< -o $(FW_BASE)/
|
$(ESPTOOL) elf2image $< -o $(FW_BASE)/
|
||||||
|
|
||||||
$(FW_FILE_2): $(TARGET_OUT)
|
$(FW_FILE_2): $(TARGET_OUT) firmware
|
||||||
$(vecho) "FW $@"
|
$(vecho) "FW $@"
|
||||||
$(ESPTOOL) elf2image $< -o $(FW_BASE)/
|
$(ESPTOOL) elf2image $< -o $(FW_BASE)/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue