1 OBJS = main.o framebuffer.o memory.o
4 nyax.img: stage1.out stage2.out stage3.out
5 cat stage{1,2,3}.out > nyax.img
7 stage1.out: mbr.asm stage2.out stage3.out
8 nasm -f bin mbr.asm -o stage1.out \
9 -dKSIZE=$$(du -cb stage{2,3}.out | tail -n1 | cut -f1)
12 nasm -f bin setup.asm -o stage2.out
14 stage3.out: $(OBJS) stage2.out
15 ld -o stage3.out --oformat binary $(OBJS) \
16 -Ttext $$(printf "%x\n" $$(echo $$(du -b stage2.out | cut -f1)+32256 | bc))
19 nasm -f elf64 $< -o $@
27 rm -rf *.o *.out *.img
30 dd if=./nyax.img of=$(DEV)