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
|
|
|
|
|
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
|
1996-02-21 02:49:46 -08:00
|
|
|
COMPFLAGS=
|
|
|
|
LINKFLAGS=
|
1996-04-30 07:53:58 -07:00
|
|
|
CAMLYACC=..\boot\ocamlyacc
|
1996-02-21 02:49:46 -08:00
|
|
|
YACCFLAGS=
|
1996-04-30 07:53:58 -07:00
|
|
|
CAMLLEX=..\boot\ocamlrun ..\boot\ocamllex
|
|
|
|
CAMLDEP=..\boot\ocamlrun ..\tools\ocamldep
|
1996-02-21 02:49:46 -08:00
|
|
|
DEPFLAGS=
|
|
|
|
|
1996-02-26 05:52:15 -08:00
|
|
|
OBJS=parser.cmo lexer.cmo lexgen.cmo compact.cmo output.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
|
1996-02-21 02:49:46 -08:00
|
|
|
rm -f *.cmo *.cmi
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
!include .depend
|