-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
407 lines (324 loc) · 10.8 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
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
.PHONY: clean
SCIWEB_DATA = $(patsubst src/sciweb/%, sciweb/%, $(wildcard src/sciweb/*))
all: \
scilint.asm scintax.asm scifind.asm scilint_doc_gen.asm scilob.asm \
scilint.byte scintax.byte scifind.byte scilint_doc_gen.byte scilob.byte \
sciweb/sciweb.js $(SCIWEB_DATA) scilint.cmxa
OCAMLOPT=ocamlfind ocamlopt -g -safe-string -strict-formats
OCAMLC=ocamlfind ocamlc -g -safe-string -strict-formats
OCAMLYACC=menhir
OCAMLLEX=ocamllex
OCAMLDEP=ocamlfind ocamldep
OCAML_COMMON_MLS = \
src/third_party/ptmap.ml \
src/third_party/ptset.ml \
src/common/scilintManual.ml \
src/common/scilintWarning.ml \
src/common/scilabLocations.ml \
src/input/scilabTypedPrimitives.ml \
src/input/scilabTypedPrimitivesLexer.ml \
src/input/scilabTypedPrimitivesParser.ml \
src/input/scilabTypedPrimitivesLoader.ml
OCAML_COMMON_MLIS = \
src/third_party/ptset.mli \
src/third_party/ptmap.mli \
src/common/scilintWarning.mli \
src/input/scilabTypedPrimitivesParser.cmi: \
src/input/scilabTypedPrimitives.cmi
src/input/scilabTypedPrimitivesLexer.cmx: \
src/input/scilabTypedPrimitivesParser.cmi
src/input/scilabTypedPrimitivesLexer.cmo: \
src/input/scilabTypedPrimitivesParser.cmi
OCAML_SCILAB_SIX_PARSER_MLS = \
src/parser/scilab_six/scilabSixParserUtils.ml \
src/parser/scilab_six/scilabSixLexer.ml \
src/parser/scilab_six/scilabSixGenParser.ml \
src/parser/scilab_six/scilabSixParser.ml
src/parser/scilab_six/scilabSixLexer.cmx: \
src/parser/scilab_six/scilabSixGenParser.cmi
src/parser/scilab_six/scilabSixLexer.cmo: \
src/parser/scilab_six/scilabSixGenParser.cmi
OCAML_SCILAB_FIVE_PARSER_MLS = \
src/parser/scilab_five/scilabFiveParser.ml
OCAML_AST_MLS = \
src/ast/scilabAst.ml \
src/ast/scilabAstUtils.ml \
src/ast/scilabAstConverter.ml \
src/ast/scilabAstSexpPrinter.ml \
src/ast/scilabAstPrettyPrinter.ml \
src/ast/scilabParserAst.ml \
src/ast/scilabParserAstSerializer.ml
OCAML_SCINTAX_MLS = \
src/common/scilintOptions.ml \
src/scintax/scintaxMain.ml
OCAML_SCIFIND_MLS = \
src/common/scilintOptions.ml \
src/scifind/scifindMain.ml
OCAML_SCILOB_MLS = \
src/common/scilintOptions.ml \
src/interp/interpStatePureOCaml.ml \
src/interp/interpValuesPureOCaml.ml \
src/interp/interpDispatcher.ml \
src/interp/interpCore.ml \
src/interp/interpMessages.ml \
src/interp/interpLib.ml \
src/interp/interpPlotLib.ml \
src/interp/interpMathLib.ml \
src/interp/interp.ml \
src/interp/interpMain.ml
OCAML_SCILOB_MLIS = \
src/interp/interpState.mli \
src/interp/interpValues.mli \
OCAML_SCIWEB_MLS = \
src/common/scilintOptions.ml \
src/interp/interpStatePureOCaml.ml \
src/interp/interpValuesPureOCaml.ml \
src/interp/interpDispatcher.ml \
src/interp/interpCore.ml \
src/interp/interpMessages.ml \
src/interp/interpLib.ml \
src/interp/interpPlotLib.ml \
src/interp/interpMathLib.ml \
src/interp/interp.ml \
src/common/tyxml_js_manip.ml \
src/third_party/c3.ml \
src/interp/interpLycee.ml \
src/interp/interpWebLib.ml \
src/interp/interpWebMain.ml
OCAML_SCIWEB_MLIS = \
src/interp/interpState.mli \
src/interp/interpValues.mli \
src/common/tyxml_js_manip.mli \
src/third_party/c3.mli
OCAML_SCILINT_DOC_GEN_MLS = \
src/docgen/scilintDocGenMain.ml
OCAML_SCILINT_MLS = \
src/common/scilintOptions.ml \
src/scilint/scilabUtils.ml \
src/scilint/scilintProject.ml \
src/scilint/scilintPassExpandEval.ml \
src/scilint/scilabFiveFunctionAnalyze.ml \
src/scilint/scilintMain.ml
src/scilint/config/scilintLexer.cmx: \
src/scilint/config/scilintParser.cmi
OCAML_SCILINT_MLIS = \
src/scilint/scilabUtils.mli \
src/scilint/scilintProject.mli
########## SCILINT
SCILINT_MLS = \
$(OCAML_COMMON_MLS) \
$(OCAML_AST_MLS) \
$(OCAML_SCILAB_FIVE_PARSER_MLS) \
$(OCAML_SCILAB_SIX_PARSER_MLS) \
$(OCAML_SCILINT_MLS)
SCILINT_MLIS = \
$(OCAML_COMMON_MLIS) \
$(OCAML_SCILINT_MLIS)
SCILINT_CMIS = $(SCILINT_MLS:.ml=.cmi) $(SCILINT_MLIS:.mli=.cmi)
SCILINT_CMXS = $(SCILINT_MLS:.ml=.cmx)
SCILINT_CMOS = $(SCILINT_MLS:.ml=.cmo)
########## SCINTAX
SCINTAX_MLS = \
$(OCAML_COMMON_MLS) \
$(OCAML_AST_MLS) \
$(OCAML_SCILAB_FIVE_PARSER_MLS) \
$(OCAML_SCILAB_SIX_PARSER_MLS) \
$(OCAML_SCINTAX_MLS)
SCINTAX_MLIS = \
$(OCAML_COMMON_MLIS) \
SCINTAX_CMIS = $(SCINTAX_MLS:.ml=.cmi) $(SCINTAX_MLIS:.mli=.cmi)
SCINTAX_CMXS = $(SCINTAX_MLS:.ml=.cmx)
SCINTAX_CMOS = $(SCINTAX_MLS:.ml=.cmo)
########## SCIFIND
SCIFIND_MLS = \
$(OCAML_COMMON_MLS) \
$(OCAML_AST_MLS) \
$(OCAML_SCILAB_FIVE_PARSER_MLS) \
$(OCAML_SCILAB_SIX_PARSER_MLS) \
$(OCAML_SCIFIND_MLS)
SCIFIND_MLIS = \
$(OCAML_COMMON_MLIS) \
SCIFIND_CMIS = $(SCIFIND_MLS:.ml=.cmi) $(SCIFIND_MLIS:.mli=.cmi)
SCIFIND_CMXS = $(SCIFIND_MLS:.ml=.cmx)
SCIFIND_CMOS = $(SCIFIND_MLS:.ml=.cmo)
########## SCILOB
SCILOB_MLS = \
$(OCAML_COMMON_MLS) \
$(OCAML_AST_MLS) \
$(OCAML_SCILAB_FIVE_PARSER_MLS) \
$(OCAML_SCILAB_SIX_PARSER_MLS) \
$(OCAML_SCILOB_MLS)
SCILOB_MLIS = \
$(OCAML_COMMON_MLIS) \
$(OCAML_SCILOB_MLIS)
SCILOB_CMIS = $(SCILOB_MLS:.ml=.cmi) $(SCILOB_MLIS:.mli=.cmi)
SCILOB_CMXS = $(SCILOB_MLS:.ml=.cmx)
SCILOB_CMOS = $(SCILOB_MLS:.ml=.cmo)
########## SCIWEB
SCIWEB_MLS = \
$(OCAML_COMMON_MLS) \
$(OCAML_AST_MLS) \
$(OCAML_SCILAB_FIVE_PARSER_MLS) \
$(OCAML_SCILAB_SIX_PARSER_MLS) \
$(OCAML_SCIWEB_MLS)
SCIWEB_MLIS = \
$(OCAML_COMMON_MLIS) \
$(OCAML_SCIWEB_MLIS)
SCIWEB_CMIS = $(SCIWEB_MLS:.ml=.cmi) $(SCIWEB_MLIS:.mli=.cmi)
SCIWEB_CMXS = $(SCIWEB_MLS:.ml=.cmx)
SCIWEB_CMOS = $(SCIWEB_MLS:.ml=.cmo)
########## SCILINT_DOC_GEN
SCILINT_DOC_GEN_MLS = \
$(OCAML_COMMON_MLS) \
$(OCAML_SCILINT_DOC_GEN_MLS)
SCILINT_DOC_GEN_MLIS = \
$(OCAML_COMMON_MLIS) \
SCILINT_DOC_GEN_CMIS = $(SCILINT_DOC_GEN_MLS:.ml=.cmi) $(SCILINT_DOC_GEN_MLIS:.mli=.cmi)
SCILINT_DOC_GEN_CMXS = $(SCILINT_DOC_GEN_MLS:.ml=.cmx)
SCILINT_DOC_GEN_CMOS = $(SCILINT_DOC_GEN_MLS:.ml=.cmo)
########## COMMON FLAGS
############ ajoute pour archimedes ##########
OCAML_INCL= \
-package 'archimedes,unix,uutf,pprint,re,re.pcre,re.posix,ocplib-ocamlres' \
-I src/common -I src/input \
-I src/ast -I src/parser/scilab_five \
-I src/third_party \
-I src/parser/scilab_six \
-I src/scilint -I src/scilint/config \
-I src/scintax -I src/scifind -I src/docgen \
-I src/interp
OPTFLAGS = -g -fPIC
scilint.asm : $(SCILINT_CMXS)
$(OCAMLOPT) $(OCAML_INCL) -linkpkg \
-o $@ $(SCILINT_CMXS)
scilint.cmxa : $(SCILINT_CMXS)
ocamlopt -a -o $@ $(SCILINT_CMXS)
scintax.asm : $(SCINTAX_CMXS)
$(OCAMLOPT) $(OPTFLAGS) $(OCAML_INCL) -linkpkg \
-o $@ $(SCINTAX_CMXS)
scifind.asm : $(SCIFIND_CMXS)
$(OCAMLOPT) $(OPTFLAGS) $(OCAML_INCL) -linkpkg \
-o $@ $(SCIFIND_CMXS)
###### ajoute pour archimedes ######
archimedes_canvas.cmo: archimedes_canvas.ml
$(OCAMLC) -c -package 'archimedes,js_of_ocaml.tyxml,js_of_ocaml.syntax' -syntax camlp4o archimedes_canvas.ml
sciweb.byte: archimedes_canvas.cmo $(SCIWEB_CMOS)
$(OCAMLC) $(OCAML_INCL) $(OCAML_INCL) \
-package 'archimedes, js_of_ocaml.tyxml,js_of_ocaml.syntax' -linkpkg -o $@ $^
sciweb/sciweb.js: sciweb.byte sciweb
js_of_ocaml +weak.js $< -o $@
sciweb/%: src/sciweb/% sciweb
cp $< $@
sciweb:
-mkdir -p sciweb
#Makefile module_lycee-1.4.2-1-src.zip
# rm -rf module_lycee
# unzip -x module_lycee-1.4.2-1-src.zip
src/interp/interpLycee.ml: Makefile
ocp-ocamlres -ext sci module_lycee -o src/interp/interpLycee.ml
src/common/tyxml_js_manip.cmo \
src/common/tyxml_js_manip.cmi \
src/interp/interpWebLib.cmo \
src/third_party/c3.cmi \
src/third_party/c3.cmo \
src/interp/interpWebMain.cmo: \
OCAML_INCL += \
-package 'js_of_ocaml.tyxml,js_of_ocaml.syntax' \
-syntax camlp4o
scilob.asm : $(SCILOB_CMXS)
$(OCAMLOPT) $(OPTFLAGS) $(OCAML_INCL) -linkpkg \
-o $@ $(SCILOB_CMXS)
scilint_doc_gen.asm : $(SCILINT_DOC_GEN_CMXS)
$(OCAMLOPT) $(OPTFLAGS) $(OCAML_INCL) -package 'unix' -linkpkg \
-o $@ $(SCILINT_DOC_GEN_CMXS)
scilint.byte : $(SCILINT_CMOS)
$(OCAMLC) $(OCAML_INCL) -linkpkg \
-o $@ $(SCILINT_CMOS)
scintax.byte : $(SCINTAX_CMOS)
$(OCAMLC) $(OCAML_INCL) $(OCAML_INCL) -linkpkg \
-o $@ $(SCINTAX_CMOS)
scifind.byte : $(SCIFIND_CMOS)
$(OCAMLC) $(OCAML_INCL) $(OCAML_INCL) -linkpkg \
-o $@ $(SCIFIND_CMOS)
scilob.byte : $(SCILOB_CMOS)
$(OCAMLC) $(OCAML_INCL) $(OCAML_INCL) -linkpkg \
-o $@ $(SCILOB_CMOS)
scilint_doc_gen.byte : $(SCILINT_DOC_GEN_CMOS)
$(OCAMLC) $(OCAML_INCL) -package 'unix' -linkpkg \
-o $@ $(SCILINT_DOC_GEN_CMOS)
.depend_ocaml: $(SCILINT_DOC_GEN_MLS) $(SCILINT_DOC_GEN_MLIS) \
$(OCAML_COMMON_MLS) $(OCAML_COMMON_MLIS) \
$(SCILINT_MLS) $(SCILINT_MLIS) \
$(SCINTAX_MLS) $(SCINTAX_MLIS) \
$(SCIFIND_MLS) $(SCIFIND_MLIS) \
$(SCILOB_MLS) $(SCILOB_MLIS) \
$(SCIWEB_MLS) $(SCIWEB_MLIS)
$(OCAMLDEP) -native $(OCAML_INCL) \
$(SCILINT_DOC_GEN_MLS) $(SCILINT_DOC_GEN_MLIS) \
$(OCAML_COMMON_MLS) $(OCAML_COMMON_MLIS) \
$(SCILINT_MLS) $(SCILINT_MLIS) \
$(SCINTAX_MLS) $(SCINTAX_MLIS) \
$(SCIFIND_MLS) $(SCIFIND_MLIS) \
$(SCILOB_MLS) $(SCILOB_MLIS) \
> .depend_ocaml
$(OCAMLDEP) $(OCAML_INCL) \
src/common/tyxml_js_manip.ml \
src/common/tyxml_js_manip.mli \
src/third_party/c3.ml \
src/third_party/c3.mli \
src/interp/interpWebLib.ml \
src/interp/interpWebMain.ml \
-package 'js_of_ocaml.tyxml,js_of_ocaml.syntax' \
-syntax camlp4o >> .depend_ocaml
upload:
rsync -auv sciweb/. [email protected]:/var/www/sciweb.ocamlpro.com/.
include .depend_ocaml
ChangeLog.txt: scilint_doc_gen.asm
scilint_doc_gen.asm -changelog-txt ChangeLog.txt
########## COMMON
.SUFFIXES: .ml .mli .mll .mly .cmi .cmx .cmo
.ml.cmx:
$(OCAMLOPT) $(OPTFLAGS) $(OCAML_INCL) -c $<
.ml.cmo:
$(OCAMLC) $(OCAML_INCL) -c $<
.mll.cmx:
$(OCAMLLEX) $<
$(OCAMLOPT) $(OPTFLAGS) $(OCAML_INCL) -c $*.ml
.mli.cmi:
$(OCAMLOPT) $(OPTFLAGS) $(OCAML_INCL) -c $<
.mll.ml:
$(OCAMLLEX) $<
.mly.ml:
$(OCAMLYACC) -v $<
.mly.cmx:
$(OCAMLYACC) $<
$(OCAMLOPT) $(OPTFLAGS) $(OCAML_INCL) -c $*.mli
$(OCAMLOPT) $(OPTFLAGS) $(OCAML_INCL) -c $*.ml
.mly.cmo:
$(OCAMLYACC) $<
$(OCAMLC) $(OCAML_INCL) -c $*.mli
$(OCAMLC) $(OCAML_INCL) -c $*.ml
.mly.cmi:
$(OCAMLYACC) -v $<
$(OCAMLOPT) $(OPTFLAGS) $(OCAML_INCL) -c $*.mli
clean:
rm -fr \
sciweb \
*.old _obuild \
*~ */*~ */*/*~ */*/*/*~ \
*.cm* */*.cm* */*/*.cm* */*/*/*.cm* \
*.o */*.o */*/*.o */*/*/*.o \
scilint.byte scilint.asm \
scilint_doc_gen.byte scilint_doc_gen.asm \
scintax.byte scintax.asm \
scifind.byte scifind.asm \
scilob.byte scilob.asm \
src/parser/scilab_six/scilabSixLexer.ml \
src/parser/scilab_six/scilabSixGenParser.ml \
src/parser/scilab_six/scilabSixGenParser.mli \
src/scilint/config/scilintLexer.ml \
src/scilint/config/scilintParser.ml \
src/scilint/config/scilintParser.mli \
src/input/scilabTypedPrimitivesLexer.ml \
src/input/scilabTypedPrimitivesParser.ml \
src/input/scilabTypedPrimitivesParser.mli