From 08a61ca3b59770b8cdd53ee94826456fbdf68c35 Mon Sep 17 00:00:00 2001 From: Vincent Barrilliot Date: Thu, 7 Dec 2023 20:39:53 +0100 Subject: [PATCH] Account for backslash as path separator on Windows --- src/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 8f4d23c..b9a275b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -182,17 +182,20 @@ endif # Define OS-dependent tools --------------------------------------------------- ifeq ("$(PAD_FLASH_SIZE)","") - # When compiling an image for flash, size to which the image must be padded + # When compiling an image for flash, size to which the image must be padded PAD_FLASH_SIZE = 524288 endif ifeq ($(OS),Windows_NT) RM = del /F/Q PAD_CMD = fsutil file seteof $@ $(PAD_FLASH_SIZE) + SEP= \$ # Leave this as is, it's a trick else RM = rm -f PAD_CMD = truncate -s $(PAD_FLASH_SIZE) $@ + SEP = / endif + # Flags (are automatically used by make) -------------------------------------- ASFLAGS := $(ASFLAGS) $(DEFINES) $(INCLUDES) CFLAGS := $(CFLAGS) $(DEFINES) $(INCLUDES) @@ -289,7 +292,7 @@ rsrc/bitmaps/splash_%.c: rsrc/bitmaps/splash_%.bmp # Clean up after a build clean: - $(RM) $(OBJS_TO_CLEAN) $(DEPS) foenixmcp.s37 *.lst *.map + $(RM) $(subst /,$(SEP),$(OBJS_TO_CLEAN)) $(subst /,$(SEP),$(DEPS)) foenixmcp.s37 *.lst *.map $(MAKE) --directory=$(CPU) clean $(MAKE) --directory=cli clean $(MAKE) --directory=dev clean