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)
|
1996-04-03 02:02:34 -08:00
|
|
|
CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS)
|
2000-02-05 04:16:09 -08:00
|
|
|
CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../stdlib -I ../unix
|
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 \
|
1996-10-31 08:05:15 -08:00
|
|
|
$(LIB)/list.cmo $(LIB)/char.cmo $(LIB)/string.cmo \
|
1996-09-08 08:41:59 -07:00
|
|
|
$(LIB)/array.cmo $(LIB)/sys.cmo $(LIB)/hashtbl.cmo $(LIB)/sort.cmo \
|
1999-12-01 01:30:51 -08:00
|
|
|
$(LIB)/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 \
|
|
|
|
$(LIB)/nativeint.cmo
|
1996-09-08 08:41:59 -07:00
|
|
|
|
|
|
|
all: libthreads.a threads.cma stdlib.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)
|
|
|
|
rm -f libthreads.a
|
|
|
|
ar rc libthreads.a $(C_OBJS)
|
|
|
|
$(RANLIB) libthreads.a
|
|
|
|
|
|
|
|
threads.cma: $(CAML_OBJS)
|
2000-03-09 01:12:28 -08:00
|
|
|
$(CAMLC) -a -o threads.cma -custom $(CAML_OBJS) -cclib -lthreads
|
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)
|
|
|
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
rm -f pervasives.mli
|
1995-11-27 04:53:17 -08:00
|
|
|
|
1995-10-30 02:21:56 -08:00
|
|
|
install:
|
|
|
|
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
|
|
|
|
cp thread.cmi mutex.cmi condition.cmi event.cmi threadUnix.cmi threads.cma stdlib.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:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.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
|