1999-11-17 10:59:06 -08:00
|
|
|
#########################################################################
|
|
|
|
# #
|
2011-07-27 07:17:02 -07:00
|
|
|
# OCaml #
|
1999-11-17 10:59:06 -08:00
|
|
|
# #
|
|
|
|
# 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. #
|
|
|
|
# #
|
|
|
|
#########################################################################
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
# The lexer generator
|
2009-12-09 01:52:47 -08:00
|
|
|
CAMLC=../boot/ocamlrun ../boot/ocamlc -strict-sequence -nostdlib -I ../boot
|
2002-11-01 07:31:11 -08:00
|
|
|
CAMLOPT=../boot/ocamlrun ../ocamlopt -nostdlib -I ../stdlib
|
2012-05-29 05:33:51 -07:00
|
|
|
COMPFLAGS=-w +33..39 -warn-error A
|
2002-10-29 05:29:04 -08:00
|
|
|
CAMLYACC=../boot/ocamlyacc
|
|
|
|
YACCFLAGS=-v
|
|
|
|
CAMLLEX=../boot/ocamlrun ../boot/ocamllex
|
|
|
|
CAMLDEP=../boot/ocamlrun ../tools/ocamldep
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
|
2002-10-30 02:33:50 -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
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2002-10-28 08:46:50 -08: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
|
2002-10-28 08:46:50 -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::
|
2002-10-28 08:46:50 -08:00
|
|
|
rm -f parser.ml parser.mli parser.output
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
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
|