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
|
|
|
|
1998-08-08 11:42:22 -07:00
|
|
|
THREAD_OBJS= thread.cmo mutex.cmo condition.cmo event.cmo threadUnix.cmo
|
1997-05-14 02:43:45 -07:00
|
|
|
|
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
|
1997-11-25 07:10:46 -08:00
|
|
|
$(NATIVECC) -O -I../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) -c posix.c
|
1997-08-29 08:37:22 -07:00
|
|
|
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-12-19 08:04:40 -08:00
|
|
|
$(THREAD_OBJS:.cmo=.cmx): ../../ocamlopt
|
|
|
|
|
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
|
1997-12-10 06:42:52 -08:00
|
|
|
rm -f libthreads*.a *.o
|
1997-05-14 02:43:45 -07:00
|
|
|
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-11-18 09:16:06 -08:00
|
|
|
cp $(THREAD_OBJS:.cmo=.cmi) threads.cma $(LIBDIR)/threads
|
1997-11-19 02:00:47 -08:00
|
|
|
rm -f $(LIBDIR)/threads/stdlib.cma
|
1997-05-14 02:43:45 -07:00
|
|
|
|
|
|
|
installopt:
|
1997-11-18 09:16:06 -08:00
|
|
|
cp libthreadsnat.a $(LIBDIR)/libthreadsnat.a
|
|
|
|
cp $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.a $(LIBDIR)/threads
|
1997-05-14 02:43:45 -07:00
|
|
|
|
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
|
1998-06-29 01:50:39 -07:00
|
|
|
../../boot/ocamlrun ../../tools/ocamldep -I ../unix *.mli *.ml >> .depend
|
1997-05-14 02:43:45 -07:00
|
|
|
|
|
|
|
include .depend
|