2008-07-23 22:18:31 -07:00
|
|
|
#########################################################################
|
|
|
|
# #
|
2011-07-27 07:17:02 -07:00
|
|
|
# OCaml #
|
2008-07-23 22:18:31 -07: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 GNU Library General Public License, with #
|
|
|
|
# the special exception on linking described in file ../LICENSE. #
|
|
|
|
# #
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
include ../config/Makefile
|
2013-11-29 05:04:38 -08:00
|
|
|
RUNTIME=../boot/ocamlrun
|
|
|
|
COMPILER=../ocamlc
|
|
|
|
CAMLC=$(RUNTIME) $(COMPILER)
|
2014-04-29 04:56:17 -07:00
|
|
|
COMPFLAGS=-strict-sequence -w +33..39 -g -warn-error A -bin-annot -nostdlib \
|
|
|
|
-safe-string
|
2013-11-29 05:04:38 -08:00
|
|
|
OPTCOMPILER=../ocamlopt
|
|
|
|
CAMLOPT=$(RUNTIME) $(OPTCOMPILER)
|
2008-07-23 22:18:31 -07:00
|
|
|
CAMLDEP=../boot/ocamlrun ../tools/ocamldep
|
|
|
|
|
2014-06-09 06:53:45 -07:00
|
|
|
OBJS=camlinternalFormatBasics.cmo pervasives.cmo $(OTHERS)
|
2014-04-29 04:56:17 -07:00
|
|
|
OTHERS=array.cmo list.cmo char.cmo bytes.cmo string.cmo sys.cmo \
|
2012-04-19 06:17:40 -07:00
|
|
|
sort.cmo marshal.cmo obj.cmo \
|
2008-07-23 22:18:31 -07:00
|
|
|
int32.cmo int64.cmo nativeint.cmo \
|
|
|
|
lexing.cmo parsing.cmo \
|
2008-08-01 09:57:10 -07:00
|
|
|
set.cmo map.cmo stack.cmo queue.cmo \
|
|
|
|
camlinternalLazy.cmo lazy.cmo stream.cmo \
|
2014-05-12 08:37:29 -07:00
|
|
|
buffer.cmo camlinternalFormat.cmo printf.cmo \
|
2008-07-23 22:18:31 -07:00
|
|
|
arg.cmo printexc.cmo gc.cmo \
|
2012-04-19 06:17:40 -07:00
|
|
|
digest.cmo random.cmo hashtbl.cmo format.cmo scanf.cmo callback.cmo \
|
2008-07-23 22:18:31 -07:00
|
|
|
camlinternalOO.cmo oo.cmo camlinternalMod.cmo \
|
|
|
|
genlex.cmo weak.cmo \
|
|
|
|
filename.cmo complex.cmo \
|
2014-04-29 04:56:17 -07:00
|
|
|
arrayLabels.cmo listLabels.cmo bytesLabels.cmo \
|
|
|
|
stringLabels.cmo moreLabels.cmo stdLabels.cmo
|
2008-07-23 22:18:31 -07:00
|
|
|
|
|
|
|
all: stdlib.cma std_exit.cmo camlheader camlheader_ur
|
|
|
|
|
2014-04-07 00:06:17 -07:00
|
|
|
INSTALL_LIBDIR=$(DESTDIR)$(LIBDIR)
|
|
|
|
|
2011-03-17 09:18:05 -07:00
|
|
|
install: install-$(RUNTIMED)
|
|
|
|
cp stdlib.cma std_exit.cmo *.cmi *.mli *.ml camlheader camlheader_ur \
|
2014-04-07 00:06:17 -07:00
|
|
|
$(INSTALL_LIBDIR)
|
2011-03-17 09:18:05 -07:00
|
|
|
|
|
|
|
install-noruntimed:
|
|
|
|
.PHONY: install-noruntimed
|
|
|
|
|
|
|
|
install-runtimed: camlheaderd
|
2014-04-07 00:06:17 -07:00
|
|
|
cp camlheaderd $(INSTALL_LIBDIR)
|
2011-03-17 09:18:05 -07:00
|
|
|
.PHONY: install-runtimed
|
2008-07-23 22:18:31 -07:00
|
|
|
|
|
|
|
stdlib.cma: $(OBJS)
|
|
|
|
$(CAMLC) -a -o stdlib.cma $(OBJS)
|
|
|
|
|
|
|
|
stdlib.cmxa: $(OBJS:.cmo=.cmx)
|
|
|
|
$(CAMLOPT) -a -o stdlib.cmxa $(OBJS:.cmo=.cmx)
|
|
|
|
|
|
|
|
sys.ml: sys.mlp ../VERSION
|
2010-05-21 04:28:21 -07:00
|
|
|
sed -e "s|%%VERSION%%|`sed -e 1q ../VERSION`|" sys.mlp >sys.ml
|
2008-07-23 22:18:31 -07:00
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f sys.ml
|
|
|
|
|
|
|
|
clean::
|
2011-03-17 09:18:05 -07:00
|
|
|
rm -f camlheader camlheader_ur camlheaderd
|
2008-07-23 22:18:31 -07:00
|
|
|
|
|
|
|
.SUFFIXES: .mli .ml .cmi .cmo .cmx .p.cmx
|
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(CAMLC) $(COMPFLAGS) `./Compflags $@` -c $<
|
|
|
|
|
|
|
|
.ml.cmo:
|
|
|
|
$(CAMLC) $(COMPFLAGS) `./Compflags $@` -c $<
|
|
|
|
|
|
|
|
.ml.cmx:
|
2014-04-17 02:49:33 -07:00
|
|
|
$(CAMLOPT) $(COMPFLAGS) `./Compflags $@` -c $<
|
2008-07-23 22:18:31 -07:00
|
|
|
|
|
|
|
.ml.p.cmx:
|
2014-04-17 02:49:33 -07:00
|
|
|
$(CAMLOPT) $(COMPFLAGS) `./Compflags $@` -p -c -o $*.p.cmx $<
|
2008-07-23 22:18:31 -07:00
|
|
|
|
2013-11-29 05:04:38 -08:00
|
|
|
# Dependencies on the compiler
|
|
|
|
$(OBJS) std_exit.cmo: $(COMPILER)
|
|
|
|
$(OBJS:.cmo=.cmi) std_exit.cmi: $(COMPILER)
|
|
|
|
$(OBJS:.cmo=.cmx) std_exit.cmx: $(OPTCOMPILER)
|
|
|
|
$(OBJS:.cmo=.p.cmx) std_exit.p.cmx: $(OPTCOMPILER)
|
|
|
|
|
2008-07-23 22:18:31 -07:00
|
|
|
# Dependencies on Pervasives (not tracked by ocamldep)
|
2014-06-09 06:53:45 -07:00
|
|
|
$(OTHERS) std_exit.cmo: pervasives.cmi
|
2008-07-23 22:18:31 -07:00
|
|
|
$(OTHERS:.cmo=.cmi) std_exit.cmi: pervasives.cmi
|
|
|
|
$(OBJS:.cmo=.cmx) std_exit.cmx: pervasives.cmi
|
|
|
|
$(OBJS:.cmo=.p.cmx) std_exit.p.cmx: pervasives.cmi
|
|
|
|
$(OTHERS:.cmo=.cmx) std_exit.cmx: pervasives.cmx
|
|
|
|
$(OTHERS:.cmo=.p.cmx) std_exit.p.cmx: pervasives.cmx
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f *.cm* *.$(O) *.$(A)
|
|
|
|
rm -f *~
|
|
|
|
|
|
|
|
include .depend
|
|
|
|
|
|
|
|
depend:
|
|
|
|
$(CAMLDEP) *.mli *.ml > .depend
|
2010-04-26 05:54:11 -07:00
|
|
|
$(CAMLDEP) *.ml | sed -e 's/\.cmx/.p.cmx/g' >>.depend
|