diff options
author | Marvin Borner | 2019-09-14 20:17:46 +0200 |
---|---|---|
committer | Marvin Borner | 2019-09-14 20:17:46 +0200 |
commit | 8bb8ed3f9e7d5edb4457a7fade7dbe215bd421d2 (patch) | |
tree | dd319a93d2648a7d4578f9cec7d9e13db4fe5758 /build.sh | |
parent | c0069e4bf3492b66808c424ed863898e0a1c1acf (diff) |
Abstracted VGA driver
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -10,8 +10,17 @@ mkdir ./build/ # Make source files i686-elf-as ./src/boot.s -o ./build/boot.o -i686-elf-gcc -c ./src/kernel.c -o ./build/kernel.o -std=gnu99 -ffreestanding -O2 -Wall -Wextra -i686-elf-gcc -T ./src/linker.ld -o ./build/melvix.bin -ffreestanding -O2 -nostdlib ./build/boot.o ./build/kernel.o -lgcc + +files="" +for line in $(find ./src -name \*.c); do + stripped=$(echo "${line}" | sed -r 's/\//_/g') + stripped=${stripped#??????} + stripped=${stripped%%?}o + i686-elf-gcc -c ./"${line}" -o ./build/"${stripped}" -std=gnu99 -ffreestanding -O2 -Wall -Wextra + files="${files} ./build/${stripped}" +done + +i686-elf-gcc -T ./src/linker.ld -o ./build/melvix.bin -ffreestanding -O2 -nostdlib ./build/boot.o $files -lgcc # Testing if grub-file --is-x86-multiboot ./build/melvix.bin; then |