summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorBenji Dial <Benji3.141@gmail.com>2019-12-24 00:16:05 -0500
committerBenji Dial <Benji3.141@gmail.com>2019-12-24 00:16:05 -0500
commita947a7a143029ee8ef5cb4a4232d7439b8a79670 (patch)
tree69ee1c58837efee95091781b12456a09f820357c /makefile
parente520b52cd58f70af9a17f330fe1ce98ce059762c (diff)
downloadportland-os-a947a7a143029ee8ef5cb4a4232d7439b8a79670.tar.gz
small changes, part 2, rewriting bootloader partially, giving up on this branch
Diffstat (limited to 'makefile')
-rw-r--r--makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/makefile b/makefile
index 088a233..229b665 100644
--- a/makefile
+++ b/makefile
@@ -9,8 +9,13 @@ floppy: bootloader fs
bootloader: obj
nasm src/bootloader.asm -o obj/bootloader.bin
-kernel: fs
- gcc src/kernel/*.c -o out/fs/kernel.sys -ffreestanding -nostdlib -m32 -T src/kernel/link.ld
+kernel: obj fs
+ gcc src/kernel/*.c -o obj/kernel.elf -ffreestanding -nostdlib -m32 -fno-asynchronous-unwind-tables
+ ld obj/kernel.elf -o obj/kernel-stripped.elf -T src/kernel/link.ld -s --orphan-handling=discard -m elf_i386
+ objcopy obj/kernel-stripped.elf out/fs/kernel.sys -O binary
+
+clean:
+ rm -r obj out
fs: out
mkdir -p out/fs