1 #########################################################################
5 # Xavier Leroy, projet Cristal, INRIA Rocquencourt #
7 # Copyright 1999 Institut National de Recherche en Informatique et #
8 # en Automatique. All rights reserved. This file is distributed #
9 # under the terms of the Q Public License version 1.0. #
11 #########################################################################
15 include ..
/config
/Makefile
17 CAMLC
=..
/boot
/ocamlrun ..
/ocamlc
18 CAMLOPT
=..
/boot
/ocamlrun ..
/ocamlopt
19 COMPFLAGS
=-nostdlib
-I ..
/stdlib
-I KB
-I Lex
21 CAMLYACC
=..
/yacc/ocamlyacc
23 CAMLLEX
=..
/boot
/ocamlrun ..
/lex/ocamllex
24 CAMLDEP
=..
/boot
/ocamlrun ..
/tools
/ocamldep
25 CAMLRUN
=..
/byterun
/ocamlrun
26 CODERUNPARAMS
=OCAMLRUNPARAM
='o=100'
28 BYTE_EXE
=fib.byt takc.byt taku.byt sieve.byt quicksort.byt quicksort.fast.byt \
29 fft.byt fft.fast.byt soli.byt soli.fast.byt boyer.byt kb.byt \
30 nucleic.byt bdd.byt hamming.byt sorts.byt \
31 almabench.byt almabench.fast.byt weaktest.byt
33 CODE_EXE
=$(BYTE_EXE
:.byt
=.out
)
35 default
: all codetest bytetest
37 all: $(BYTE_EXE
) $(CODE_EXE
)
41 nucleic.out
: nucleic.ml
43 i386
) sed
-e
'/<HAND_CSE>/,/<\/HAND_CSE>/d' -e
'/NO_CSE>/d' \
44 nucleic.ml
> nucleic.mlt
; \
45 $(CAMLOPT
) $(COMPFLAGS
) $(OPTFLAGS
) -o nucleic.out nucleic.mlt
;\
47 *) $(CAMLOPT
) $(COMPFLAGS
) $(OPTFLAGS
) -o nucleic.out nucleic.ml
; \
52 BYTE_KB
=KB
/terms.cmo KB
/equations.cmo KB
/kb.cmo KB
/orderings.cmo KB
/kbmain.cmo
53 CODE_KB
=$(BYTE_KB
:.cmo
=.cmx
)
56 $(CAMLC
) $(COMPFLAGS
) $(BYTE_KB
) -o kb.byt
58 $(CAMLOPT
) $(COMPFLAGS
) $(OPTFLAGS
) $(CODE_KB
) -o kb.out
61 rm -f KB
/*.cm
[iox
] KB
/*.
[os
]
66 BYTE_GENLEX
=Lex
/syntax.cmo Lex
/scan_aux.cmo Lex
/scanner.cmo Lex
/gram_aux.cmo \
67 Lex
/grammar.cmo Lex
/lexgen.cmo Lex
/output.cmo Lex
/main.cmo
68 CODE_GENLEX
=$(BYTE_GENLEX
:.cmo
=.cmx
)
70 genlex.byt
: $(BYTE_GENLEX
)
71 $(CAMLC
) $(COMPFLAGS
) $(BYTE_GENLEX
) -o genlex.byt
72 genlex.out
: $(CODE_GENLEX
)
73 $(CAMLOPT
) $(COMPFLAGS
) $(OPTFLAGS
) $(CODE_GENLEX
) -o genlex.out
76 rm -f Lex
/*.cm
[iox
] Lex
/*.
[os
]
78 rm -f Lex
/grammar.output
80 Lex
/grammar.ml Lex
/grammar.mli
: Lex
/grammar.mly ..
/yacc/ocamlyacc
$(EXE
)
81 $(CAMLYACC
) $(YACCFLAGS
) Lex
/grammar.mly
84 rm -f Lex
/grammar.ml Lex
/grammar.mli
85 beforedepend
:: Lex
/grammar.ml Lex
/grammar.mli
87 Lex
/scanner.ml
: Lex
/scanner.mll ..
/lex/ocamllex
88 $(CAMLLEX
) Lex
/scanner.mll
92 beforedepend
:: Lex
/scanner.ml
97 rm -f Moretest
/*.cm
* Moretest
/*.
[os
]
103 .SUFFIXES
: .mli .ml .cmi .cmo .cmx .byt .fast.byt .out .fast.out
106 $(CAMLC
) $(COMPFLAGS
) -o
$*.byt
$<
110 $(CAMLC
) $(COMPFLAGS
) -unsafe
-o
$*.fast.byt
$*_fast.ml
114 $(CAMLOPT
) $(COMPFLAGS
) $(OPTFLAGS
) -o
$*.out
$<
118 $(CAMLOPT
) $(COMPFLAGS
) $(OPTFLAGS
) -unsafe
-o
$*.fast.out
$*_fast.ml
122 $(CAMLC
) $(COMPFLAGS
) -c
$<
125 $(CAMLC
) $(COMPFLAGS
) -c
$<
128 $(CAMLOPT
) $(COMPFLAGS
) $(OPTFLAGS
) -c
$<
130 $(BYTE_EXE
) $(BYTE_KB
) $(BYTE_GENLEX
): ..
/ocamlc
131 $(BYTE_EXE
): ..
/stdlib
/stdlib.cma
132 $(CODE_EXE
) $(CODE_KB
) $(CODE_GENLEX
): ..
/ocamlopt
133 $(CODE_EXE
): ..
/stdlib
/stdlib.cmxa ..
/stdlib
/libasmrun.a
137 rm -f
*.cm
[iox
] *.
[os
]
146 for prog in
$(BYTE_EXE
:.byt
=); do \
148 $(CAMLRUN
) $$prog.byt | diff
-b
-q
- Results
/$$prog.out
; \
153 for prog in
$(CODE_EXE
:.out
=); do \
155 .
/$$prog.out | diff
-b
-q
- Results
/$$prog.out
; \
159 rm -f Lex
/testscanner.ml
167 for prog in
$(BYTE_EXE
:.byt
=); do \
168 echo
"$$prog " | cut
-c
1-16 | tr
-d
'\012'; \
169 xtime
-mintime
5 -o
/dev
/null
-e
/dev
/null
$(CAMLRUN
) $$prog.byt
; \
174 for prog in
$(CODE_EXE
:.out
=); do \
175 echo
"$$prog " | cut
-c
1-16 | tr
-d
'\012'; \
176 $(CODERUNPARAMS
) xtime
-mintime
5 -o
/dev
/null
-e
/dev
/null .
/$$prog.out
; \
182 $(CAMLDEP
) -I KB
-I Lex
*.mli
*.ml KB
/*.mli KB
/*.ml Lex
/*.mli Lex
/*.ml
> .depend