]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/contrib/lex/Makefile
Inital import
[l4.git] / l4 / pkg / ocaml / contrib / lex / Makefile
1 #########################################################################
2 #                                                                       #
3 #                            Objective Caml                             #
4 #                                                                       #
5 #            Xavier Leroy, projet Cristal, INRIA Rocquencourt           #
6 #                                                                       #
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.                #
10 #                                                                       #
11 #########################################################################
12
13 # $Id: Makefile 6708 2004-11-29 14:49:24Z doligez $
14
15 # The lexer generator
16 CAMLC=../boot/ocamlrun ../boot/ocamlc -nostdlib -I ../boot
17 CAMLOPT=../boot/ocamlrun ../ocamlopt -nostdlib -I ../stdlib
18 COMPFLAGS=-warn-error A
19 CAMLYACC=../boot/ocamlyacc
20 YACCFLAGS=-v
21 CAMLLEX=../boot/ocamlrun ../boot/ocamllex
22 CAMLDEP=../boot/ocamlrun ../tools/ocamldep
23
24
25 OBJS=cset.cmo syntax.cmo parser.cmo lexer.cmo table.cmo lexgen.cmo compact.cmo common.cmo output.cmo outputbis.cmo main.cmo
26
27 all: ocamllex
28 allopt: ocamllex.opt
29
30 ocamllex: $(OBJS)
31         $(CAMLC) $(LINKFLAGS) -o ocamllex $(OBJS)
32
33 ocamllex.opt: $(OBJS:.cmo=.cmx)
34         $(CAMLOPT) -o ocamllex.opt $(OBJS:.cmo=.cmx)
35
36 clean::
37         rm -f ocamllex ocamllex.opt
38         rm -f *.cmo *.cmi *.cmx *.o *~
39
40 parser.ml parser.mli: parser.mly
41         $(CAMLYACC) $(YACCFLAGS) parser.mly
42
43 clean::
44         rm -f parser.ml parser.mli parser.output
45
46 beforedepend:: parser.ml parser.mli
47
48 lexer.ml: lexer.mll
49         $(CAMLLEX) lexer.mll
50
51 clean::
52         rm -f lexer.ml
53
54 beforedepend:: lexer.ml
55
56 .SUFFIXES:
57 .SUFFIXES: .ml .cmo .mli .cmi .cmx
58
59 .ml.cmo:
60         $(CAMLC) -c $(COMPFLAGS) $<
61
62 .mli.cmi:
63         $(CAMLC) -c $(COMPFLAGS) $<
64
65 .ml.cmx:
66         $(CAMLOPT) -c $(COMPFLAGS) $<
67
68 depend: beforedepend
69         $(CAMLDEP) *.mli *.ml > .depend
70
71 include .depend