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-13 08:29:09 -08:00
|
|
|
include ../../config/Makefile
|
1995-12-20 02:39:12 -08:00
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../stdlib
|
|
|
|
CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib
|
2007-01-29 04:11:18 -08:00
|
|
|
OPTFLAGS=-S -g
|
1996-04-30 07:53:58 -07:00
|
|
|
CAMLDEP=../../boot/ocamlrun ../../tools/ocamldep
|
|
|
|
CAMLRUN=../../byterun/ocamlrun
|
1999-11-18 09:57:48 -08:00
|
|
|
CODERUNPARAMS=OCAMLRUNPARAM='o=100'
|
1995-12-20 02:39:12 -08:00
|
|
|
|
2007-11-06 13:06:18 -08:00
|
|
|
OUTS=callback.bin manyargs.bin \
|
|
|
|
cm.byt cmlinked.bin cm.bin \
|
|
|
|
bigarrays.bin bigarrf.bin fftba.bin globroots.bin float.bin intext.bin \
|
|
|
|
printf scanf regexp.byt regexp.opt md5.bin recmod.bin
|
2007-10-09 03:29:37 -07:00
|
|
|
|
2007-11-06 13:06:18 -08:00
|
|
|
BROKENS=# multdef.bin
|
2007-10-09 03:29:37 -07:00
|
|
|
|
|
|
|
all: $(OUTS)
|
|
|
|
|
1995-12-20 02:39:12 -08:00
|
|
|
callback.byt: callback.cmo callbackprim.o
|
1997-11-28 02:35:58 -08:00
|
|
|
$(CAMLC) -o callback.byt -custom callback.cmo callbackprim.o ../../otherlibs/unix/libunix.a
|
2007-11-06 13:06:18 -08:00
|
|
|
callback.bin: callback.cmx callbackprim.o
|
|
|
|
$(CAMLOPT) -o callback.bin callback.cmx callbackprim.o ../../otherlibs/unix/libunix.a
|
1995-12-20 02:39:12 -08:00
|
|
|
|
|
|
|
manyargs.byt: manyargs.cmo manyargsprim.o
|
|
|
|
$(CAMLC) -o manyargs.byt -custom manyargs.cmo manyargsprim.o
|
2007-11-06 13:06:18 -08:00
|
|
|
manyargs.bin: manyargs.cmx manyargsprim.o
|
|
|
|
$(CAMLOPT) -inline 0 -o manyargs.bin manyargs.cmx manyargsprim.o
|
1995-12-20 02:39:12 -08:00
|
|
|
|
2007-11-06 13:06:18 -08:00
|
|
|
multdef.bin: multdef.cmx usemultdef.cmx
|
|
|
|
$(CAMLOPT) -o multdef.bin multdef.cmx usemultdef.cmx
|
1996-03-20 02:51:37 -08:00
|
|
|
|
1997-03-17 02:18:39 -08:00
|
|
|
cm.byt: cmcaml.ml cmstub.c cmmain.c
|
1997-02-02 06:54:33 -08:00
|
|
|
$(CAMLC) -custom -o cm.byt cmcaml.ml cmstub.c cmmain.c
|
1996-11-08 06:47:40 -08:00
|
|
|
|
2007-11-06 13:06:18 -08:00
|
|
|
cmlinked.bin: cmcaml.ml cmstub.c cmmain.c
|
1997-02-02 06:54:33 -08:00
|
|
|
$(CAMLC) -output-obj -o cm.o cmcaml.ml
|
2007-11-06 13:06:18 -08:00
|
|
|
$(BYTECC) -g -o cmlinked.bin cm.o -I../../byterun -DNO_BYTECODE_FILE cmstub.c cmmain.c ../../byterun/libcamlrun.a $(BYTECCLIBS)
|
1996-11-08 06:47:40 -08:00
|
|
|
|
2007-11-06 13:06:18 -08:00
|
|
|
cm.bin: cmcaml.ml cmstub.c cmmain.c
|
1997-02-02 06:54:33 -08:00
|
|
|
$(CAMLOPT) -output-obj -o cm.o cmcaml.ml
|
2007-11-06 13:06:18 -08:00
|
|
|
$(NATIVECC) -g -o cm.bin cm.o -I$(LIBDIR) -DNO_BYTECODE_FILE cmstub.c cmmain.c ../../asmrun/libasmrun.a $(NATIVECCLIBS)
|
1996-11-08 06:47:40 -08:00
|
|
|
|
2000-02-29 09:41:12 -08:00
|
|
|
bigarrays.byt: ../../otherlibs/bigarray/bigarray.cma \
|
2000-02-22 09:34:55 -08:00
|
|
|
../../otherlibs/bigarray/libbigarray.a bigarrays.ml
|
2002-12-09 06:06:08 -08:00
|
|
|
$(CAMLC) -custom -o bigarrays.byt \
|
2000-02-25 05:46:11 -08:00
|
|
|
-I ../../otherlibs/bigarray \
|
|
|
|
-I ../../otherlibs/unix \
|
2000-04-16 07:36:44 -07:00
|
|
|
unix.cma bigarray.cma bigarrays.ml
|
2000-02-22 09:34:55 -08:00
|
|
|
|
2007-11-06 13:06:18 -08:00
|
|
|
bigarrays.bin: ../../otherlibs/bigarray/bigarray.cmxa \
|
2000-02-22 09:34:55 -08:00
|
|
|
../../otherlibs/bigarray/libbigarray.a bigarrays.ml
|
2007-11-06 13:06:18 -08:00
|
|
|
$(CAMLOPT) $(OPTFLAGS) -o bigarrays.bin \
|
2000-02-25 05:46:11 -08:00
|
|
|
-I ../../otherlibs/bigarray \
|
|
|
|
-I ../../otherlibs/unix \
|
2000-04-16 07:36:44 -07:00
|
|
|
unix.cmxa bigarray.cmxa bigarrays.ml
|
2000-02-29 09:41:12 -08:00
|
|
|
|
|
|
|
bigarrf.byt: bigarrf.o bigarrfstub.o \
|
|
|
|
../../otherlibs/bigarray/bigarray.cma \
|
|
|
|
../../otherlibs/bigarray/libbigarray.a bigarrfml.ml
|
|
|
|
$(CAMLC) -custom -o bigarrf.byt \
|
|
|
|
-I ../../otherlibs/bigarray \
|
|
|
|
-I ../../otherlibs/unix \
|
|
|
|
unix.cma bigarray.cma bigarrf.ml \
|
2000-02-29 01:11:26 -08:00
|
|
|
bigarrf.o bigarrfstub.o \
|
2000-02-29 09:41:12 -08:00
|
|
|
../../byterun/libcamlrun.a -cclib -lg2c
|
|
|
|
|
2007-11-06 13:06:18 -08:00
|
|
|
bigarrf.bin: bigarrf.o bigarrfstub.o \
|
2000-02-29 09:41:12 -08:00
|
|
|
../../otherlibs/bigarray/bigarray.cma \
|
|
|
|
../../otherlibs/bigarray/libbigarray.a bigarrfml.ml
|
2007-11-06 13:06:18 -08:00
|
|
|
$(CAMLOPT) $(OPTFLAGS) -o bigarrf.bin \
|
2000-02-29 09:41:12 -08:00
|
|
|
-I ../../otherlibs/bigarray \
|
|
|
|
-I ../../otherlibs/unix \
|
|
|
|
unix.cma bigarray.cma bigarrf.ml \
|
|
|
|
bigarrf.o bigarrfstub.o \
|
|
|
|
../../byterun/libcamlrun.a -cclib -lg2c
|
2000-02-29 01:11:26 -08:00
|
|
|
|
|
|
|
bigarrf.o: bigarrf.f
|
|
|
|
g77 -c bigarrf.f
|
|
|
|
|
|
|
|
bigarrfstub.o: bigarrfstub.c
|
|
|
|
$(NATIVECC) $(NATIVECCCOMPOPTS) -I../../byterun -I../../otherlibs/bigarray -c bigarrfstub.c
|
2000-02-22 09:34:55 -08:00
|
|
|
|
2000-03-10 06:54:41 -08:00
|
|
|
fftba.byt: fftba.ml
|
|
|
|
$(CAMLC) -o fftba.byt -I ../../otherlibs/bigarray \
|
2000-04-16 07:36:44 -07:00
|
|
|
bigarray.cma fftba.ml
|
2000-03-10 06:54:41 -08:00
|
|
|
|
2007-11-06 13:06:18 -08:00
|
|
|
fftba.bin: fftba.ml
|
|
|
|
$(CAMLOPT) $(OPTFLAGS) -o fftba.bin -I ../../otherlibs/bigarray \
|
2000-04-16 07:36:44 -07:00
|
|
|
bigarray.cmxa fftba.ml
|
2000-03-10 06:54:41 -08:00
|
|
|
|
2001-08-11 10:36:38 -07:00
|
|
|
globroots.byt: globroots.ml globrootsprim.o
|
|
|
|
$(CAMLC) -custom -o globroots.byt globroots.ml globrootsprim.o
|
|
|
|
|
2007-11-06 13:06:18 -08:00
|
|
|
globroots.bin: globroots.ml globrootsprim.o
|
|
|
|
$(CAMLOPT) -o globroots.bin globroots.ml globrootsprim.o
|
2001-08-11 10:36:38 -07:00
|
|
|
|
|
|
|
globrootsprim.o: globrootsprim.c
|
|
|
|
$(BYTECC) $(BYTECCCOMPOPTS) -I../../byterun -c globrootsprim.c
|
|
|
|
|
2001-11-27 07:07:33 -08:00
|
|
|
float.byt: float.cmo
|
|
|
|
${CAMLC} -o float.byt float.cmo
|
2007-11-06 13:06:18 -08:00
|
|
|
float.bin: float.cmx
|
|
|
|
${CAMLOPT} -o float.bin float.cmx
|
2001-11-27 07:07:33 -08:00
|
|
|
|
2001-12-03 07:46:36 -08:00
|
|
|
intext.byt: intext.cmo intextaux.o
|
|
|
|
${CAMLC} -o intext.byt -custom intext.cmo intextaux.o
|
2007-11-06 13:06:18 -08:00
|
|
|
intext.bin: intext.cmx intextaux.o
|
|
|
|
${CAMLOPT} -o intext.bin intext.cmx intextaux.o
|
2001-12-03 07:46:36 -08:00
|
|
|
|
2006-01-20 02:14:47 -08:00
|
|
|
tprintf.byt: testing.cmo tprintf.cmo
|
|
|
|
${CAMLC} -o tprintf.byt testing.cmo tprintf.cmo
|
2007-11-06 13:06:18 -08:00
|
|
|
tprintf.bin: testing.cmx tprintf.cmx
|
|
|
|
${CAMLOPT} -o tprintf.bin testing.cmx tprintf.cmx
|
2006-01-20 02:14:47 -08:00
|
|
|
|
2007-11-06 13:06:18 -08:00
|
|
|
printf: tprintf.byt tprintf.bin
|
2006-01-20 02:14:47 -08:00
|
|
|
./tprintf.byt
|
2007-11-06 13:06:18 -08:00
|
|
|
./tprintf.bin
|
2006-01-20 02:14:47 -08:00
|
|
|
|
|
|
|
tscanf.byt: testing.cmo tscanf.cmo
|
|
|
|
${CAMLC} -o tscanf.byt testing.cmo tscanf.cmo
|
2007-11-06 13:06:18 -08:00
|
|
|
tscanf.bin: testing.cmx tscanf.cmx
|
|
|
|
${CAMLOPT} -o tscanf.bin testing.cmx tscanf.cmx
|
2002-10-10 03:44:12 -07:00
|
|
|
|
2005-07-01 05:39:43 -07:00
|
|
|
tscanf2.byt: tscanf2_io.cmo tscanf2_slave.cmo tscanf2_master.cmo
|
|
|
|
${CAMLC} -o tscanf2_slave.byt tscanf2_io.cmo tscanf2_slave.cmo
|
|
|
|
${CAMLC} -o tscanf2_master.byt unix.cma \
|
|
|
|
tscanf2_io.cmo tscanf2_master.cmo
|
2007-11-06 13:06:18 -08:00
|
|
|
tscanf2.bin: tscanf2_io.cmx tscanf2_slave.cmx tscanf2_master.cmx
|
|
|
|
${CAMLOPT} -o tscanf2_slave.bin tscanf2_io.cmx tscanf2_slave.cmx
|
|
|
|
${CAMLOPT} -o tscanf2_master.bin unix.cmxa \
|
2005-07-01 05:39:43 -07:00
|
|
|
tscanf2_io.cmx tscanf2_master.cmx
|
|
|
|
|
2007-11-06 13:06:18 -08:00
|
|
|
scanf: tscanf.byt tscanf.bin tscanf2.byt tscanf2.bin
|
2002-12-08 08:05:32 -08:00
|
|
|
./tscanf.byt
|
2007-11-06 13:06:18 -08:00
|
|
|
./tscanf.bin
|
2005-07-01 05:39:43 -07:00
|
|
|
./tscanf2_master.byt ./tscanf2_slave.byt
|
2007-11-06 13:06:18 -08:00
|
|
|
./tscanf2_master.bin ./tscanf2_slave.bin
|
2002-12-08 08:05:32 -08:00
|
|
|
|
2002-12-09 06:06:08 -08:00
|
|
|
regexp.byt: ../../otherlibs/str/str.cma regexp.ml
|
|
|
|
$(CAMLC) -custom -I ../../otherlibs/str -o regexp.byt str.cma regexp.ml
|
|
|
|
regexp.opt: ../../otherlibs/str/str.cmxa regexp.ml
|
|
|
|
$(CAMLOPT) -I ../../otherlibs/str -o regexp.opt str.cmxa regexp.ml
|
|
|
|
|
2007-11-06 13:06:18 -08:00
|
|
|
md5.bin: md5.ml
|
|
|
|
$(CAMLOPT) -unsafe -inline 100 -o md5.bin md5.ml
|
2003-04-25 05:27:31 -07:00
|
|
|
|
2004-08-12 05:59:45 -07:00
|
|
|
recmod.byt: recmod.cmo
|
|
|
|
$(CAMLC) -o recmod.byt recmod.cmo
|
|
|
|
|
2007-11-06 13:06:18 -08:00
|
|
|
recmod.bin: recmod.cmx
|
|
|
|
$(CAMLOPT) -o recmod.bin recmod.cmx
|
2004-08-12 05:59:45 -07:00
|
|
|
|
1995-12-20 02:39:12 -08:00
|
|
|
# Common rules
|
|
|
|
|
|
|
|
.SUFFIXES:
|
2007-11-06 13:06:18 -08:00
|
|
|
.SUFFIXES: .mli .ml .cmi .cmo .cmx .byt .fast.byt .bin .fast.bin .c .o
|
1995-12-20 02:39:12 -08:00
|
|
|
|
|
|
|
.ml.byt:
|
|
|
|
$(CAMLC) -o $*.byt $<
|
|
|
|
|
|
|
|
.ml.fast.byt:
|
|
|
|
cp $*.ml $*_fast.ml
|
|
|
|
$(CAMLC) -unsafe -o $*.fast.byt $*_fast.ml
|
|
|
|
rm -f $*_fast.ml
|
|
|
|
|
2007-11-06 13:06:18 -08:00
|
|
|
.ml.bin:
|
|
|
|
$(CAMLOPT) $(OPTFLAGS) -o $*.bin $<
|
1995-12-20 02:39:12 -08:00
|
|
|
|
2007-11-06 13:06:18 -08:00
|
|
|
.ml.fast.bin:
|
1995-12-20 02:39:12 -08:00
|
|
|
cp $*.ml $*_fast.ml
|
2007-11-06 13:06:18 -08:00
|
|
|
$(CAMLOPT) $(OPTFLAGS) -unsafe -o $*.fast.bin $*_fast.ml
|
1995-12-20 02:39:12 -08:00
|
|
|
rm -f $*_fast.ml
|
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(CAMLC) -c $<
|
|
|
|
|
|
|
|
.ml.cmo:
|
|
|
|
$(CAMLC) -c $<
|
|
|
|
|
|
|
|
.ml.cmx:
|
|
|
|
$(CAMLOPT) $(OPTFLAGS) -c $<
|
|
|
|
|
|
|
|
.c.o:
|
1997-02-03 06:41:42 -08:00
|
|
|
$(NATIVECC) $(NATIVECCCOMPOPTS) -I../../byterun -c $<
|
1995-12-20 02:39:12 -08:00
|
|
|
|
|
|
|
clean::
|
2007-11-06 13:06:18 -08:00
|
|
|
rm -f *.byt *.bin
|
1995-12-20 02:39:12 -08:00
|
|
|
rm -f *.cm[iox] *.[os]
|
|
|
|
rm -f *~
|
1996-04-01 07:26:56 -08:00
|
|
|
rm -f intext.data
|
1995-12-20 02:39:12 -08:00
|
|
|
|
|
|
|
# Dependencies
|
|
|
|
|
2006-01-20 02:14:47 -08:00
|
|
|
#depend:
|
|
|
|
# $(CAMLDEP) *.mli *.ml > .depend
|
1995-12-20 02:39:12 -08:00
|
|
|
|
|
|
|
include .depend
|