summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authordzwdz2021-07-17 19:03:45 +0200
committerdzwdz2021-07-17 19:03:45 +0200
commitf84c55f194df088c291fc4359ccec1305be456ce (patch)
tree0476907b089c174adc6e72cfe780134cbd9cbe89 /Makefile
parent895108bbba356aa39920a42df1587211e424ef8b (diff)
basic boot module support
This loads a file from the boot disk into memory. Currently it just gets printed, but it's going to become a real executable soon.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 666c226..4b9ab02 100644
--- a/Makefile
+++ b/Makefile
@@ -9,13 +9,17 @@ QFLAGS = -no-reboot -d guest_errors,int,pcall,cpu_reset
OBJ = $(patsubst src/%.s,out/obj/%.s.o,$(shell find src/ -type f -name '*.s'))
OBJ += $(patsubst src/%.c,out/obj/%.c.o,$(shell find src/ -type f -name '*.c'))
-out/boot.iso: out/fs/boot/kernel.bin out/fs/boot/grub/grub.cfg
+out/boot.iso: out/fs/boot/kernel.bin out/fs/boot/grub/grub.cfg out/fs/boot/init
grub-mkrescue -o $@ out/fs/
out/fs/boot/grub/grub.cfg: grub.cfg
@mkdir -p $(@D)
cp $< $@
+out/fs/boot/init: src/test_module
+ @mkdir -p $(@D)
+ cp $< $@
+
out/fs/boot/kernel.bin: $(OBJ)
@mkdir -p $(@D)
$(CC) $(LFLAGS) -T linker.ld $^ -o $@