-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (33 loc) · 1.89 KB
/
Makefile
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Location of mirah library files
MVD_MIRAH_LIBRARY = /Users/jdim006/Codes/MVD-project/develop-mvd/mvd-lib/src/
MVD_MIRAH_INCLUDES = "$(MVD_MIRAH_LIBRARY)make_query.mirah"
# Location of mirah extension macro jar, which needs to be present when compiling an MVD
MVD_MIRAH_JAR = /Users/jdim006/Codes/MVD-project/develop-mvd/mvd-extension-macros/mvd-macros.jar
# Path to BIMserver jars
BIMSERVER_PATH = /Users/jdim006/Desktop/BIMserver/bimserver-1.4.0-FINAL-2015-11-04/lib/
BIMSERVER_JARS = "$(BIMSERVER_PATH)org.eclipse.emf.common_2.9.1.v20130827-0309.jar:$(BIMSERVER_PATH)org.eclipse.emf_2.6.0.v20130902-0605.jar:$(BIMSERVER_PATH)org.eclipse.emf.ecore_2.9.1.v20130827-0309.jar:$(BIMSERVER_PATH)bimserver-1.4.0-FINAL-2015-11-04-shared.jar:$(BIMSERVER_PATH)bimserver-1.4.0-FINAL-2015-11-04.jar:$(BIMSERVER_PATH)commons-io-1.4.jar:$(BIMSERVER_PATH)guava-18.0.jar"
QUERY_PLUGIN_PATH = ../MVD-project/BIMserver-query-plugin-shell/
MIRAH_PARSER_PATH = /Users/jdim006/Codes/mirah-0.2.1/lib/mirah-complete.jar
OTHER_JARS = "$(QUERY_PLUGIN_PATH)BIMserver-query-plugin-shell.jar:$(MIRAH_PARSER_PATH):$(MVD_MIRAH_JAR)"
# Build directories
PACKAGE_DIR = com/arcabim/mvdlibtest/
TEMP_DIR = temp/
INTERMEDIATE = "$(PACKAGE_DIR)result.mirah"
ARTIFACTS = built/
# Location to output mvd jar
OUTPUT_MVD_JAR = mvd.jar
$(OUTPUT_MVD_JAR): $(INTERMEDIATE)
mirahc -classpath "$(BIMSERVER_JARS):$(OTHER_JARS)" -d "$(ARTIFACTS)" $(INTERMEDIATE)
cd "$(ARTIFACTS)" && jar cf mvd.jar * && cd -
mv "$(ARTIFACTS)"mvd.jar "$(OUTPUT_MVD_JAR)"
#Example MIRAH_TARGETS = $(PACKAGE_DIR)map.mirah $(PACKAGE_DIR)reduce.mirah
# both map.mirah and reduce.mirah will get cat into INTERMEDIATE (see cat line below)
MIRAH_TARGETS = $(PACKAGE_DIR)filter.mirah
$(INTERMEDIATE): $(MIRAH_TARGETS)
mkdir -p "$(TEMP_DIR)"
cat $(MVD_MIRAH_INCLUDES) $^ >$@
all: $(OUTPUT_MVD_JAR)
clean:
rm -rf $(ARTIFACTS) "$(TEMP_DIR)"
.DEFAULT_GOAL := all
.PHONY: clean