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 GNU Library General Public License. #
|
|
|
|
# #
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
# $Id$
|
|
|
|
|
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
|
2000-02-05 04:16:09 -08:00
|
|
|
CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../stdlib -I ../unix
|
2001-08-28 07:47:48 -07:00
|
|
|
MKLIB=../../tools/ocamlmklib
|
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 \
|
2000-04-16 05:37:59 -07:00
|
|
|
$(LIB)/array.cmo $(LIB)/list.cmo $(LIB)/char.cmo $(LIB)/string.cmo \
|
|
|
|
$(LIB)/sys.cmo $(LIB)/hashtbl.cmo $(LIB)/sort.cmo \
|
2000-07-28 01:49:50 -07:00
|
|
|
marshal.cmo $(LIB)/obj.cmo \
|
1997-11-19 02:01:18 -08:00
|
|
|
$(LIB)/lexing.cmo $(LIB)/parsing.cmo \
|
1996-09-08 08:41:59 -07:00
|
|
|
$(LIB)/set.cmo $(LIB)/map.cmo $(LIB)/stack.cmo $(LIB)/queue.cmo \
|
1999-03-09 02:10:47 -08:00
|
|
|
$(LIB)/stream.cmo $(LIB)/buffer.cmo \
|
|
|
|
$(LIB)/printf.cmo $(LIB)/format.cmo $(LIB)/arg.cmo \
|
1996-09-08 08:41:59 -07:00
|
|
|
$(LIB)/printexc.cmo $(LIB)/gc.cmo $(LIB)/digest.cmo $(LIB)/random.cmo \
|
1997-07-29 06:54:16 -07:00
|
|
|
$(LIB)/oo.cmo $(LIB)/genlex.cmo $(LIB)/callback.cmo $(LIB)/weak.cmo \
|
2000-03-07 19:44:49 -08:00
|
|
|
$(LIB)/lazy.cmo $(LIB)/filename.cmo $(LIB)/int32.cmo $(LIB)/int64.cmo \
|
2001-09-06 01:52:32 -07:00
|
|
|
$(LIB)/nativeint.cmo \
|
|
|
|
$(LIB)/arrayLabels.cmo $(LIB)/listLabels.cmo $(LIB)/stringLabels.cmo \
|
|
|
|
$(LIB)/stdLabels.cmo
|
1996-09-08 08:41:59 -07:00
|
|
|
|
2001-06-25 01:04:00 -07:00
|
|
|
UNIXLIB=../unix
|
|
|
|
|
|
|
|
UNIXLIB_OBJS=unix.cmo
|
|
|
|
|
|
|
|
all: libthreads.a threads.cma stdlib.cma unix.cma
|
1995-10-30 02:21:56 -08:00
|
|
|
|
1995-11-15 08:40:01 -08:00
|
|
|
allopt:
|
|
|
|
|
1995-10-30 02:21:56 -08:00
|
|
|
libthreads.a: $(C_OBJS)
|
2001-08-28 07:47:48 -07:00
|
|
|
$(MKLIB) -o threads $(C_OBJS)
|
1995-10-30 02:21:56 -08:00
|
|
|
|
|
|
|
threads.cma: $(CAML_OBJS)
|
2001-08-28 07:47:48 -07:00
|
|
|
$(MKLIB) -ocamlc '$(CAMLC)' -o threads $(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)
|
2001-08-28 07:47:48 -07: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
|
|
|
|
$(CAMLC) -nopervasives -c pervasives.ml
|
|
|
|
|
|
|
|
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
|
|
|
|
$(CAMLC) -c marshal.ml
|
|
|
|
|
|
|
|
marshal.mli: $(LIB)/marshal.mli
|
|
|
|
ln -s $(LIB)/marshal.mli marshal.mli
|
|
|
|
|
|
|
|
marshal.cmi: $(LIB)/marshal.cmi
|
|
|
|
ln -s $(LIB)/marshal.cmi marshal.cmi
|
|
|
|
|
2001-06-25 01:04:00 -07:00
|
|
|
unix.cmo: unix.mli unix.cmi unix.ml
|
|
|
|
$(CAMLC) -c unix.ml
|
|
|
|
|
|
|
|
unix.mli: $(UNIXLIB)/unix.mli
|
|
|
|
ln -s $(UNIXLIB)/unix.mli unix.mli
|
|
|
|
|
|
|
|
unix.cmi: $(UNIXLIB)/unix.cmi
|
|
|
|
ln -s $(UNIXLIB)/unix.cmi unix.cmi
|
|
|
|
|
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
|
|
|
|
rm -f libthreads.a *.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:
|
2001-08-28 07:47:48 -07:00
|
|
|
test -f libthreads.so && cp libthreads.so $(LIBDIR)/libthreads.so
|
1995-10-30 02:21:56 -08:00
|
|
|
cp libthreads.a $(LIBDIR)/libthreads.a
|
|
|
|
cd $(LIBDIR); $(RANLIB) libthreads.a
|
1996-09-09 05:35:55 -07:00
|
|
|
if test -d $(LIBDIR)/threads; then : ; else mkdir $(LIBDIR)/threads; fi
|
2001-06-25 01:04:00 -07:00
|
|
|
cp thread.cmi mutex.cmi condition.cmi event.cmi threadUnix.cmi threads.cma stdlib.cma unix.cma $(LIBDIR)/threads
|
1997-07-29 06:54:16 -07:00
|
|
|
cp thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(LIBDIR)
|
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
|
|
|
|
|
|
|
.ml.cmx:
|
|
|
|
$(CAMLOPT) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
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
|