blob: 6db785e4667985643f342fb7d67d6219d474134a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
## Target(s) Configuration #####################################################
MODEL_FILE = "../data/instructions/example_1.sl"
LEVEL_DIR = "../data/level/"
## Executables #################################################################
JAVAC = javac
JAVA = java
DOWNLOADER = wget
## Java Config #################################################################
CLASSPATH = "kodkod.jar:./src/:org.sat4j.core.jar"
## Dependencies ################################################################
JAR_SOURCE = https://noot-noot.org/onera_2017/jar/
REQUIRED_JARS = kodkod.jar org.sat4j.core.jar
## 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 $(LEVEL_DIR) $(MODEL_FILE)
%.class: %.java $(REQUIRED_JARS)
$(JAVAC) -cp $(CLASSPATH) $<
%.jar:
echo "Attempting to download missing jar '$@'"
$(DOWNLOADER) "$(JAR_SOURCE)/$@"
|