clean-up
This commit is contained in:
parent
4b46c9349c
commit
a0bf1215b1
53
Makefile
53
Makefile
|
@ -22,6 +22,29 @@
|
||||||
# along with OS/K. If not, see <https://www.gnu.org/licenses/>. #
|
# along with OS/K. If not, see <https://www.gnu.org/licenses/>. #
|
||||||
#=----------------------------------------------------------------------------=#
|
#=----------------------------------------------------------------------------=#
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
|
||||||
|
#Programs
|
||||||
|
ASM=nasm
|
||||||
|
LD=ld
|
||||||
|
ASMFLAGS=-f elf64
|
||||||
|
LDFLAGS= -melf_x86_64
|
||||||
|
|
||||||
|
#Folders
|
||||||
|
MBRDIR=boot/grub
|
||||||
|
LOADERDIR=boot/loader
|
||||||
|
OBJDIR=build/obj
|
||||||
|
BINDIR=build/bin
|
||||||
|
|
||||||
|
# Object to link (temp)
|
||||||
|
l_objects=./build/obj/kaleid/crtlib/memory.o ./build/obj/kaleid/crtlib/rand.o ./build/obj/kaleid/crtlib/string.o ./build/obj/kaleid/crtlib/ultoa.o ./build/obj/kaleid/crtlib/strtol.o ./build/obj/kaleid/crtlib/utoa.o ./build/obj/kaleid/crtlib/status.o ./build/obj/kaleid/crtlib/atoul.o ./build/obj/kaleid/crtlib/atol.o ./build/obj/kaleid/crtlib/itoa.o ./build/obj/kaleid/crtlib/ltoa.o ./build/obj/kaleid/crtlib/atou.o ./build/obj/kaleid/crtlib/arith.o ./build/obj/kaleid/crtlib/atoi.o ./build/obj/kaleid/extras/prog.o ./build/obj/kaleid/extras/argv.o ./build/obj/kaleid/kernel/init/table.o ./build/obj/kaleid/kernel/init/init.o ./build/obj/kaleid/kernel/io/vga.o ./build/obj/kaleid/kernel/io/cursor.o ./build/obj/kaleid/kernel/io/term.o ./build/obj/kaleid/kernel/ke/panic.o ./build/obj/boot/loader.o
|
||||||
|
|
||||||
|
#Color codes
|
||||||
|
CL='\033[0;32m'
|
||||||
|
CL2='\033[1;31m'
|
||||||
|
CL3='\033[0m'
|
||||||
|
NC='\033[1;37m'
|
||||||
|
|
||||||
kernel:
|
kernel:
|
||||||
cpp ./Makefile.in > build/Makefile.out
|
cpp ./Makefile.in > build/Makefile.out
|
||||||
python build/idttool.py
|
python build/idttool.py
|
||||||
|
@ -40,26 +63,6 @@ tests:
|
||||||
make tests -f build/Makefile.out.2
|
make tests -f build/Makefile.out.2
|
||||||
rm build/Makefile.out build/Makefile.out.2
|
rm build/Makefile.out build/Makefile.out.2
|
||||||
|
|
||||||
#Programs
|
|
||||||
ASM=nasm
|
|
||||||
LD=ld
|
|
||||||
ASMFLAGS=-f elf64
|
|
||||||
LDFLAGS= -melf_x86_64
|
|
||||||
|
|
||||||
#Folders
|
|
||||||
MBRDIR=boot/grub
|
|
||||||
LOADERDIR=boot/loader
|
|
||||||
OBJDIR=build/obj
|
|
||||||
BINDIR=build/bin
|
|
||||||
|
|
||||||
l_objects=./build/obj/kaleid/crtlib/memory.o ./build/obj/kaleid/crtlib/rand.o ./build/obj/kaleid/crtlib/string.o ./build/obj/kaleid/crtlib/ultoa.o ./build/obj/kaleid/crtlib/strtol.o ./build/obj/kaleid/crtlib/utoa.o ./build/obj/kaleid/crtlib/status.o ./build/obj/kaleid/crtlib/atoul.o ./build/obj/kaleid/crtlib/atol.o ./build/obj/kaleid/crtlib/itoa.o ./build/obj/kaleid/crtlib/ltoa.o ./build/obj/kaleid/crtlib/atou.o ./build/obj/kaleid/crtlib/arith.o ./build/obj/kaleid/crtlib/atoi.o ./build/obj/kaleid/extras/prog.o ./build/obj/kaleid/extras/argv.o ./build/obj/kaleid/kernel/init/table.o ./build/obj/kaleid/kernel/init/init.o ./build/obj/kaleid/kernel/io/vga.o ./build/obj/kaleid/kernel/io/cursor.o ./build/obj/kaleid/kernel/io/term.o ./build/obj/kaleid/kernel/ke/panic.o ./build/obj/boot/loader.o
|
|
||||||
|
|
||||||
#Color codes
|
|
||||||
CL='\033[0;32m'
|
|
||||||
CL2='\033[1;31m'
|
|
||||||
CL3='\033[0m'
|
|
||||||
NC='\033[1;37m'
|
|
||||||
|
|
||||||
boot.mbr: $(BINDIR)/disk.img $(MBRDIR)/grub.cfg
|
boot.mbr: $(BINDIR)/disk.img $(MBRDIR)/grub.cfg
|
||||||
@mkdir -p $(BINDIR)/disk
|
@mkdir -p $(BINDIR)/disk
|
||||||
@echo ${CL2}[boot.mbr]${NC} Installing MBR on image...${CL3}
|
@echo ${CL2}[boot.mbr]${NC} Installing MBR on image...${CL3}
|
||||||
|
@ -88,26 +91,26 @@ make_disk:
|
||||||
@$(MBRDIR)/create_disk.sh $(BINDIR)/disk.img
|
@$(MBRDIR)/create_disk.sh $(BINDIR)/disk.img
|
||||||
@echo ${CL2}[make_disk]${CL} OK${CL3}
|
@echo ${CL2}[make_disk]${CL} OK${CL3}
|
||||||
|
|
||||||
testloader: loader
|
test: kernel loader
|
||||||
@qemu-system-x86_64 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int -enable-kvm 2> qemu.log &
|
@qemu-system-x86_64 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int -enable-kvm 2> qemu.log &
|
||||||
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > loader_disasm64.asm
|
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > loader_disasm64.asm
|
||||||
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 32 > loader_disasm32.asm
|
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 32 > loader_disasm32.asm
|
||||||
|
|
||||||
|
|
||||||
testloader: loader
|
test32: kernel loader
|
||||||
@qemu-system-i386 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int -enable-kvm 2> qemu.log &
|
@qemu-system-i386 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int -enable-kvm 2> qemu.log &
|
||||||
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > loader_disasm64.asm
|
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > loader_disasm64.asm
|
||||||
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 32 > loader_disasm32.asm
|
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 32 > loader_disasm32.asm
|
||||||
|
|
||||||
testloader: loader
|
debug: kernel loader
|
||||||
@qemu-system-x86_64 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int -s -S -enable-kvm 2> qemu.log &
|
@qemu-system-x86_64 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int -s -S -enable-kvm 2> qemu.log &
|
||||||
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > loader_disasm64.asm
|
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > loader_disasm64.asm
|
||||||
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 32 > loader_disasm32.asm
|
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 32 > loader_disasm32.asm
|
||||||
|
|
||||||
boot: make_disk boot.mbr loader
|
boot: make_disk boot.mbr
|
||||||
@echo ${CL2}[[boot]]${CL} Terminated without error.${CL3}
|
@echo ${CL2}[[boot]]${CL} Terminated without error.${CL3}
|
||||||
|
|
||||||
all: kernel boot
|
all: boot kernel loader
|
||||||
@echo ${CL2}[[all]]${CL} Terminated without error.${CL3}
|
@echo ${CL2}[[all]]${CL} Terminated without error.${CL3}
|
||||||
|
|
||||||
link:
|
link:
|
||||||
|
|
Loading…
Reference in New Issue