Generate lst files for every binary when in debug mode
This commit is contained in:
parent
cc28b42897
commit
f75cc3b620
16
Makefile
16
Makefile
@ -6,15 +6,18 @@ ROMS =
|
||||
|
||||
QEMU_ARCH = $(shell uname -m)
|
||||
QEMU = qemu-system-$(QEMU_ARCH)
|
||||
|
||||
QEMU_ARGS = $(addprefix --option-rom ,$(ROMS))
|
||||
|
||||
NASM = nasm
|
||||
NASM_ARGS = -s -I lib
|
||||
|
||||
ifdef KVM
|
||||
QEMU_ARGS += --enable-kvm
|
||||
endif
|
||||
|
||||
ifdef DEBUG
|
||||
ROMS += debug.rom
|
||||
NASM_ARGS += -l $(basename $@).lst
|
||||
endif
|
||||
|
||||
ifndef DISPLAY
|
||||
@ -23,22 +26,22 @@ endif
|
||||
|
||||
.PHONY: default clean qemu-rom qemu-floppy
|
||||
|
||||
default: rdos.sys
|
||||
default: fdimage.img
|
||||
|
||||
rdos.sys: kernel/*.asm lib/*.asm
|
||||
nasm -s -o $@ -l kernel.lst -I lib -I kernel kernel/main.asm
|
||||
$(NASM) $(NASM_ARGS) -o $@ -I kernel kernel/main.asm
|
||||
|
||||
rconfig.sys: config.txt
|
||||
cp $< $@
|
||||
|
||||
debug.rom: debug/*.asm lib/*.asm
|
||||
nasm -s -o $@ -I lib -I debug debug/main.asm && scripts/fix-rom.sh $@
|
||||
$(NASM) $(NASM_ARGS) -o $@ -I debug debug/main.asm && scripts/fix-rom.sh $@
|
||||
|
||||
boot/%.bs: boot/%.asm
|
||||
nasm -s -DFLOPPY=$(FLOPPY) -o $@ $<
|
||||
$(NASM) $(NASM_ARGS) -DFLOPPY=$(FLOPPY) -o $@ $<
|
||||
|
||||
programs/%.com: programs/%.asm
|
||||
nasm -s -I lib -o $@ $<
|
||||
$(NASM) $(NASM_ARGS) -o $@ $<
|
||||
|
||||
fdimage.img: boot/fat.bs $(DISTFILES)
|
||||
mformat -C -i $@ -f $(FLOPPY) -B boot/fat.bs ::
|
||||
@ -48,6 +51,7 @@ hdimage.img: boot/mbr.bs fdimage.img
|
||||
cat boot/mbr.bs fdimage.img >$@
|
||||
|
||||
clean:
|
||||
find -name '*.lst' -delete
|
||||
rm -f $$(cat .gitignore) programs/*.com boot/*.bs
|
||||
|
||||
qemu-floppy: fdimage.img $(ROMS)
|
||||
|
Loading…
Reference in New Issue
Block a user