aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-09-05 10:37:55 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-09-05 10:37:55 +0200
commitda6b3f7055a0c142fd7f4f91348c35f87fe4cff2 (patch)
treecb9a71a2dcd626e5b1fbfc80fe6dd6da7078e725
parent474f870ea7af014808d109fa687b5c75d8861bd1 (diff)
downloadtabellion-time-domains-calculator.zip
tabellion-time-domains-calculator.tar.bz2
Starts the Time Domains Calculator.time-domains-calculator
-rw-r--r--time-domains-calculator/Makefile74
1 files changed, 74 insertions, 0 deletions
diff --git a/time-domains-calculator/Makefile b/time-domains-calculator/Makefile
new file mode 100644
index 0000000..25bdac1
--- /dev/null
+++ b/time-domains-calculator/Makefile
@@ -0,0 +1,74 @@
+## Parameters ##################################################################
+#### Where to find the model
+ifndef MODEL_DIR
+MODEL_DIR =
+endif
+
+#### Where to store the Instance model
+ifndef MODEL_TIME_DOMAINS_DIR
+MODEL_TIME_DOMAINS_DIR =
+endif
+
+#### Binaries
+###### JRE binary
+ifndef JAVA
+JAVA = java
+endif
+
+###### JDK binary
+ifndef JAVAC
+JAVAC = javac
+endif
+
+## Parameters Sanity Check #####################################################
+ifeq ($(strip $(MODEL_DIR)),)
+$(error No MODEL_DIR defined as parameter.)
+endif
+
+ifeq ($(strip $(MODEL_TIME_DOMAINS_DIR)),)
+$(error No MODEL_TIME_DOMAINS_DIR defined as parameter.)
+endif
+
+ifeq ($(strip $(JAVA)),)
+$(error No Java executable defined as parameter.)
+endif
+
+ifeq ($(strip $(JAVAC)),)
+$(error No Java compiler defined as parameter.)
+endif
+
+################################################################################
+CLASSPATH = "./src/"
+
+## Makefile Magic ##############################################################
+SOURCES = $(wildcard src/*.java)
+CLASSES = $(SOURCES:.java=.class)
+MODEL_FILES = $(wildcard $(MODEL_DIR)/*.mod)
+OUTPUT_FILE = $(MODEL_TIME_DOMAINS_DIR)/time_domains.mod
+
+## Makefile Rules ##############################################################
+compile: $(CLASSES)
+
+model: $(CLASSES) $(OUTPUT_FILE)
+
+solutions:
+
+clean:
+ rm -f $(CLASSES)
+ rm -f $(MODEL_TIME_DOMAINS_DIR)/*
+
+clean_model:
+ rm -f $(MODEL_TIME_DOMAINS_DIR)/*
+
+clean_solutions:
+
+########
+%.class: %.java
+ $(JAVAC) -cp $(CLASSPATH) $<
+
+$(OUTPUT_FILE): $(MODEL_FILES) $(CLASSES) $(MODEL_TIME_DOMAINS_DIR)
+ $(JAVA) -cp $(CLASSPATH) Main $(OUTPUT_FILE) $(MODEL_FILES)
+
+$(MODEL_TIME_DOMAINS_DIR):
+ mkdir -p $(MODEL_TIME_DOMAINS_DIR)
+