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

View File

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