From 99a9bbaf5d8258373fb968e5e989effb22be80b5 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Sat, 11 May 2019 10:04:36 +0200 Subject: [PATCH] Makefile dependencies update --- Makefile | 22 +++++++++++++--------- ProjectTree | 7 +++---- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 2cfe0e6..71f7151 100644 --- a/Makefile +++ b/Makefile @@ -222,6 +222,16 @@ install_mbr: $(BINDIR)/disk.img $(MBRDIR)/grub.cfg @rmdir $(BINDIR)/disk @echo ${CL2}[$@] ${CL}Success.${CL3} +copy_kernel: + @mkdir -p $(BINDIR)/disk + @echo ${CL2}[$@] ${NC}Integrating kernel${CL3} + -@$(MBRDIR)/umount.sh $(BINDIR)/disk || /bin/true + @$(MBRDIR)/mount.sh $(BINDIR)/disk.img $(BINDIR)/disk + @cp $(BINDIR)/kaleid $(BINDIR)/disk/boot/kaleid + @$(MBRDIR)/umount.sh $(BINDIR)/disk + @echo ${CL2}[$@] ${CL}Success.${CL3} + @rmdir $(BINDIR)/disk + dust: -@$(MBRDIR)/umount.sh $(BINDIR)/disk || /bin/true @rm -Rf $(OBJDIR)/* @@ -235,6 +245,7 @@ clean: $(BINDIR)/kaleid: $(LOBJDIR)/kaleid.x86_64 @echo ${CL2}[$@] ${NC}Objcopy...${CL3} @$(OBJCOPY) -I elf64-x86-64 -O elf32-i386 $(LOBJDIR)/kaleid.x86_64 $(BINDIR)/kaleid + @make copy_kernel @echo ${CL2}[$@] ${CL}Success.${CL3} $(LOBJDIR)/kaleid.x86_64: $(LibCObj) $(KernObj) $(LOBJDIR)/loader.o @@ -257,12 +268,5 @@ $(BINDIR)/disk.img: $(MBRDIR)/create_disk.sh @make install_mbr @echo ${CL2}[$@]${NC} Constructing disk image...${CL3} -OS/K: $(BINDIR)/kaleid $(BINDIR)/disk.img ./ProjectTree - @mkdir -p $(BINDIR)/disk - @echo ${CL2}[[$@]] ${NC}Integrating kernel, $(mode) mode.${CL3} - -@$(MBRDIR)/umount.sh $(BINDIR)/disk || /bin/true - @$(MBRDIR)/mount.sh $(BINDIR)/disk.img $(BINDIR)/disk - @cp $(BINDIR)/kaleid $(BINDIR)/disk/boot/kaleid - @$(MBRDIR)/umount.sh $(BINDIR)/disk - @echo ${CL2}[[$@]] ${CL}Success.${CL3} - @rmdir $(BINDIR)/disk +OS/K: $(BINDIR)/disk.img $(BINDIR)/kaleid ./ProjectTree + @echo ${CL2}[[$@]] ${NC} OS/K successfully made, $(mode) mode.${CL3} diff --git a/ProjectTree b/ProjectTree index cd1f48c..ec950f0 100644 --- a/ProjectTree +++ b/ProjectTree @@ -152,9 +152,8 @@ │   │   ├── strtol.d │   │   └── strtol.o │   ├── grub.log -│   ├── kaleid32_disasm.asm -│   ├── kaleid64_disasm.asm -│   └── kernel.ld +│   ├── kernel.ld +│   └── qemu.log ├── include │   ├── base │   │   ├── assert.h @@ -259,4 +258,4 @@ ├── ProjectTree └── README.md -41 directories, 193 files +41 directories, 192 files