From e620783a89b1f626ceb1304e52553fb674f0f61f Mon Sep 17 00:00:00 2001 From: CTCaer Date: Sat, 26 Dec 2020 16:17:03 +0200 Subject: [PATCH] Add tools cleanup with parrent clean --- Makefile | 2 +- tools/bin2c/Makefile | 2 +- tools/lz/Makefile | 2 +- tools/lz/lz77.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 09a5e16..70a6392 100755 --- a/Makefile +++ b/Makefile @@ -103,7 +103,7 @@ all: $(TARGET).bin $(LDRDIR) @if [ ${BIN_SIZE} -gt 126296 ]; then echo "\e[1;33mPayload size exceeds limit!\e[0m"; fi @echo "--------------------------------------" -clean: +clean: $(TOOLS) @rm -rf $(OBJS) @rm -rf $(BUILDDIR) @rm -rf $(OUTPUTDIR) diff --git a/tools/bin2c/Makefile b/tools/bin2c/Makefile index 2e64db4..e870ac8 100644 --- a/tools/bin2c/Makefile +++ b/tools/bin2c/Makefile @@ -10,7 +10,7 @@ all: bin2c @echo > /dev/null clean: - rm -f bin2c + @rm -f bin2c bin2c: bin2c.c @$(NATIVE_CC) -o $@ bin2c.c diff --git a/tools/lz/Makefile b/tools/lz/Makefile index 6a70564..3d6fec8 100644 --- a/tools/lz/Makefile +++ b/tools/lz/Makefile @@ -10,7 +10,7 @@ all: lz77 @echo > /dev/null clean: - rm -f lz77 + @rm -f lz77 lz77: lz.c lz77.c @$(NATIVE_CC) -o $@ lz.c lz77.c diff --git a/tools/lz/lz77.c b/tools/lz/lz77.c index 9ab159d..75b90a6 100644 --- a/tools/lz/lz77.c +++ b/tools/lz/lz77.c @@ -76,7 +76,7 @@ int main(int argc, char *argv[]) if (nbytes > out_size) goto error; - if((out_file = fopen(filename,"w")) == NULL) + if((out_file = fopen(filename,"wb")) == NULL) goto error; if (fwrite(out_buf, 1, nbytes, out_file) != nbytes)