summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ast-to-instr/Makefile')
-rw-r--r--ast-to-instr/Makefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/ast-to-instr/Makefile b/ast-to-instr/Makefile
new file mode 100644
index 0000000..59bc9bb
--- /dev/null
+++ b/ast-to-instr/Makefile
@@ -0,0 +1,34 @@
+INPUT_FILE = ../data/ast/*.xml
+
+## Executables #################################################################
+JAVAC = javac
+JAVA = java
+DOWNLOADER = wget
+
+## Java Config #################################################################
+CLASSPATH = "./src/"
+
+## Dependencies ################################################################
+JAR_SOURCE = https://noot-noot.org/onera_2017/jar/
+REQUIRED_JARS =
+
+## Makefile Magic ##############################################################
+SOURCES = $(wildcard src/*.java)
+CLASSES = $(SOURCES:.java=.class)
+
+## Makefile Rules ##############################################################
+
+all: $(CLASSES)
+
+clean:
+ rm -f $(CLASSES)
+
+run: $(CLASSES) $(REQUIRED_JARS)
+ $(JAVA) -cp $(CLASSPATH) Main $(INPUT_FILE)
+
+%.class: %.java $(REQUIRED_JARS)
+ $(JAVAC) -cp $(CLASSPATH) $<
+
+%.jar:
+ echo "Attempting to download missing jar '$@'"
+ $(DOWNLOADER) "$(JAR_SOURCE)/$@"