diff --git a/Makefile b/Makefile index 5632308..96f75c8 100644 --- a/Makefile +++ b/Makefile @@ -3,17 +3,18 @@ KERNEL = @rdos.com DISTFILES = $(KERNEL) $(PROGRAMS) ROMS = -QEMU = qemu-system-i386 -QEMU_ARGS = $(addprefix --option-rom ,$(ROMS)) - VERSION = $(shell git log -1 --format=%cd --date=format:%Y%m%d) PRODUCT = rdos +QEMU = qemu-system-i386 +QEMU_ARGS = $(addprefix --option-rom ,$(ROMS)) +QEMU_ARGS += $(shell test -w /dev/kvm && echo --enable-kvm) + +METRIC = stat -c '%8s %n' + NASM = nasm NASM_ARGS = -s -Isrc --before "cpu 8086" -DPRODUCT=$(PRODUCT) -DVERSION=$(VERSION) -QEMU_ARGS += $(shell test -w /dev/kvm && echo --enable-kvm) - ifdef DEBUG ROMS += dprintf.rom NASM_ARGS += -l $(basename $@).lst -DDEBUG=1 @@ -38,6 +39,7 @@ host/%.elf: host/%.c # COM programs %.com: src/%.asm src/*.inc $(NASM) $(NASM_ARGS) -l $(@:.com=.lst) -o $@ $< + $(METRIC) $@ # Bootloaders, first sector on partition %.bs: boot/%.asm