aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTianhao Wang <shrik3@mailbox.org>2024-04-18 04:28:53 +0200
committerTianhao Wang <shrik3@mailbox.org>2024-06-11 15:16:34 +0200
commita0944efb047b0789598edc6236c0287d10aeab60 (patch)
treeb6c0e0bac72de3d12d747da7042fdba243d4b0fd /Makefile
parent26c7262747930cebbd20dd7194f1245798bacdf6 (diff)
chore
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index e7e3ac5..f83fb12 100644
--- a/Makefile
+++ b/Makefile
@@ -43,16 +43,18 @@ RUST_OBJECT = target/$(ARCH)-rustubs/$(RUST_BUILD)/librustubs.a
all: bootdisk.iso
bootdisk.iso : $(BUILD)/kernel
+ @echo "---BUILDING BOOTDISK IMAGE---"
$(VERBOSE) cp $< isofiles/boot/
- $(VERBOSE) grub-mkrescue -d /usr/lib/grub/i386-pc --locales=en@piglatin --themes=none -o bootdisk.iso isofiles
+ $(VERBOSE) grub-mkrescue -d /usr/lib/grub/i386-pc --locales=en@piglatin --themes=none -o bootdisk.iso isofiles > /dev/null 2>&1
# Note: explicitly tell the linker to use startup: as the entry point (we have no main here)
$(BUILD)/kernel : rust_kernel startup.o $(ASMOBJ_PREFIXED)
+ @echo "---LINKING ... ---"
$(VERBOSE) ld -static -e startup -T $(LINKER_SCRIPT) -o $@ $(BUILD)/startup.o $(ASMOBJ_PREFIXED) $(RUST_OBJECT)
# Note: this target works when the VPATH is set correctly
$(BUILD)/_%.o : %.s | $(BUILD)
- @echo "ASM $@"
+ @echo "---ASM $@"
@if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi
$(VERBOSE) $(ASM) -f $(ASMOBJFORMAT) $(ASMFLAGS) -o $@ $<
@@ -61,11 +63,13 @@ $(BUILD)/_%.o : %.s | $(BUILD)
# Compile the rust part: note that the the cargo crate is of type [staticlib], if you don't
# define this, the linker will have troubles, especially when we use a "no_std" build
rust_kernel: check
- cargo xbuild --target $(CARGO_XBUILD_TARGET) $(CARGO_XBUILD_FLAGS)
+ @echo "---BUILDING RUST KERNEL---"
+ @cargo xbuild --target $(CARGO_XBUILD_TARGET) $(CARGO_XBUILD_FLAGS)
# need nasm
# TODO make this arch dependent
startup.o: boot/startup-$(ARCH).s | $(BUILD)
+ @echo "---ASM $@"
@if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi
$(VERBOSE) $(ASM) -f $(ASMOBJFORMAT) $(ASMFLAGS) -o $(BUILD)/startup.o boot/startup-$(ARCH).s