summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-07-19 20:24:40 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-07-19 20:24:40 +0200
commit158f8ef180d4ea448b351599529db53ff5e88f8c (patch)
tree2982efaacb22dea8fb86850abc149b768ee428db /ast-to-instr/Makefile
parent0362751e41f731b22b7bfe511af4aa71a02be70a (diff)
Starting a Java implementation of ast-to-instr.
Keeping things clean, this time.
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)/$@"