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$
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
# The lexer generator
|
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
CAMLC=../boot/ocamlrun ../boot/ocamlc -I ../boot
|
2000-08-30 18:10:14 -07:00
|
|
|
CAMLOPT=../boot/ocamlrun ../ocamlopt -I ../stdlib
|
1995-05-04 03:15:53 -07:00
|
|
|
COMPFLAGS=
|
|
|
|
LINKFLAGS=
|
1996-04-30 07:53:58 -07:00
|
|
|
CAMLYACC=../boot/ocamlyacc
|
1995-05-04 03:15:53 -07:00
|
|
|
YACCFLAGS=
|
1996-04-30 07:53:58 -07:00
|
|
|
CAMLLEX=../boot/ocamlrun ../boot/ocamllex
|
|
|
|
CAMLDEP=../boot/ocamlrun ../tools/ocamldep
|
1995-05-04 03:15:53 -07:00
|
|
|
DEPFLAGS=
|
|
|
|
|
1996-02-25 06:45:47 -08:00
|
|
|
OBJS=parser.cmo lexer.cmo lexgen.cmo compact.cmo output.cmo main.cmo
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
all: ocamllex
|
2000-08-30 18:10:14 -07:00
|
|
|
allopt: ocamllex.opt
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
ocamllex: $(OBJS)
|
|
|
|
$(CAMLC) $(LINKFLAGS) -o ocamllex $(OBJS)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2000-08-30 18:10:14 -07:00
|
|
|
ocamllex.opt: $(OBJS:.cmo=.cmx)
|
|
|
|
$(CAMLOPT) -o ocamllex.opt $(OBJS:.cmo=.cmx)
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
clean::
|
2000-08-30 18:10:14 -07:00
|
|
|
rm -f ocamllex ocamllex.opt
|
2001-03-30 04:21:13 -08:00
|
|
|
rm -f *.cmo *.cmi *.cmx *.o
|
1995-05-04 03:15:53 -07: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
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
.ml.cmo:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
2000-08-30 18:10:14 -07:00
|
|
|
.ml.cmx:
|
|
|
|
$(CAMLOPT) -c $(COMPFLAGS) $<
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
depend: beforedepend
|
|
|
|
$(CAMLDEP) *.mli *.ml > .depend
|
|
|
|
|
|
|
|
include .depend
|