1997-05-14 02:43:45 -07:00
|
|
|
include ../../config/Makefile
|
|
|
|
|
|
|
|
CAMLC=../../boot/ocamlrun ../../boot/ocamlc -I ../../stdlib -I ../unix
|
1997-08-29 08:37:22 -07:00
|
|
|
CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib -I ../unix
|
1997-05-14 02:43:45 -07:00
|
|
|
|
1997-08-29 08:37:22 -07:00
|
|
|
BYTECODE_C_OBJS=posix_b.o
|
|
|
|
NATIVECODE_C_OBJS=posix_n.o
|
1997-05-14 02:43:45 -07:00
|
|
|
|
|
|
|
THREAD_OBJS=thread.cmo condition.cmo event.cmo threadUnix.cmo
|
|
|
|
|
1997-09-01 07:26:16 -07:00
|
|
|
GENFILES=thread.ml
|
1997-05-14 02:43:45 -07:00
|
|
|
|
1997-08-29 08:37:22 -07:00
|
|
|
all: libthreads.a threads.cma
|
1997-05-14 02:43:45 -07:00
|
|
|
|
1997-08-29 08:37:22 -07:00
|
|
|
allopt: libthreadsnat.a threads.cmxa
|
1997-05-14 02:43:45 -07:00
|
|
|
|
1997-08-29 08:37:22 -07:00
|
|
|
libthreads.a: $(BYTECODE_C_OBJS)
|
1997-05-14 02:43:45 -07:00
|
|
|
rm -f libthreads.a
|
1997-08-29 08:37:22 -07:00
|
|
|
ar rc libthreads.a $(BYTECODE_C_OBJS)
|
1997-05-14 02:43:45 -07:00
|
|
|
|
1997-08-29 08:37:22 -07:00
|
|
|
posix_b.o: posix.c
|
|
|
|
$(BYTECC) -O -I../../byterun $(BYTECCCOMPOPTS) -c posix.c
|
|
|
|
mv posix.o posix_b.o
|
1997-05-14 02:43:45 -07:00
|
|
|
|
1997-08-29 08:37:22 -07:00
|
|
|
libthreadsnat.a: $(NATIVECODE_C_OBJS)
|
|
|
|
rm -f libthreadsnat.a
|
|
|
|
ar rc libthreadsnat.a $(NATIVECODE_C_OBJS)
|
1997-05-14 02:43:45 -07:00
|
|
|
|
1997-08-29 08:37:22 -07:00
|
|
|
posix_n.o: posix.c
|
|
|
|
$(NATIVECC) -O -I ../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) -DNATIVE_CODE -c posix.c
|
|
|
|
mv posix.o posix_n.o
|
1997-05-14 02:43:45 -07:00
|
|
|
|
1997-08-29 08:37:22 -07:00
|
|
|
threads.cma: $(THREAD_OBJS)
|
|
|
|
$(CAMLC) -a -o threads.cma $(THREAD_OBJS)
|
1997-05-14 02:43:45 -07:00
|
|
|
|
1997-08-29 08:37:22 -07:00
|
|
|
threads.cmxa: $(THREAD_OBJS:.cmo=.cmx)
|
|
|
|
$(CAMLOPT) -a -o threads.cmxa $(THREAD_OBJS:.cmo=.cmx)
|
1997-05-14 02:43:45 -07:00
|
|
|
|
1997-11-17 05:04:18 -08:00
|
|
|
thread.ml: thread_posix.ml
|
|
|
|
ln -s thread_posix.ml thread.ml
|
|
|
|
|
1997-05-14 02:43:45 -07:00
|
|
|
partialclean:
|
|
|
|
rm -f *.cm*
|
|
|
|
|
|
|
|
clean: partialclean
|
|
|
|
rm -f libthreads.a *.o *.cm*
|
|
|
|
rm -f $(GENFILES)
|
|
|
|
|
|
|
|
install:
|
|
|
|
cp libthreads.a $(LIBDIR)/libthreads.a
|
1997-08-29 08:37:22 -07:00
|
|
|
if test -d $(LIBDIR)/threads; then :; else mkdir $(LIBDIR)/threads; fi
|
1997-05-14 02:43:45 -07:00
|
|
|
cp thread.cmi mutex.cmi condition.cmi event.cmi threadUnix.cmi threads.cma stdlib.cma $(LIBDIR)/threads
|
|
|
|
|
|
|
|
installopt:
|
|
|
|
|
1997-11-17 05:04:18 -08:00
|
|
|
.SUFFIXES: .ml .mli .cmo .cmi .cmx
|
1997-05-14 02:43:45 -07:00
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.ml.cmo:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.ml.cmx:
|
|
|
|
$(CAMLOPT) -c $(COMPFLAGS) $<
|
|
|
|
|
1997-11-17 05:04:18 -08:00
|
|
|
depend: $(GENFILES)
|
1997-05-14 02:43:45 -07:00
|
|
|
gcc -MM -I../../byterun *.c > .depend
|
|
|
|
../../boot/ocamlrun ../../tools/ocamldep *.mli *.ml >> .depend
|
|
|
|
|
|
|
|
include .depend
|