From cac01f0333205bc40189d661ed3e564bf8e057d1 Mon Sep 17 00:00:00 2001 From: "(Tim) Efthimis Kritikos" Date: Wed, 22 Feb 2023 01:51:14 +0000 Subject: [PATCH] Fixed Makefile bug --- Makefile | 8 +++++--- boot_code/Makefile | 1 + common.mk | 2 ++ system/Makefile | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0ccb678..02160a3 100644 --- a/Makefile +++ b/Makefile @@ -20,13 +20,15 @@ SYSTEM_VVP=system/system.vvp BOOT_CODE=boot_code/brainfuck.txt GTKWSAVE=./gtkwave_savefile.gtkw MICROCODE=system/ucode.txt +BOOTABLES=boot_code/brainfuck_compiled.txt boot_code/brainfuck_mandelbrot.txt ${BOOT_CODE} - +NO_ASM=1 include common.mk +.PHONY: ${BOOTABLES} +.PHONY: ${subst .txt,.bin,${BOOTABLES}} -.PHONY:${BOOT_CODE} -${BOOT_CODE}: +${BOOTABLES} ${subst .txt,.bin,${BOOTABLES}} : ${Q}make ${MAKEOPTS} -C boot_code $(subst boot_code/,,$@) boot_code/%.txt: diff --git a/boot_code/Makefile b/boot_code/Makefile index 7513d51..7cebfb1 100644 --- a/boot_code/Makefile +++ b/boot_code/Makefile @@ -11,6 +11,7 @@ brainfuck.bin: brainfuck_interpreter_v0.asm brainfuck_mandelbrot.bin: brainfuck_interpreter_v0.asm brainfuck_compiled.bin: brainfuck_compiler_v1.asm +NO_ASM=0 include ../common.mk clean: diff --git a/common.mk b/common.mk index 89ea108..02606a3 100644 --- a/common.mk +++ b/common.mk @@ -27,9 +27,11 @@ disas: $(subst .txt,.disas,${BOOT_CODE}) ${Q}xxd -ps -c 2 "$(subst .bin,.stage,$<)" > "$@" ${Q}rm "$(subst .bin,.stage,$<)" +ifeq "${NO_ASM}" "0" %.bin:%.asm ${QUIET_AS} ${Q}as86 -0 "$<" -b "$@" +endif # Running simulation %.lx2 %.memdump: %.txt ${SYSTEM_VVP} diff --git a/system/Makefile b/system/Makefile index 099d75c..bad380c 100644 --- a/system/Makefile +++ b/system/Makefile @@ -22,6 +22,7 @@ BOOT_CODE=boot_code.txt GTKWSAVE=../gtkwave_savefile.gtkw MICROCODE=ucode.txt +NO_ASM=0 include ../common.mk # COMPILING