X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=Makefile;h=7fa61b9bb058acad8cd4bda6a59ef86a56553fbe;hb=eb934abaf0dcfa48589c6ac15f2a2ff235c5aea0;hp=d03487663b0f0945c2dd1fff40fe4e359fac05a3;hpb=e5b5905eb3134a409638a5a20462000ef159e1e6;p=bootcensus diff --git a/Makefile b/Makefile index d034876..7fa61b9 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,8 @@ warn = -pedantic -Wall dbg = -g inc = -Isrc -Isrc/libc -CFLAGS = $(ccarch) $(warn) $(dbg) -nostdinc -fno-builtin $(inc) $(def) -ASFLAGS = $(asarch) $(dbg) -nostdinc -fno-builtin $(inc) +CFLAGS = $(ccarch) -march=i386 $(warn) $(dbg) -nostdinc -fno-builtin $(inc) $(def) +ASFLAGS = $(asarch) -march=i386 $(dbg) -nostdinc -fno-builtin $(inc) LDFLAGS = $(ldarch) -T pcboot.ld -print-gc-sections @@ -20,6 +20,10 @@ ifneq ($(shell uname -m), i386) ldarch = -m elf_i386 endif +floppy.img: $(bin) + dd if=/dev/zero of=$@ bs=512 count=2880 + dd if=$< of=$@ conv=notrunc + $(bin): $(elf) objcopy -O binary $< $@ @@ -33,7 +37,7 @@ $(elf): $(obj) .PHONY: clean clean: - rm -f $(obj) $(bin) + rm -f $(obj) $(bin) floppy.img .PHONY: cleandep cleandep: @@ -41,4 +45,4 @@ cleandep: .PHONY: run run: $(bin) - qemu-system-i386 -fda $(bin) + qemu-system-i386 -fda floppy.img -serial file:serial.log