forked from jperezcu/arqui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompila
executable file
·22 lines (18 loc) · 928 Bytes
/
compila
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
echo -e "\033[31m "
cd ./bin
rm -rf *
nasm -f aout ../src/libasm.asm -o libasm.o
nasm -f aout ../src/kstart.asm -o kstart.o
nasm -f aout ../src/loader.asm -o kstart.o
gcc -g -m32 -c ../src/kernel.c -o kernel.o -fno-builtin -fno-stack-protector
gcc -g -m32 -c ../src/libc.c -o libc.o -fno-builtin -fno-stack-protector
gcc -g -m32 -c ../src/interrupts.c -o interrupts.o -fno-builtin -fno-stack-protector
gcc -g -m32 -c ../src/drivers/keyboard.c -o keyboard.o -fno-builtin -fno-stack-protector
gcc -g -m32 -c ../src/drivers/video.c -o video.o -fno-builtin -fno-stack-protector
gcc -g -m32 -c ../src/shell.c -o shell.o -fno-builtin -fno-stack-protector
echo ""
echo -e "\033[32m COMPILATION DONE, LINKING ... (errors under this line means compila is missing a .o)"
echo ""
ld -T ../src/link.ld -o kernel.bin kernel.o kstart.o libc.o libasm.o interrupts.o keyboard.o video.o shell.o
tput sgr0
cp ./kernel.bin ../isofiles/boot/