1*d54927efSWei Huang# To specify cross compiler prefix, use CROSS_PREFIX= 2*d54927efSWei Huang# $ make CROSS_PREFIX=x86_64-linux-gnu- 3*d54927efSWei Huang 4*d54927efSWei Huang.PHONY: all clean 5*d54927efSWei Huangall: a-b-bootblock.h 6*d54927efSWei Huang 7*d54927efSWei Huanga-b-bootblock.h: x86.bootsect 8*d54927efSWei Huang echo "$$__note" > header.tmp 9*d54927efSWei Huang xxd -i $< | sed -e 's/.*int.*//' >> header.tmp 10*d54927efSWei Huang mv header.tmp $@ 11*d54927efSWei Huang 12*d54927efSWei Huangx86.bootsect: x86.boot 13*d54927efSWei Huang dd if=$< of=$@ bs=256 count=2 skip=124 14*d54927efSWei Huang 15*d54927efSWei Huangx86.boot: x86.o 16*d54927efSWei Huang $(CROSS_PREFIX)objcopy -O binary $< $@ 17*d54927efSWei Huang 18*d54927efSWei Huangx86.o: a-b-bootblock.S 19*d54927efSWei Huang $(CROSS_PREFIX)gcc -m32 -march=i486 -c $< -o $@ 20*d54927efSWei Huang 21*d54927efSWei Huangclean: 22*d54927efSWei Huang @rm -rf *.boot *.o *.bootsect 23