Sys.Signals module for a Variant type of signals (and a set_signal function that...
[ocaml.git] / otherlibs / threads / Makefile
blob7c546c449f08fbf684a53721ae6531cc132d0771
1 #########################################################################
2 # #
3 # Objective Caml #
4 # #
5 # Xavier Leroy, projet Cristal, INRIA Rocquencourt #
6 # #
7 # Copyright 1999 Institut National de Recherche en Informatique et #
8 # en Automatique. All rights reserved. This file is distributed #
9 # under the terms of the GNU Library General Public License, with #
10 # the special exception on linking described in file ../../LICENSE. #
11 # #
12 #########################################################################
14 # $Id$
16 include ../../config/Makefile
18 CC=$(BYTECC)
19 CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -g
20 CAMLC=../../ocamlcomp.sh -I ../unix
21 MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
22 COMPFLAGS=-warn-error A
24 C_OBJS=scheduler.o
26 CAML_OBJS=thread.cmo mutex.cmo condition.cmo event.cmo threadUnix.cmo
28 LIB=../../stdlib
30 LIB_OBJS=pervasives.cmo \
31 $(LIB)/array.cmo $(LIB)/list.cmo $(LIB)/char.cmo $(LIB)/string.cmo \
32 $(LIB)/sys.cmo $(LIB)/hashtbl.cmo $(LIB)/sort.cmo \
33 marshal.cmo $(LIB)/obj.cmo $(LIB)/int32.cmo $(LIB)/int64.cmo \
34 $(LIB)/nativeint.cmo \
35 $(LIB)/lexing.cmo $(LIB)/parsing.cmo \
36 $(LIB)/set.cmo $(LIB)/map.cmo $(LIB)/stack.cmo $(LIB)/queue.cmo \
37 $(LIB)/stream.cmo $(LIB)/buffer.cmo \
38 $(LIB)/printf.cmo $(LIB)/format.cmo \
39 $(LIB)/scanf.cmo $(LIB)/arg.cmo \
40 $(LIB)/printexc.cmo $(LIB)/gc.cmo $(LIB)/digest.cmo $(LIB)/random.cmo \
41 $(LIB)/camlinternalOO.cmo $(LIB)/oo.cmo $(LIB)/camlinternalMod.cmo \
42 $(LIB)/genlex.cmo $(LIB)/callback.cmo $(LIB)/weak.cmo \
43 $(LIB)/lazy.cmo $(LIB)/filename.cmo $(LIB)/complex.cmo \
44 $(LIB)/arrayLabels.cmo $(LIB)/listLabels.cmo $(LIB)/stringLabels.cmo \
45 $(LIB)/stdLabels.cmo $(LIB)/moreLabels.cmo
47 UNIXLIB=../unix
49 UNIXLIB_OBJS=unix.cmo $(UNIXLIB)/unixLabels.cmo
51 all: libvmthreads.a threads.cma stdlib.cma unix.cma
53 allopt:
55 libvmthreads.a: $(C_OBJS)
56 $(MKLIB) -o threads -oc vmthreads $(C_OBJS)
58 threads.cma: $(CAML_OBJS)
59 $(MKLIB) -ocamlc '$(CAMLC)' -o threads -oc vmthreads $(CAML_OBJS)
61 stdlib.cma: $(LIB_OBJS)
62 $(CAMLC) -a -o stdlib.cma $(LIB_OBJS)
64 unix.cma: $(UNIXLIB_OBJS)
65 $(MKLIB) -ocamlc '$(CAMLC)' -o unix -linkall $(UNIXLIB_OBJS)
67 pervasives.cmo: pervasives.mli pervasives.cmi pervasives.ml
68 $(CAMLC) ${COMPFLAGS} -nopervasives -c pervasives.ml
70 pervasives.mli: $(LIB)/pervasives.mli
71 ln -s $(LIB)/pervasives.mli pervasives.mli
73 pervasives.cmi: $(LIB)/pervasives.cmi
74 ln -s $(LIB)/pervasives.cmi pervasives.cmi
76 marshal.cmo: marshal.mli marshal.cmi marshal.ml
77 $(CAMLC) ${COMPFLAGS} -c marshal.ml
79 marshal.mli: $(LIB)/marshal.mli
80 ln -s $(LIB)/marshal.mli marshal.mli
82 marshal.cmi: $(LIB)/marshal.cmi
83 ln -s $(LIB)/marshal.cmi marshal.cmi
85 unix.mli: $(UNIXLIB)/unix.mli
86 ln -sf $(UNIXLIB)/unix.mli unix.mli
88 unix.cmi: $(UNIXLIB)/unix.cmi
89 ln -sf $(UNIXLIB)/unix.cmi unix.cmi
91 unix.cmo: unix.mli unix.cmi $(UNIXLIB)/unixLabels.cmo
92 $(CAMLC) ${COMPFLAGS} -c unix.ml
94 partialclean:
95 rm -f *.cm*
97 clean: partialclean
98 rm -f libvmthreads.a dllvmthreads.so *.o
99 rm -f pervasives.mli marshal.mli unix.mli
101 install:
102 if test -f dllvmthreads.so; then cp dllvmthreads.so $(STUBLIBDIR)/.; fi
103 mkdir -p $(LIBDIR)/vmthreads
104 cp libvmthreads.a $(LIBDIR)/vmthreads/libvmthreads.a
105 cd $(LIBDIR)/vmthreads; $(RANLIB) libvmthreads.a
106 cp thread.cmi mutex.cmi condition.cmi event.cmi threadUnix.cmi threads.cma stdlib.cma unix.cma $(LIBDIR)/vmthreads
107 cp thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(LIBDIR)/vmthreads
109 installopt:
111 .SUFFIXES: .ml .mli .cmo .cmi .cmx
113 .mli.cmi:
114 $(CAMLC) -c $(COMPFLAGS) $<
116 .ml.cmo:
117 $(CAMLC) -c $(COMPFLAGS) $<
119 .ml.cmx:
120 $(CAMLOPT) -c $(COMPFLAGS) $<
122 depend:
123 gcc -MM $(CFLAGS) *.c > .depend
124 ../../boot/ocamlrun ../../tools/ocamldep *.mli *.ml >> .depend
126 include .depend