summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornatrixaeria <upezu@student.kit.edu>2019-10-25 04:04:12 +0200
committernatrixaeria <upezu@student.kit.edu>2019-10-25 04:04:12 +0200
commitc8c64b5367f8b0f4db73d8963f7faff3c0cc4362 (patch)
tree0804d66b4afb1082713652f88113f0abb531397e
parent5b86e31087f6261dca28bb8c51a7a595998cc1d1 (diff)
Build all asm files automatically in build script
-rwxr-xr-xkernel/build.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/build.sh b/kernel/build.sh
index 919951b..14a864f 100755
--- a/kernel/build.sh
+++ b/kernel/build.sh
@@ -24,7 +24,9 @@ cleanup_temp() {
build_kernel_elf() {
create_target
- nasm -felf64 $ASM_PATH/multiboot_header.asm -o $OBJ_PATH/multiboot_header.o
+ for f in $ASM_PATH/*.asm; do
+ nasm -felf64 "$f" -o $OBJ_PATH/"$(basename $f)".o
+ done
nasm -felf64 $ASM_PATH/boot.asm -o $OBJ_PATH/boot.o
ld -n -o $TARGET_PATH/kernel.bin -T $LINK_SCRIPT_PATH/linker.ld $OBJ_PATH/*.o
cleanup_temp