X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=bootcensus;a=blobdiff_plain;f=Makefile;h=2a0ad5c56a6dac23930f6883bc3eec263d81bf67;hp=fcbe869f52863480173c535687ce454a934b9567;hb=10843571c724084c68d33d0438167d400cc8de2e;hpb=41e4fa8d02a2ca85c871c8cc3a4c6c93331cdfb3 diff --git a/Makefile b/Makefile index fcbe869..2a0ad5c 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,16 @@ -csrc = $(wildcard src/*.c) $(wildcard src/libc/*.c) $(wildcard src/test/*.c) -ssrc = $(wildcard src/*.s) $(wildcard src/libc/*.s) $(wildcard src/boot/*.s) $(wildcard src/test/*.s) +csrc = $(wildcard src/*.c) $(wildcard src/libc/*.c) $(wildcard src/census/*.c) +ssrc = $(wildcard src/*.s) $(wildcard src/libc/*.s) $(wildcard src/boot/*.s) $(wildcard src/census/*.s) Ssrc = $(wildcard src/*.S) obj = $(csrc:.c=.o) $(ssrc:.s=.o) $(Ssrc:.S=.o) dep = $(obj:.o=.d) -elf = test -bin = test.bin +elf = bcensus +bin = bcensus.bin 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) @@ -32,19 +32,19 @@ pcboot.iso: floppy.img rm -rf cdrom git archive --format=tar --prefix=cdrom/ HEAD | tar xf - cp $< cdrom - mkisofs -o $@ -V pcboot -b $< 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) @@ -72,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 $< $@