From 20621e073562ee5d423b636fae8b6aa8e38275fa Mon Sep 17 00:00:00 2001 From: stefan Date: Wed, 24 May 2023 22:29:46 -0400 Subject: readme and cleanup --- Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4beb6f1 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +TEST?=test/add.easm # you can use the enviornment variable TEST to specify what binary the "test" target will run +BIN=${TEST:%.easm=%.bin} + +build/vm: + mkdir -p build + (cd vm && go build -o ../$@) + +build/as: + (cd as && go build -o ../$@) + +test: build/vm ${BIN} + ./build/vm ${BIN} + +clean: + rm -rf build test/*.bin + +%.bin: %.easm build/as + ./build/as $< -o $@ + +.PHONY: test -- cgit v1.2.3