Tweak temp files to be entirely seperate

This commit is contained in:
Ben V. Brown
2020-11-01 17:06:04 +11:00
parent 2a3cbd1986
commit fa06633539
2 changed files with 5 additions and 6 deletions

View File

@@ -95,8 +95,8 @@ $(shell find $(SOURCE_MIDDLEWARES_DIR) -type f -name '*.cpp')
HEXFILE_DIR=Hexfile
# temporary objects folder
OUTPUT_DIR=Objects
OUTPUT_BASE_DIR=Objects
OUTPUT_DIR=$(OUTPUT_BASE_DIR)/$(model)
# code optimisation ------------------------------------------------------------
OPTIM_AS= -Wall
OPTIM=-Os -finline-small-functions -findirect-inlining -fdiagnostics-color -ffunction-sections -fdata-sections
@@ -284,7 +284,6 @@ all: $(OUT_HEXFILE).hex $(OUT_HEXFILE).bin
$(OBJCOPY) $^ -O ihex $@
%.bin : %.elf
$(SIZE) $^
$(OBJCOPY) $^ -O binary $@
$(OUT_HEXFILE).elf : $(OUT_OBJS_S) $(OUT_OBJS) $(OUT_OBJS_CPP) Makefile $(LDSCRIPT)
@@ -315,7 +314,7 @@ $(OUT_OBJS_S): $(OUTPUT_DIR)/%.o: %.S Makefile
clean :
rm -Rf $(OUTPUT_DIR)
rm -Rf $(OUTPUT_BASE_DIR)
rm -Rf $(HEXFILE_DIR)

View File

@@ -132,9 +132,9 @@ if [ ${#BUILD_LANGUAGES[@]} -gt 0 ] && [ ${#BUILD_MODELS[@]} -gt 0 ]; then
make -j lang="$lang" model="$model" >/dev/null
checkLastCommand
echo "Cleanup Temp files for $model in $lang"
rm -rf Objects/Core/Threads >/dev/null
rm -rf Objects/*/Core/Threads >/dev/null
checkLastCommand
rm -rf Objects/Core/Src >/dev/null
rm -rf Objects/*/Core/Src >/dev/null
checkLastCommand
done
echo "Cleanup model change"