update makefile: fixes and enable listings per default

This commit is contained in:
Nero 2021-12-12 11:50:32 +00:00
parent 4d8406aa3a
commit b8672f0011
1 changed files with 4 additions and 5 deletions

View File

@ -1,4 +1,4 @@
PROGRAMS = hello.com
PROGRAMS = hello.com sys.com
KERNEL = @rdos.com
DISTFILES = $(KERNEL) $(PROGRAMS)
ROMS =
@ -8,10 +8,9 @@ QEMU_ARGS = $(addprefix --option-rom ,$(ROMS))
VERSION = $(shell git log -1 --format=%cd --date=format:%Y%m%d)
PRODUCT = rdos
LABEL = $(PRODUCT) $(VERSION)
NASM = nasm
NASM_ARGS = -s -Ilib --before "cpu 8086" -DPRODUCT=$(PRODUCT) -DVERSION=$(VERSION)
NASM_ARGS = -s -Isrc --before "cpu 8086" -DPRODUCT=$(PRODUCT) -DVERSION=$(VERSION)
QEMU_ARGS += $(shell test -w /dev/kvm && echo --enable-kvm)
@ -38,7 +37,7 @@ host/%.elf: host/%.c
# COM programs
%.com: src/%.asm src/*.inc
$(NASM) $(NASM_ARGS) -o $@ $<
$(NASM) $(NASM_ARGS) -l $(@:.com=.lst) -o $@ $<
# Bootloaders, first sector on partition
%.bs: boot/%.asm
@ -61,7 +60,7 @@ fat6.bs: boot/fat.asm
$(NASM) $(NASM_ARGS) -o $@ $< && $(FIXROM) $@
fd%.img: $(DISTFILES) $(SYS)
mformat -C -i $@ -f $* -c 2 -v "$(LABEL)" ::
mformat -C -i $@ -f $* -v "$(PRODUCT) $(VERSION)" ::
mcopy -i $@ $(DISTFILES) ::
$(SYS) $@ $(KERNEL)