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-09-04 07:17:43 -07:00
|
|
|
include ../../config/Makefile.nt
|
|
|
|
|
|
|
|
# Compilation options
|
2000-02-05 04:16:09 -08:00
|
|
|
CAMLC=..\..\boot\ocamlrun ..\..\ocamlc -I ..\..\stdlib -I ..\win32unix
|
1997-09-01 07:26:16 -07:00
|
|
|
CAMLOPT=..\..\boot\ocamlrun ..\..\ocamlopt -I ..\..\stdlib -I ..\win32unix
|
1996-09-04 07:17:43 -07:00
|
|
|
|
1997-09-01 07:26:16 -07:00
|
|
|
BYTECODE_C_OBJS=win32_b.obj
|
|
|
|
NATIVECODE_C_OBJS=win32_n.obj
|
1996-09-09 05:25:20 -07:00
|
|
|
|
1997-11-18 09:16:06 -08:00
|
|
|
THREAD_OBJS=thread.cmo mutex.cmo condition.cmo event.cmo threadUnix.cmo
|
1996-09-09 05:25:20 -07:00
|
|
|
|
1997-09-01 07:26:16 -07:00
|
|
|
GENFILES=thread.ml
|
1996-09-09 05:25:20 -07:00
|
|
|
|
1997-09-02 09:01:39 -07:00
|
|
|
all: libthreads.lib threads.cma
|
1996-09-04 07:17:43 -07:00
|
|
|
|
1997-09-02 09:01:39 -07:00
|
|
|
allopt: libthreadsnat.lib threads.cmxa
|
1996-09-04 07:17:43 -07:00
|
|
|
|
1997-09-01 07:26:16 -07:00
|
|
|
libthreads.lib: $(BYTECODE_C_OBJS)
|
1996-09-04 07:17:43 -07:00
|
|
|
rm -f libthreads.lib
|
1997-09-01 07:26:16 -07:00
|
|
|
$(MKLIB)libthreads.lib $(BYTECODE_C_OBJS)
|
1996-09-09 05:25:20 -07:00
|
|
|
|
1997-09-01 07:26:16 -07:00
|
|
|
win32_b.obj: win32.c
|
1997-09-04 06:46:50 -07:00
|
|
|
$(BYTECC) -O -I..\..\byterun $(BYTECCCOMPOPTS) -c win32.c
|
1997-09-01 07:26:16 -07:00
|
|
|
mv win32.obj win32_b.obj
|
1996-09-09 05:25:20 -07:00
|
|
|
|
1997-09-01 07:26:16 -07:00
|
|
|
libthreadsnat.lib: $(NATIVECODE_C_OBJS)
|
|
|
|
rm -f libthreadsnat.lib
|
|
|
|
$(MKLIB)libthreadsnat.lib $(NATIVECODE_C_OBJS)
|
1996-09-09 05:25:20 -07:00
|
|
|
|
1997-09-01 07:26:16 -07:00
|
|
|
win32_n.obj: win32.c
|
|
|
|
$(NATIVECC) -DNATIVE_CODE -O -I..\..\asmrun -I..\..\byterun $(NATIVECCCOMPOPTS) -c win32.c
|
|
|
|
mv win32.obj win32_n.obj
|
1996-09-09 05:25:20 -07:00
|
|
|
|
1997-09-01 07:26:16 -07:00
|
|
|
threads.cma: $(THREAD_OBJS)
|
2000-03-16 05:35:20 -08:00
|
|
|
$(CAMLC) -a -custom -o threads.cma $(THREAD_OBJS) -cclib -lthreads
|
1996-09-09 05:25:20 -07:00
|
|
|
|
1997-09-01 07:26:16 -07:00
|
|
|
threads.cmxa: $(THREAD_OBJS:.cmo=.cmx)
|
2000-03-16 05:35:20 -08:00
|
|
|
$(CAMLOPT) -a -o threads.cmxa $(THREAD_OBJS:.cmo=.cmx) \
|
|
|
|
-cclib -lthreadsnat
|
1996-09-04 07:17:43 -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_win32.ml
|
|
|
|
cp thread_win32.ml thread.ml
|
|
|
|
|
1997-02-16 05:36:42 -08:00
|
|
|
partialclean:
|
|
|
|
rm -f *.cm*
|
|
|
|
|
1997-03-05 02:48:39 -08:00
|
|
|
clean: partialclean
|
1997-12-10 05:28:16 -08:00
|
|
|
rm -f libthreads*.lib *.obj
|
1996-09-09 05:25:20 -07:00
|
|
|
rm -f $(GENFILES)
|
1996-09-04 07:17:43 -07:00
|
|
|
|
|
|
|
install:
|
|
|
|
cp libthreads.lib $(LIBDIR)/libthreads.lib
|
1996-09-09 05:25:20 -07:00
|
|
|
if not exist $(LIBDIR)\threads mkdir $(LIBDIR)\threads
|
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
|
1996-09-04 07:17:43 -07:00
|
|
|
|
|
|
|
installopt:
|
1997-12-10 05:28:16 -08:00
|
|
|
cp libthreadsnat.lib $(LIBDIR)/libthreadsnat.lib
|
|
|
|
cp $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.lib $(LIBDIR)/threads
|
1996-09-04 07:17:43 -07:00
|
|
|
|
1997-11-17 05:04:18 -08:00
|
|
|
.SUFFIXES: .ml .mli .cmo .cmi .cmx
|
1996-09-04 07:17:43 -07:00
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.ml.cmo:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.ml.cmx:
|
|
|
|
$(CAMLOPT) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
depend:
|
1996-09-05 06:32:25 -07:00
|
|
|
# gcc -MM -I../../byterun *.c > .depend
|
|
|
|
..\..\boot\ocamlrun ../../tools/ocamldep *.mli *.ml >> .depend
|
1996-09-04 07:17:43 -07:00
|
|
|
|
|
|
|
include .depend
|