From fa8969c6b0ef432aa2c87dc2d034523cec88e79d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Thu, 27 Jan 2022 01:45:11 +0100 Subject: update makefile --- Makefile | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 74895e8..7ad317d 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,23 @@ -.PHONY: all -all: lab1upg2.out lab1upg3.out lab1ucode.out +PYTHON := python3.10 -lab1upg2.out: lab1asm.py lab1upg2.in - python3.10 lab1asm.py < lab1upg2.in > lab1upg2.out +.PHONY: all clean +all: lab1-upg2.mia lab1-upg3.mia lab1-test.mia -lab1upg3.out: lab1asm.py lab1upg3.in - python3.10 lab1asm.py < lab1upg3.in > lab1upg3.out +clean: + rm -f *.out -lab1ucode.out: lab1ucode.py lab1ucode.in - python3.10 lab1ucode.py < lab1ucode.in > lab1ucode.out +lab1-%.out: lab1-%.in lab1asm.py + $(info compiling $@) + @${PYTHON} lab1asm.py < $< > $@ + +lab1ucode.out: lab1ucode.in lab1ucode.py + $(info compiling ucode) + @${PYTHON} lab1ucode.py < $< > $@ + +lab1-%.mia: lab1-%.out lab1ucode.out lab1-postamble.mia + $(info linking $@) + @cat $< > $@ + @echo "" >> $@ + @cat lab1ucode.out >> $@ + @echo "" >> $@ + @cat lab1-postamble.mia >> $@ -- cgit v1.2.1