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