mirror of https://github.com/rusefi/rusefi.git
add clean hook
This commit is contained in:
parent
f5714db30a
commit
674b4f1563
|
@ -387,6 +387,14 @@ include rusefi_pch.mk
|
|||
|
||||
include bundle.mk
|
||||
|
||||
.PHONY: CLEAN_RULE_HOOK CLEAN_PCH_HOOK CLEAN_BUNDLE_HOOK
|
||||
|
||||
CLEAN_RULE_HOOK: CLEAN_PCH_HOOK CLEAN_BUNDLE_HOOK
|
||||
|
||||
CLEAN_PCH_HOOK:
|
||||
|
||||
CLEAN_BUNDLE_HOOK:
|
||||
|
||||
POST_MAKE_ALL_RULE_HOOK: $(BUILDDIR)/$(PROJECT).elf
|
||||
@java -jar ../java_tools/gcc_map_reader.jar $(BUILDDIR)/$(PROJECT).map | grep Total || echo Unable to run gcc_map_reader
|
||||
@$(TRGT)objdump -h $(BUILDDIR)/$(PROJECT).elf | grep -w ram4
|
||||
|
|
|
@ -153,7 +153,7 @@ CONFIG = $(PROJECT_DIR)/config
|
|||
# Licensing files.
|
||||
include $(CHIBIOS)/os/license/license.mk
|
||||
# Startup files.
|
||||
include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/$(CPU_STARTUP)
|
||||
include $(CPU_STARTUP_DIR)
|
||||
# HAL-OSAL files (optional).
|
||||
include $(CHIBIOS_CONTRIB)/os/hal/hal.mk
|
||||
include $(CPU_PLATFORM)
|
||||
|
@ -165,13 +165,13 @@ include $(CHIBIOS)/os/various/cpp_wrappers/chcpp.mk
|
|||
# EX files (optional).
|
||||
include $(CHIBIOS)/os/hal/lib/streams/streams.mk
|
||||
|
||||
BOARD_DIR := ../$(BOARD_DIR)
|
||||
BOARD_META_PATH := ../$(BOARD_META_PATH)
|
||||
BOARDINC = $(BOARD_DIR)
|
||||
include $(BOARD_DIR)/board.mk
|
||||
|
||||
ifeq (,$(filter clean,$(MAKECMDGOALS)))
|
||||
ifeq ($(SHORT_BOARD_NAME),)
|
||||
$(error SHORT_BOARD_NAME not set, something wrong with your board.mk file)
|
||||
$(error SHORT_BOARD_NAME not set, something wrong with your meta-info.env file)
|
||||
endif
|
||||
endif
|
||||
DDEFS += -DSHORT_BOARD_NAME=$(SHORT_BOARD_NAME)
|
||||
|
||||
|
@ -357,3 +357,9 @@ ULIBS = -lm --specs=nano.specs
|
|||
|
||||
include $(RULESFILE)
|
||||
include $(PROJECT_DIR)/rusefi_pch.mk
|
||||
|
||||
.PHONY: CLEAN_RULE_HOOK CLEAN_PCH_HOOK
|
||||
|
||||
CLEAN_RULE_HOOK: CLEAN_PCH_HOOK
|
||||
@echo Cleaning-BLT
|
||||
-rm -fR $(BUILDDIR)/*
|
||||
|
|
|
@ -23,7 +23,7 @@ endif
|
|||
endif
|
||||
|
||||
$(BOOTLOADER_HEX) $(BOOTLOADER_BIN) &:
|
||||
$(MAKE) -C bootloader -r
|
||||
BOARD_DIR=../$(BOARD_DIR) BOARD_META_PATH=../$(BOARD_META_PATH) $(MAKE) -C bootloader -r
|
||||
|
||||
$(BUILDDIR)/$(PROJECT).map: $(BUILDDIR)/$(PROJECT).elf
|
||||
|
||||
|
@ -44,3 +44,8 @@ deliver:
|
|||
mkdir -p deliver
|
||||
|
||||
bundle: $(BUNDLEFILES) all
|
||||
|
||||
CLEAN_BUNDLE_HOOK:
|
||||
@echo Cleaning bundle
|
||||
BOARD_DIR=../$(BOARD_DIR) BOARD_META_PATH=../$(BOARD_META_PATH) $(MAKE) -C bootloader clean
|
||||
rm -rf $(FOLDER)
|
||||
|
|
|
@ -21,8 +21,6 @@ $(TCPPOBJS) : $(PCHOBJ)
|
|||
$(ACPPOBJS) : $(PCHOBJ)
|
||||
|
||||
# Delete PCH output on clean
|
||||
CLEAN_RULE_HOOK:
|
||||
CLEAN_PCH_HOOK:
|
||||
@echo Cleaning PCH
|
||||
rm -f $(PCHOBJ)
|
||||
@echo Cleaning-BLT
|
||||
-rm -fR build-openblt
|
||||
|
|
Loading…
Reference in New Issue