From bc1dcacfc0b7045f8979845afa242fd0f85faad5 Mon Sep 17 00:00:00 2001 From: "(Tim) Efthimis Kritikos" Date: Thu, 7 Dec 2023 18:44:31 +0000 Subject: [PATCH] Build system: Fixed a bug with building the boot_code/ directory with a lot of make jobs --- boot_code/Makefile | 13 +++++++------ common.mk | 8 ++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/boot_code/Makefile b/boot_code/Makefile index ae3f938..2756dda 100644 --- a/boot_code/Makefile +++ b/boot_code/Makefile @@ -1,10 +1,11 @@ -SOURCE=brainfuck_interpreted.asm brainfuck_compiled.asm brainfuck_mandelbrot.asm pipeline_ideal.asm fibonacci.asm gnome_sort.asm cache_fill_and_empty.asm colored_led.asm bios.asm -BINARIES=$(subst .asm,.txt,${SOURCE}) $(subst .asm,.stxt,${SOURCE}) +SOURCE_FULL=brainfuck_interpreted.asm brainfuck_compiled.asm brainfuck_mandelbrot.asm pipeline_ideal.asm fibonacci.asm gnome_sort.asm cache_fill_and_empty.asm colored_led.asm +SOURCE_SHORT=bios.asm +BINARIES=$(subst .asm,.txt,${SOURCE_FULL}) $(subst .asm,.stxt,${SOURCE_SHORT}) BUILD_FILES=${BINARIES} -BUILD_FILES+=$(subst .asm,.memdump,${SOURCE}) -BUILD_FILES+=$(subst .asm,.fst,${SOURCE}) -BUILD_FILES+=$(subst .asm,.bin,${SOURCE}) -BUILD_FILES+=$(subst .asm,.json,${SOURCE}) +BUILD_FILES+=$(subst .asm,.memdump,${SOURCE_FULL} ${SOURCE_SHORT}) +BUILD_FILES+=$(subst .asm,.fst,${SOURCE_FULL} ${SOURCE_SHORT}) +BUILD_FILES+=$(subst .asm,.bin,${SOURCE_FULL} ${SOURCE_SHORT}) +BUILD_FILES+=$(subst .asm,.json,${SOURCE_FULL} ${SOURCE_SHORT}) all: ${BINARIES} diff --git a/common.mk b/common.mk index b85e72f..5fc5032 100644 --- a/common.mk +++ b/common.mk @@ -74,10 +74,10 @@ disas: $(subst .txt,.disas,${BOOT_CODE}) # Assembling code %.txt:%.bin - ${Q}dd if=/dev/zero bs=1 count=65536 of="$(subst .bin,.stage,$<)" status=none - ${Q}dd if="$<" of="$(subst .bin,.stage,$<)" conv=notrunc,nocreat status=none - ${Q}xxd -ps -c 2 "$(subst .bin,.stage,$<)" > "$@" - ${Q}rm "$(subst .bin,.stage,$<)" + ${Q}dd if=/dev/zero bs=1 count=65536 of="$(subst .bin,.stage_short,$<)" status=none + ${Q}dd if="$<" of="$(subst .bin,.stage_short,$<)" conv=notrunc,nocreat status=none + ${Q}xxd -ps -c 2 "$(subst .bin,.stage_short,$<)" > "$@" + ${Q}rm "$(subst .bin,.stage_short,$<)" ifeq "${NO_ASM}" "0"