Makefile dependencies update

This commit is contained in:
Adrien Bourmault 2019-05-11 10:04:36 +02:00
parent cef3c37b89
commit 99a9bbaf5d
2 changed files with 16 additions and 13 deletions

View File

@ -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}

View File

@ -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