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 #
|
2001-12-07 05:41:02 -08:00
|
|
|
# under the terms of the GNU Library General Public License, with #
|
|
|
|
# the special exception on linking described in file ../../LICENSE. #
|
1999-11-17 10:59:06 -08:00
|
|
|
# #
|
|
|
|
#########################################################################
|
|
|
|
|
1996-02-13 08:28:00 -08:00
|
|
|
include ../../config/Makefile
|
1995-10-30 02:21:56 -08:00
|
|
|
|
|
|
|
CC=$(BYTECC)
|
2001-08-28 07:47:48 -07:00
|
|
|
CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -g
|
2014-04-02 09:20:38 -07:00
|
|
|
ROOTDIR=../..
|
|
|
|
CAMLC=$(ROOTDIR)/boot/ocamlrun $(ROOTDIR)/ocamlc -nostdlib -I $(ROOTDIR)/stdlib -I $(ROOTDIR)/otherlibs/unix
|
2001-11-08 02:32:24 -08:00
|
|
|
MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
|
2014-03-07 06:47:30 -08:00
|
|
|
COMPFLAGS=-w +33..39 -warn-error A -bin-annot
|
1995-10-30 02:21:56 -08:00
|
|
|
|
1996-04-03 02:02:34 -08:00
|
|
|
C_OBJS=scheduler.o
|
1995-10-30 02:21:56 -08:00
|
|
|
|
1998-08-08 11:42:22 -07:00
|
|
|
CAML_OBJS=thread.cmo mutex.cmo condition.cmo event.cmo threadUnix.cmo
|
1996-09-08 08:41:59 -07:00
|
|
|
|
|
|
|
LIB=../../stdlib
|
|
|
|
|
|
|
|
LIB_OBJS=pervasives.cmo \
|
2012-04-19 06:17:40 -07:00
|
|
|
$(LIB)/array.cmo $(LIB)/list.cmo $(LIB)/char.cmo $(LIB)/string.cmo \
|
|
|
|
$(LIB)/sys.cmo $(LIB)/sort.cmo marshal.cmo $(LIB)/obj.cmo \
|
|
|
|
$(LIB)/int32.cmo $(LIB)/int64.cmo $(LIB)/nativeint.cmo \
|
|
|
|
$(LIB)/lexing.cmo $(LIB)/parsing.cmo $(LIB)/set.cmo $(LIB)/map.cmo \
|
|
|
|
$(LIB)/stack.cmo $(LIB)/queue.cmo $(LIB)/camlinternalLazy.cmo \
|
|
|
|
$(LIB)/lazy.cmo $(LIB)/stream.cmo $(LIB)/buffer.cmo \
|
|
|
|
$(LIB)/printf.cmo $(LIB)/arg.cmo $(LIB)/printexc.cmo $(LIB)/gc.cmo \
|
|
|
|
$(LIB)/digest.cmo $(LIB)/random.cmo $(LIB)/hashtbl.cmo \
|
2012-08-20 21:45:02 -07:00
|
|
|
$(LIB)/format.cmo $(LIB)/scanf.cmo $(LIB)/callback.cmo \
|
|
|
|
$(LIB)/camlinternalOO.cmo \
|
2012-04-19 06:17:40 -07:00
|
|
|
$(LIB)/oo.cmo $(LIB)/camlinternalMod.cmo $(LIB)/genlex.cmo \
|
2012-08-20 21:45:02 -07:00
|
|
|
$(LIB)/weak.cmo $(LIB)/filename.cmo \
|
2012-04-19 06:17:40 -07:00
|
|
|
$(LIB)/complex.cmo $(LIB)/arrayLabels.cmo $(LIB)/listLabels.cmo \
|
|
|
|
$(LIB)/stringLabels.cmo $(LIB)/stdLabels.cmo $(LIB)/moreLabels.cmo
|
1996-09-08 08:41:59 -07:00
|
|
|
|
2001-06-25 01:04:00 -07:00
|
|
|
UNIXLIB=../unix
|
|
|
|
|
2001-10-02 08:12:10 -07:00
|
|
|
UNIXLIB_OBJS=unix.cmo $(UNIXLIB)/unixLabels.cmo
|
2001-06-25 01:04:00 -07:00
|
|
|
|
2003-07-17 01:38:28 -07:00
|
|
|
all: libvmthreads.a threads.cma stdlib.cma unix.cma
|
1995-10-30 02:21:56 -08:00
|
|
|
|
1995-11-15 08:40:01 -08:00
|
|
|
allopt:
|
|
|
|
|
2003-07-17 01:38:28 -07:00
|
|
|
libvmthreads.a: $(C_OBJS)
|
|
|
|
$(MKLIB) -o threads -oc vmthreads $(C_OBJS)
|
1995-10-30 02:21:56 -08:00
|
|
|
|
|
|
|
threads.cma: $(CAML_OBJS)
|
2013-11-29 05:04:38 -08:00
|
|
|
$(MKLIB) -ocamlc '$(CAMLC)' -o threads -oc vmthreads $(CAML_OBJS)
|
1995-10-30 02:21:56 -08:00
|
|
|
|
1996-09-08 08:41:59 -07:00
|
|
|
stdlib.cma: $(LIB_OBJS)
|
|
|
|
$(CAMLC) -a -o stdlib.cma $(LIB_OBJS)
|
|
|
|
|
2001-06-25 01:04:00 -07:00
|
|
|
unix.cma: $(UNIXLIB_OBJS)
|
2013-11-29 05:04:38 -08:00
|
|
|
$(MKLIB) -ocamlc '$(CAMLC)' -o unix -linkall $(UNIXLIB_OBJS)
|
2001-06-25 01:04:00 -07:00
|
|
|
|
1996-09-08 08:41:59 -07:00
|
|
|
pervasives.cmo: pervasives.mli pervasives.cmi pervasives.ml
|
2002-01-20 08:30:40 -08:00
|
|
|
$(CAMLC) ${COMPFLAGS} -nopervasives -c pervasives.ml
|
1996-09-08 08:41:59 -07:00
|
|
|
|
|
|
|
pervasives.mli: $(LIB)/pervasives.mli
|
|
|
|
ln -s $(LIB)/pervasives.mli pervasives.mli
|
|
|
|
|
|
|
|
pervasives.cmi: $(LIB)/pervasives.cmi
|
|
|
|
ln -s $(LIB)/pervasives.cmi pervasives.cmi
|
|
|
|
|
2000-07-28 01:49:50 -07:00
|
|
|
marshal.cmo: marshal.mli marshal.cmi marshal.ml
|
2002-01-20 08:30:40 -08:00
|
|
|
$(CAMLC) ${COMPFLAGS} -c marshal.ml
|
2000-07-28 01:49:50 -07:00
|
|
|
|
|
|
|
marshal.mli: $(LIB)/marshal.mli
|
|
|
|
ln -s $(LIB)/marshal.mli marshal.mli
|
|
|
|
|
|
|
|
marshal.cmi: $(LIB)/marshal.cmi
|
|
|
|
ln -s $(LIB)/marshal.cmi marshal.cmi
|
|
|
|
|
2007-02-16 01:54:55 -08:00
|
|
|
unix.mli: $(UNIXLIB)/unix.mli
|
2008-10-08 06:09:39 -07:00
|
|
|
ln -s -f $(UNIXLIB)/unix.mli unix.mli
|
2007-02-16 01:54:55 -08:00
|
|
|
|
|
|
|
unix.cmi: $(UNIXLIB)/unix.cmi
|
2008-10-08 06:09:39 -07:00
|
|
|
ln -s -f $(UNIXLIB)/unix.cmi unix.cmi
|
2007-02-16 01:54:55 -08:00
|
|
|
|
2007-10-09 03:29:37 -07:00
|
|
|
unix.cmo: unix.mli unix.cmi $(UNIXLIB)/unixLabels.cmo
|
2002-01-20 08:30:40 -08:00
|
|
|
$(CAMLC) ${COMPFLAGS} -c unix.ml
|
2001-06-25 01:04:00 -07:00
|
|
|
|
1997-02-16 05:36:42 -08:00
|
|
|
partialclean:
|
|
|
|
rm -f *.cm*
|
1995-10-30 02:21:56 -08:00
|
|
|
|
1997-02-16 05:36:42 -08:00
|
|
|
clean: partialclean
|
2003-07-17 01:38:28 -07:00
|
|
|
rm -f libvmthreads.a dllvmthreads.so *.o
|
2001-06-25 01:04:00 -07:00
|
|
|
rm -f pervasives.mli marshal.mli unix.mli
|
1995-11-27 04:53:17 -08:00
|
|
|
|
1995-10-30 02:21:56 -08:00
|
|
|
install:
|
2003-07-17 01:38:28 -07:00
|
|
|
if test -f dllvmthreads.so; then cp dllvmthreads.so $(STUBLIBDIR)/.; fi
|
|
|
|
mkdir -p $(LIBDIR)/vmthreads
|
|
|
|
cp libvmthreads.a $(LIBDIR)/vmthreads/libvmthreads.a
|
|
|
|
cd $(LIBDIR)/vmthreads; $(RANLIB) libvmthreads.a
|
2013-09-04 08:12:37 -07:00
|
|
|
cp thread.cmi mutex.cmi condition.cmi event.cmi threadUnix.cmi \
|
|
|
|
threads.cma stdlib.cma unix.cma $(LIBDIR)/vmthreads
|
|
|
|
cp thread.mli mutex.mli condition.mli event.mli threadUnix.mli \
|
|
|
|
$(LIBDIR)/vmthreads
|
1995-10-30 02:21:56 -08:00
|
|
|
|
1995-11-15 08:40:01 -08:00
|
|
|
installopt:
|
|
|
|
|
1995-10-30 02:21:56 -08:00
|
|
|
.SUFFIXES: .ml .mli .cmo .cmi .cmx
|
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.ml.cmo:
|
2001-06-25 01:04:00 -07:00
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
1995-10-30 02:21:56 -08:00
|
|
|
|
|
|
|
depend:
|
|
|
|
gcc -MM $(CFLAGS) *.c > .depend
|
1998-04-21 09:09:03 -07:00
|
|
|
../../boot/ocamlrun ../../tools/ocamldep *.mli *.ml >> .depend
|
1995-10-30 02:21:56 -08:00
|
|
|
|
|
|
|
include .depend
|