summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2022-01-27 01:45:11 +0100
committerGustav Sörnäs <gustav@sornas.net>2022-01-27 03:01:42 +0100
commitfa8969c6b0ef432aa2c87dc2d034523cec88e79d (patch)
tree5debc77519b8524859f1306ff08570a4f6891f3d /Makefile
parentf913518b66fdd0b48420161d4f2114699b466d18 (diff)
downloadtsea83-fa8969c6b0ef432aa2c87dc2d034523cec88e79d.tar.gz
update makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 20 insertions, 8 deletions
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 >> $@