-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathOMakeroot
94 lines (81 loc) · 2.99 KB
/
OMakeroot
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
########################################################################
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this file, to deal in the File without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the File, and to permit persons to whom the
# File is furnished to do so, subject to the following condition:
#
# THE FILE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE FILE OR
# THE USE OR OTHER DEALINGS IN THE FILE.
########################################################################
# The standard OMakeroot file.
# You will not normally need to modify this file.
# By default, your changes should be placed in the
# OMakefile in this directory.
#
# If you decide to modify this file, note that it uses exactly
# the same syntax as the OMakefile.
#
#
# Include the standard installed configuration files.
# Any of these can be deleted if you are not using them,
# but you probably want to keep the Common file.
#
open build/C
open build/OCaml
open build/LaTeX
#
# The command-line variables are defined *after* the
# standard configuration has been loaded.
#
DefineCommandVars()
BYTE_ENABLED = true
NATIVE_ENABLED = true
OCAMLFLAGS += -dtypes
CLEAN = rm -rf *.cm* *~ .\#* *.o *.obj *.a *.lib *.exe *.omc *.install *.tmp *.annot
MPL_DIR = $(ROOT)/tools/mpl
SPL_DIR = $(ROOT)/tools/spl
DIST_DIR = $(ROOT)/dist
LIB_DIR = $(ROOT)/lib
.SUBDIRS: . tools dist
include OMakefile
export
MPLGenerated(sources) =
MPLC = $(MPL_DIR)/mplc
OCAMLINCLUDES += $(MPL_DIR)
export OCAMLINCLUDES
if $(not $(defined MPL_FLAGS))
MPL_FLAGS=
export MPL_FLAGS
.PHONY: clean
clean:
rm -f $(addsuffix .ml, $(sources))
foreach (source, $(sources))
OCamlGeneratedFiles($(source).ml)
$(source).ml: $(source).mpl $(MPL_COMPILER)
$(MPLC) $(MPL_FLAGS) $< > $@
OCAMLFLAGS += -w yu
$(addsuffixes .cmo .cmx .cmi .o, $(source)): $(MPL_STDLIB)
clean:
SPLGenerated(statecalls, sources, debug) =
SPLC = $(SPL_DIR)/splc
OCAMLINCLUDES += $(SPL_DIR)
export OCAMLINCLUDES
spl_sources = $(addsuffix .spl, $(sources))
spl_gen_files = $(addsuffix .ml, $(statecalls) $(sources))
$(spl_gen_files): $(SPL_COMPILER) $(spl_sources)
$(SPLC) -t ocaml -s $(statecalls) -hdir $(SPL_DIR) -d $(debug) $(spl_sources)
.PHONY: clean
clean:
rm -f $(spl_gen_files)
VERBOSE = true
#
# Include the OMakefile in this directory.
#
.SUBDIRS: lib apps regress