aboutsummaryrefslogtreecommitdiff
path: root/kernel/Makefile
diff options
context:
space:
mode:
authorMarvin Borner2020-08-09 23:42:57 +0200
committerMarvin Borner2020-08-09 23:42:57 +0200
commitf42aa2d995704c748c370d3e7b3684512361bc09 (patch)
tree2abf158ad5cc128d083789f9aea1145f0cfe0e6d /kernel/Makefile
parentf163a5d5f6802f63092229f0f9326e5fb44b7908 (diff)
Some build process changes
Diffstat (limited to 'kernel/Makefile')
-rw-r--r--kernel/Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/Makefile b/kernel/Makefile
index 1d47ffd..fa6d790 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -26,7 +26,7 @@ CFLAGS = $(CSFLAGS) -Wall -Wextra -nostdlib -nostdinc -ffreestanding -fno-builti
ASFLAGS = -f elf32 -O3
-all: compile
+all: compile bootloader
%.o: %.c
@$(CC) -c $(CFLAGS) $< -o $@
@@ -34,8 +34,11 @@ all: compile
%_asm.o: %.asm
@$(AS) $(ASFLAGS) $< -o $@
-compile: $(COBJS)
+bootloader:
@mkdir -p ../build/
@$(AS) -f bin entry.asm -o ../build/boot.bin
+
+compile: $(COBJS)
+ @mkdir -p ../build/
@$(LD) -N -ekernel_main -Ttext 0x00050000 -o ../build/kernel.bin -L../build/ $+ -lk --oformat binary
@$(CC) $(CFLAGS) -o ../build/debug.o -L../build/ $+ -lk