This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
csce410pine64backup/MP1/MP1_Sources/makefile
2017-05-30 20:22:42 -05:00

31 lines
721 B
Makefile

GCC_OPTIONS = -m32 -nostdlib -fno-builtin -nostartfiles -nodefaultlibs -fno-exceptions -fno-rtti -fno-stack-protector -fleading-underscore -fno-asynchronous-unwind-tables
all: kernel.bin
clean:
rm -f *.o *.bin
# ==== KERNEL ENTRY POINT ====
start.o: start.asm
nasm -f aout -o start.o start.asm
# ==== UTILITIES ====
utils.o: utils.H utils.C
gcc $(GCC_OPTIONS) -c -o utils.o utils.C
# ==== DEVICES ====
console.o: console.H console.C
gcc $(GCC_OPTIONS) -c -o console.o console.C
# ==== KERNEL MAIN FILE ====
kernel.o: kernel.C
gcc $(GCC_OPTIONS) -c -o kernel.o kernel.C
kernel.bin: start.o kernel.o console.o utils.o linker.ld
ld -melf_i386 -T linker.ld -o kernel.bin start.o kernel.o console.o utils.o