diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-05-20 16:03:33 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-05-21 11:44:57 +0200 |
commit | edba90fb16ec7224da591ab8f83efe3673853a3f (patch) | |
tree | 61b37be2e6e96a2163878e2df98e1f638ce5590e /Makefile | |
parent | d092feedb023a3d631a1cd549dd1d5c18d852ac7 (diff) | |
download | qboot-edba90fb16ec7224da591ab8f83efe3673853a3f.zip qboot-edba90fb16ec7224da591ab8f83efe3673853a3f.tar.gz qboot-edba90fb16ec7224da591ab8f83efe3673853a3f.tar.bz2 |
first commit
Based on x86/bios from lkvm
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0fb6c95 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +obj16-y = e820.o int10.o int15.o +obj-y = $(obj16-y) entry.o +all-y = bios.bin + +BIOS_CFLAGS += -m32 +BIOS_CFLAGS += -march=i386 +BIOS_CFLAGS += -mregparm=3 +BIOS_CFLAGS += -fno-stack-protector +BIOS_CFLAGS += -Iinclude +$(obj16-y): BIOS_CFLAGS += -include code16gcc.h + +all: $(all-y) + +.PRECIOUS: %.o +%.o: %.c + $(CC) $(CFLAGS) $(BIOS_CFLAGS) -c -s $< -o $@ +%.o: %.S + $(CC) $(CFLAGS) $(BIOS_CFLAGS) -c -s $< -o $@ + +bios.bin.elf: $(obj-y) rom.ld.S + $(LD) -T rom.ld.S -o bios.bin.elf $(obj-y) + +bios.bin: bios.bin.elf + objcopy -O binary bios.bin.elf bios.bin + +clean: + rm $(obj-y) $(all-y) bios.bin.elf |