-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·72 lines (49 loc) · 2.5 KB
/
Makefile
File metadata and controls
executable file
·72 lines (49 loc) · 2.5 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
-include Makefile.config
DEFAULT_FLAGS?=-default-type int64 -default-type word64
MPL_FLAGS?=-detect-entanglement true -disable-pass splitTypes1 -disable-pass splitTypes2
QUARTZ_LINKS=-link-opt 'quartz.o -lquartz_runtime -lstdc++'
FFI_FLAGS?=-default-ann 'allowFFI true' -export-header export.h
MPL=/root/mpl-em/build/bin/mpl
DEBUG=-const 'Exn.keepHistory true'
MLTON=mlton
#JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
QUESO_INCLUDE=-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -L$(JAVA_HOME)/lib/server -ljvm
QUESO_LINKS=-link-opt 'queso.o -lstdc++ -ljvm $(QUESO_INCLUDE)'
TRY_QUESO_LINKS=-link-opt 'try_queso.o -lstdc++ -ljvm $(QUESO_INCLUDE)'
.PHONY: all clean realclean phony
default:
@echo "usage: make <file>.bin"
clean:
rm -f bin/*.bin* bin/*.log bin/*.c bin/*.s
phony:
%.mlton.quartz.bin: phony
@mkdir -p bin
g++ -Wall -Wextra -Wconversion -Wno-unused-result -Werror -c lib/quartz/quartz.cpp -lquartz_runtime
$(MLTON) -mlb-path-var 'COMPAT mlton' $(FFI_FLAGS) $(QUARTZ_LINKS) $(DEFAULT_FLAGS) -output bin/$@ $*.mlb lib/quartz/quartz_api.c
%.mlton.queso.bin: phony
@mkdir -p bin
g++ -Wall -Wextra -Wconversion -Wno-unused-result -Werror -c lib/queso/queso.cpp $(QUESO_INCLUDE)
$(MLTON) -mlb-path-var 'COMPAT mlton' $(FFI_FLAGS) $(QUESO_LINKS) $(DEFAULT_FLAGS) -output bin/$@ $*.mlb lib/queso/queso_api.c
%.mlton.voqc.bin: phony
@mkdir -p bin
$(MLTON) -mlb-path-var 'COMPAT mlton' $(FFI_FLAGS) $(DEFAULT_FLAGS) -output bin/$@ $*.mlb
%.mlton.pyzx.bin: phony
@mkdir -p bin
$(MLTON) -mlb-path-var 'COMPAT mlton' $(FFI_FLAGS) $(DEFAULT_FLAGS) -output bin/$@ $*.mlb
%.mlton.try.queso.bin: phony
@mkdir -p bin
g++ -Wall -Wextra -Wconversion -Wno-unused-result -Werror -c lib/queso/try_queso.cpp $(QUESO_INCLUDE)
$(MLTON) -mlb-path-var 'COMPAT mlton' $(FFI_FLAGS) $(TRY_QUESO_LINKS) $(DEFAULT_FLAGS) -output bin/$@ $*.mlb lib/queso/try_queso_api.c
%.mlton.bin: phony
@mkdir -p bin
$(MLTON) -mlb-path-var 'COMPAT mlton' $(FFI_FLAGS) $(DEFAULT_FLAGS) -output bin/$@ $*.mlb
%.mlton.diff.bin: phony
@mkdir -p bin
$(MLTON) -mlb-path-var 'COMPAT mlton' $(FFI_FLAGS) $(DEBUG) $(DEFAULT_FLAGS) -output bin/$@ $*.mlb
%.mpl.quartz.bin: phony
@mkdir -p bin
g++ -Wall -Wextra -Wconversion -Wno-unused-result -Werror -c lib/quartz/quartz.cpp -lquartz_runtime
$(MPL) -mlb-path-var 'COMPAT mpl' $(FFI_FLAGS) $(QUARTZ_LINKS) $(DEFAULT_FLAGS) $(MPL_FLAGS) -output bin/$@ $*.mlb lib/quartz/quartz_api.c
%.bin: phony
@mkdir -p bin
$(MPL) -mlb-path-var 'COMPAT mpl' $(DEFAULT_FLAGS) $(MPL_FLAGS) -output bin/$@ $*.mlb