From 0c94897441ef6ba6665746519036aeb9d1d570ec Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 20 Nov 2024 11:49:58 +0100 Subject: Ensure the environment is clean on QEMU launch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the library code can now be exchanged between tests and the actual kernel, there might be a missmatch when launching QEMU after calling `make all`. Ensure that this cannot happen by calling `clean` on the `qemu` target. Signed-off-by: Miquel Sabaté Solà --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 2a2751d..385bb66 100644 --- a/Makefile +++ b/Makefile @@ -81,11 +81,11 @@ $(KRNL): $(OBJ) $(LINKER).S .c.o: $(E) " CC " $(basename $@) - $(Q) $(CC) $(CCFLAGS) $(KRNLFLAGS) -c $< -o $@ + $(Q) $(CC) $(CCFLAGS) -c $< -o $@ .S.o: $(E) " CC " $(basename $@) - $(Q) $(CC) $(CCFLAGS) -D__ASSEMBLY__ -D__KERNEL__ -c $< -o $@ + $(Q) $(CC) $(CCFLAGS) -D__ASSEMBLY__ -c $< -o $@ ## # User space @@ -97,7 +97,7 @@ usr: $(USR) usr/src/%.o: usr/src/%.S $(E) " CC " $(basename $@) - $(Q) $(CC) $(ASFLAGS) -D__ASSEMBLY__ -D__KERNEL__ -c $< -o $@ + $(Q) $(CC) $(ASFLAGS) -D__ASSEMBLY__ -c $< -o $@ usr/bin/%: usr/src/%.o $(Q) mkdir -p usr/bin/ @@ -129,7 +129,7 @@ test/%: test/%.o # Hacking .PHONY: qemu -qemu: $(KRNL) usr +qemu: clean $(KRNL) usr ifeq ($(strip $(QEMU_BIOS)),) $(Q) $(QEMU) $(QEMU_FLAGS) -machine virt -kernel $(KRNL) -initrd $(INIT) else -- cgit v1.2.3