From fa0663353921364b6702759f836ff7d2c7e61145 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sun, 1 Nov 2020 17:06:04 +1100 Subject: [PATCH] Tweak temp files to be entirely seperate --- workspace/TS100/Makefile | 7 +++---- workspace/TS100/build.sh | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/workspace/TS100/Makefile b/workspace/TS100/Makefile index 9330f4d1..8ff8429a 100644 --- a/workspace/TS100/Makefile +++ b/workspace/TS100/Makefile @@ -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) diff --git a/workspace/TS100/build.sh b/workspace/TS100/build.sh index 5004948b..b7928cd6 100755 --- a/workspace/TS100/build.sh +++ b/workspace/TS100/build.sh @@ -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"