X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=bootcensus;a=blobdiff_plain;f=Makefile;h=2396eabf851c12bfd7c5d909f933b89be1b62a10;hp=07e856f17b36375fe72da64e15700791b19a1fb6;hb=78e3e75fc7b5838d0261c876d00e1b8c3e0bcfe0;hpb=bd35c984636a2d5dfdff7a80f8eaa4e388c6899c diff --git a/Makefile b/Makefile index 07e856f..2396eab 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ csrc = $(wildcard src/*.c) $(wildcard src/libc/*.c) $(wildcard src/test/*.c) -ssrc = $(wildcard src/*.s) $(wildcard src/libc/*.s) $(wildcard src/boot/*.s) +ssrc = $(wildcard src/*.s) $(wildcard src/libc/*.s) $(wildcard src/boot/*.s) $(wildcard src/test/*.s) Ssrc = $(wildcard src/*.S) obj = $(csrc:.c=.o) $(ssrc:.s=.o) $(Ssrc:.S=.o) dep = $(obj:.o=.d) @@ -10,7 +10,7 @@ warn = -pedantic -Wall #opt = -O2 dbg = -g inc = -Isrc -Isrc/libc -Isrc/test -gccopt = -fno-pic -ffreestanding -nostdinc -fno-builtin +gccopt = -fno-pic -ffreestanding -nostdinc -fno-builtin -ffast-math CFLAGS = $(ccarch) -march=i386 $(warn) $(opt) $(dbg) $(gccopt) $(inc) $(def) ASFLAGS = $(asarch) -march=i386 $(dbg) -nostdinc -fno-builtin $(inc) @@ -28,16 +28,23 @@ floppy.img: boot.img dd if=/dev/zero of=$@ bs=512 count=2880 dd if=$< of=$@ conv=notrunc +pcboot.iso: floppy.img + rm -rf cdrom + git archive --format=tar --prefix=cdrom/ HEAD | tar xf - + cp $< cdrom + mkisofs -o $@ -R -J -V pcboot -b $< cdrom + + boot.img: bootldr.bin $(bin) cat bootldr.bin $(bin) >$@ -# bootldr.bin will contain only .boot and .boot2 +# bootldr.bin will contain .boot, .boot2, .bootend, and .lowtext bootldr.bin: $(elf) - objcopy -O binary -j '.boot*' $< $@ + objcopy -O binary -j '.boot*' -j .lowtext $< $@ -# the main binary will contain every section *except* .boot and .boot2 +# the main binary will contain every section *except* those $(bin): $(elf) - objcopy -O binary -R '.boot*' $< $@ + objcopy -O binary -R '.boot*' -R .lowtext $< $@ $(elf): $(obj) $(LD) -o $@ $(obj) -Map link.map $(LDFLAGS) @@ -65,7 +72,7 @@ bootldr.disasm: $(elf) objdump -d $< -j .boot -j .boot2 -m i8086 >$@ $(elf).disasm: $(elf) - objdump -d $< -j .startup -j .text -m i386 >$@ + objdump -d $< -j .startup -j .text -j .lowtext -m i386 >$@ $(elf).sym: $(elf) objcopy --only-keep-debug $< $@