-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.in
executable file
·153 lines (117 loc) · 3.26 KB
/
config.in
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
VERSION = @VERSION@
# configure variables
bindir = @bindir@
libdir = @libdir@/zelus
# options
gtktargets = @gtktargets@
targets = @targets@
# programs used
OCAML ?= @OCAMLBIN@ocaml
OCAMLC ?= @OCAMLBIN@ocamlc
OCAMLLEX ?= @OCAMLBIN@ocamllex
OCAMLYACC ?= @OCAMLBIN@ocamlyacc
OCAMLOPT ?= @OCAMLBIN@ocamlopt
OCAMLDEP ?= @OCAMLBIN@ocamldep
OCAMLRUN ?= @OCAMLBIN@ocamlrun
OCAMLFIND ?= @OCAMLFIND@
MENHIR ?= @OCAMLBIN@menhir
OTAGS ?= otags
ZLLIB = ../lib
TOOLS = ../tools
OCAMLFLAGS ?= -annot -w -3-26
OCAMLOPTFLAGS ?= -annot -w -3-26
CPPFLAGS ?= -P -x c
BIN = zeluc
TARGET ?= $(word 1, $(targets))
ifeq (@for_compile@,1)
ZELUC := ../bin/$(BIN)
else
ZELUC := ../bin/$(BIN).$(TARGET) -stdlib ../lib
endif
UNIX = unix.cma
UNIXX = unix.cmxa
GLMLITE_ENABLED = @GLMLITE_ENABLED@
GLMLITE = -I @GLMLITE_INCL@
LABLGTK2 = -I @LABLGTK2_PATH@
MENHIRLIB = @MENHIRLIB@
MENHIRFLAGS = --table
MATLAB = @MATLAB@
MATLABFLAGS = -nodesktop -nosplash
PTOLEMY = @PTOLEMY@
PTOLEMYFLAGS =
SOLVER = @DEFAULT_SOLVER@
SUNDIALS=@SUNDIALSML_INCL@
ifneq ($(SUNDIALS),)
SUNDIALS_CVODE = sundials.cma
OPTIONAL_SOLVER_OBJS = solvers/sundials_cvode.cmo
DISTOPTION = -sundials
else
DISTOPTION = -nosundials
endif
ZLSTDLIBS = bigarray.cma unix.cma $(SUNDIALS) $(SUNDIALS_CVODE)
ZLEXTRALIBS = zllib.cma
ZLGTKLIBS = $(LABLGTK2) lablgtk.cma zllibgtk.cma
DIRECTORIES = global parsing typing analysis rewrite gencode verif main
# colours (used in tests)
ifdef NOCOLOR
S_BLUE = ""
S_GREEN = ""
S_RED = ""
S_NORMAL = ""
else
S_BLUE = "\\033[34m"
S_GREEN = "\\033[32m"
S_RED = "\\033[31m"
S_NORMAL = "\\033[0m"
endif
# debugger commands
define DEBUG_PRELUDE
directory $(DIRECTORIES)
load_printer "debugprinter.cma"
install_printer Ident.fprint_t
install_printer Ident.Env.fprint_3ident
install_printer Ident.S.fprint_t
install_printer Lident.fprint_t
install_printer Ptypes.output
install_printer Printer.expression
install_printer Printer.equation
install_printer Printer.print_env
install_printer Printer.implementation
install_printer Printer.interface
install_printer Printer.state_ident_typ
install_printer Printer.state_eq
install_printer Printer.local
install_printer Oprinter.implementation
install_printer Oprinter.ptype
install_printer Oprinter.pattern
install_printer Oprinter.expression
install_printer Causal.Cenv.penv
install_printer Causal.Cenv.pcaus
install_printer Causal.Cenv.ptype
install_printer Deadcode.print
endef
export DEBUG_PRELUDE
# implicit rules
.SUFFIXES : .mli .ml .cmi .cmo .cmx .mll .mly .zli .zli .byte .opt
%.cmi: %.mli
$(OCAMLC) $(OCAMLFLAGS) -c $(INCLUDES) $<
%.cmo %.cmi: %.ml
$(OCAMLC) $(OCAMLFLAGS) -c -I $(ZLLIB) $(INCLUDES) $<
%.cmx %.cmi: %.ml
$(OCAMLOPT) $(OCAMLOPTFLAGS) -I $(ZLLIB) -c $(INCLUDES:.cma=.cmxa) $<
%.zci: %.zli
$(ZELUC) $(ZELUCFLAGS) $<
%.ml: %.mll
$(OCAMLLEX) $<
%.ml %.mli: %.mly
$(MENHIR) $(MENHIRFLAGS) $<
# set ZLEXTRALIBS to ZLGTKLIBS to compile examples that use gtk
%.byte: %.ml
$(OCAMLC) $(OCAMLFLAGS) -o $@ $(INCLUDES) \
-I $(ZLLIB) $(ZLSTDLIBS) $(ZLEXTRALIBS) \
$< $(<:.ml=_main.ml)
# set ZLEXTRALIBS to ZLGTKLIBS to compile examples that use gtk
%.opt: %.ml
$(OCAMLOPT) $(OCAMLOPTFLAGS) -o $@ $(INCLUDES) \
-I $(ZLLIB) $(ZLSTDLIBS:.cma=.cmxa) $(ZLEXTRALIBS:.cma=.cmxa) \
$< $(<:.ml=_main.ml)