1999-11-17 10:59:06 -08:00
|
|
|
#########################################################################
|
|
|
|
# #
|
|
|
|
# Objective Caml #
|
|
|
|
# #
|
|
|
|
# Xavier Leroy, projet Cristal, INRIA Rocquencourt #
|
|
|
|
# #
|
|
|
|
# Copyright 1999 Institut National de Recherche en Informatique et #
|
|
|
|
# en Automatique. All rights reserved. This file is distributed #
|
|
|
|
# under the terms of the Q Public License version 1.0. #
|
|
|
|
# #
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
# $Id$
|
|
|
|
|
1996-02-21 02:49:46 -08:00
|
|
|
# The lexer generator
|
|
|
|
|
2002-06-07 02:49:45 -07:00
|
|
|
CAMLC=../boot/ocamlrun ../boot/ocamlc -I ../boot
|
|
|
|
CAMLOPT=../boot/ocamlrun ../ocamlopt -I ../stdlib
|
|
|
|
COMPFLAGS=-warn-error A
|
1996-02-21 02:49:46 -08:00
|
|
|
LINKFLAGS=
|
2002-06-07 02:49:45 -07:00
|
|
|
CAMLYACC=../boot/ocamlyacc
|
|
|
|
YACCFLAGS=-v
|
|
|
|
CAMLLEX=../boot/ocamlrun ../boot/ocamllex
|
|
|
|
CAMLDEP=../boot/ocamlrun ../tools/ocamldep
|
1996-02-21 02:49:46 -08:00
|
|
|
DEPFLAGS=
|
|
|
|
|
2003-01-06 06:57:22 -08:00
|
|
|
OBJS=cset.cmo syntax.cmo parser.cmo lexer.cmo table.cmo lexgen.cmo compact.cmo common.cmo output.cmo outputbis.cmo main.cmo
|
1996-02-21 02:49:46 -08:00
|
|
|
|
2002-01-24 23:24:06 -08:00
|
|
|
all: ocamllex syntax.cmo
|
2001-02-05 00:52:10 -08:00
|
|
|
allopt: ocamllex.opt
|
1996-02-21 02:49:46 -08:00
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
ocamllex: $(OBJS)
|
|
|
|
$(CAMLC) $(LINKFLAGS) -o ocamllex $(OBJS)
|
1996-02-21 02:49:46 -08:00
|
|
|
|
2000-08-30 18:10:14 -07:00
|
|
|
ocamllex.opt: $(OBJS:.cmo=.cmx)
|
|
|
|
$(CAMLOPT) -o ocamllex.opt $(OBJS:.cmo=.cmx)
|
|
|
|
|
1996-02-21 02:49:46 -08:00
|
|
|
clean::
|
2000-08-30 18:10:14 -07:00
|
|
|
rm -f ocamllex ocamllex.opt
|
2002-06-07 02:49:45 -07:00
|
|
|
rm -f *.cmo *.cmi *.cmx *.$(O)
|
1996-02-21 02:49:46 -08:00
|
|
|
|
|
|
|
parser.ml parser.mli: parser.mly
|
|
|
|
$(CAMLYACC) $(YACCFLAGS) parser.mly
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f parser.ml parser.mli
|
|
|
|
|
|
|
|
beforedepend:: parser.ml parser.mli
|
|
|
|
|
|
|
|
lexer.ml: lexer.mll
|
|
|
|
$(CAMLLEX) lexer.mll
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f lexer.ml
|
|
|
|
|
|
|
|
beforedepend:: lexer.ml
|
|
|
|
|
|
|
|
.SUFFIXES:
|
2000-08-30 18:10:14 -07:00
|
|
|
.SUFFIXES: .ml .cmo .mli .cmi .cmx
|
1996-02-21 02:49:46 -08:00
|
|
|
|
|
|
|
.ml.cmo:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
2000-08-30 18:10:14 -07:00
|
|
|
.ml.cmx:
|
|
|
|
$(CAMLOPT) -c $(COMPFLAGS) $<
|
|
|
|
|
1996-02-21 02:49:46 -08:00
|
|
|
depend: beforedepend
|
|
|
|
$(CAMLDEP) *.mli *.ml > .depend
|
|
|
|
|
2002-06-07 02:49:45 -07:00
|
|
|
include .depend
|