summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'instr-to-kodkod/Makefile')
-rw-r--r--instr-to-kodkod/Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/instr-to-kodkod/Makefile b/instr-to-kodkod/Makefile
new file mode 100644
index 0000000..fb2662a
--- /dev/null
+++ b/instr-to-kodkod/Makefile
@@ -0,0 +1,25 @@
+JAVAC = javac
+JAVA = java
+SOURCES = $(wildcard src/*.java)
+CLASSES = $(SOURCES:.java=.class)
+CLASSPATH = "kodkod.jar:./src/:org.sat4j.core.jar"
+TEST_FILE = "./system_minus_fun.sl"
+DOWNLOADER = wget
+JAR_SOURCE = https://noot-noot.org/onera_2017/jar/
+REQUIRED_JARS = kodkod.jar org.sat4j.core.jar
+
+all: $(CLASSES)
+
+clean:
+ rm -f $(CLASSES)
+
+run: $(CLASSES) $(REQUIRED_JARS)
+ $(JAVA) -cp $(CLASSPATH) Main $(TEST_FILE)
+
+%.class: %.java $(REQUIRED_JARS)
+ $(JAVAC) -cp $(CLASSPATH) $<
+
+%.jar:
+ echo "Attempting to download missing jar '$@'"
+ $(DOWNLOADER) "$(JAR_SOURCE)/$@"
+