From 264e6ebaa0816d0d2070090ebd7a75d7767929cb Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Tue, 8 Jul 2014 11:34:16 +0200 Subject: Merge in parts of the experimental branch --- Makefile | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 54aa45f..872c4e3 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,12 @@ -# FoolOS Makefile -# -IMAGE_SIZE=4096 + ##################### + # # + # FoolOS Makefile # + # # + ##################### + + +IMAGE_SIZE=1474560 all: FoolOS.img @@ -17,12 +22,20 @@ mbr.bin: boot/mbr.asm kernel_entry.o: boot/kernel_entry.asm nasm -f elf $^ -o $@ -kernel.o: kernel/kernel.c - gcc -ffreestanding -m32 -o $@ -c $^ -fno-asynchronous-unwind-tables +kernel.o: kernel/kernel.c kernel/console.h + gcc -ffreestanding -m32 -o $@ -c $< -fno-asynchronous-unwind-tables -O0 + +console.o: kernel/console.c kernel/console.h + gcc -ffreestanding -m32 -o $@ -c $< -fno-asynchronous-unwind-tables -O0 + +kernel.bin: kernel_entry.o kernel.o console.o + ld -o $@ -Ttext 0x1000 --oformat binary -melf_i386 $^ -O0 + +dump: + vboxmanage debugvm FoolOs dumpguestcore --filename dump.elf + xxd dump.elf > dump.xxd -kernel.bin: kernel_entry.o kernel.o - ld -o $@ -Ttext 0x1000 --oformat binary -melf_i386 $^ clean: - rm *.bin *.o *.img + -rm *.bin *.o *.img dump.elf dump.xxd .PHONY: all clean -- cgit v1.2.3