Fixed Makefile bug

This commit is contained in:
(Tim) Efthimis Kritikos 2023-02-22 01:51:14 +00:00
parent 7fde422341
commit cac01f0333
4 changed files with 9 additions and 3 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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}

View File

@ -22,6 +22,7 @@ BOOT_CODE=boot_code.txt
GTKWSAVE=../gtkwave_savefile.gtkw
MICROCODE=ucode.txt
NO_ASM=0
include ../common.mk
# COMPILING