1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
CC = clang CFLAGS = \ -ffreestanding \ -nostdlib \ -nostdinc \ -mno-red-zone \ -mno-sse \ -mno-sse2 \ -target i386-unknown-elf .PHONY: all all: mbr .PHONY: mbr mbr: clang -Tlink.ld $(CFLAGS) mbr.S -o mbr.bin host/bootfs.sh rm -f mbr.bin