47 lines
2.0 KiB
Makefile
47 lines
2.0 KiB
Makefile
#**************************************************************************
|
|
#* *
|
|
#* OCaml *
|
|
#* *
|
|
#* Gabriel Scherer, projet Parsifal, INRIA Saclay *
|
|
#* *
|
|
#* Copyright 2019 Institut National de Recherche en Informatique et *
|
|
#* en Automatique. *
|
|
#* *
|
|
#* All rights reserved. This file is distributed under the terms of *
|
|
#* the GNU Lesser General Public License version 2.1, with the *
|
|
#* special exception on linking described in the file LICENSE. *
|
|
#* *
|
|
#**************************************************************************
|
|
|
|
# This Makefile should be included.
|
|
|
|
# It expects:
|
|
# - Makefile.common to be included as well
|
|
# - a ROOTDIR variable pointing to the repository root
|
|
# relative to the including Makefile
|
|
|
|
# It exports definitions of BEST_OCAML{C,OPT,LEX,DEP} commands that
|
|
# run to either the bytecode binary built in the repository or the
|
|
# native binary, if available. Note that they never use the boot/
|
|
# versions: we assume that ocamlc, ocamlopt, etc. have been run first.
|
|
|
|
ifeq "$(wildcard $(ROOTDIR)/ocamlc.opt)" ""
|
|
BEST_OCAMLC = $(CAMLRUN) $(ROOTDIR)/ocamlc
|
|
else
|
|
BEST_OCAMLC = $(ROOTDIR)/ocamlc.opt
|
|
endif
|
|
|
|
BEST_OCAMLDEP = $(BEST_OCAMLC) -depend
|
|
|
|
ifeq "$(wildcard $(ROOTDIR)/ocamlopt.opt)" ""
|
|
BEST_OCAMLOPT = $(CAMLRUN) $(ROOTDIR)/ocamlopt
|
|
else
|
|
BEST_OCAMLOPT = $(ROOTDIR)/ocamlopt.opt
|
|
endif
|
|
|
|
ifeq "$(wildcard $(ROOTDIR)/lex/ocamllex.opt)" ""
|
|
BEST_OCAMLLEX = $(CAMLRUN) $(ROOTDIR)/lex/ocamllex
|
|
else
|
|
BEST_OCAMLLEX = $(ROOTDIR)/lex/ocamllex.opt
|
|
endif
|