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 #
|
2001-12-07 05:41:02 -08:00
|
|
|
# under the terms of the GNU Library General Public License, with #
|
|
|
|
# the special exception on linking described in file ../../LICENSE. #
|
1999-11-17 10:59:06 -08:00
|
|
|
# #
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
# $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-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
|
|
|
|
2001-10-30 06:48:26 -08:00
|
|
|
all: dllthreads.dll 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
|
|
|
|
2001-10-30 06:48:26 -08:00
|
|
|
dllthreads.dll: win32_b.dobj
|
|
|
|
link /nologo /dll /out:dllthreads.dll /implib:tmp.lib \
|
2001-08-28 07:47:48 -07:00
|
|
|
win32_b.dobj ..\..\byterun\ocamlrun.lib
|
|
|
|
rm tmp.*
|
|
|
|
|
|
|
|
libthreads.lib: win32_b.sobj
|
1996-09-04 07:17:43 -07:00
|
|
|
rm -f libthreads.lib
|
2001-08-28 07:47:48 -07:00
|
|
|
$(MKLIB)libthreads.lib win32_b.sobj
|
|
|
|
|
|
|
|
win32_b.dobj: win32.c
|
|
|
|
$(BYTECC) -I..\..\byterun $(DLLCCCOMPOPTS) -c win32.c
|
|
|
|
mv win32.obj win32_b.dobj
|
1996-09-09 05:25:20 -07:00
|
|
|
|
2001-08-28 07:47:48 -07:00
|
|
|
win32_b.sobj: win32.c
|
|
|
|
$(BYTECC) -I..\..\byterun $(BYTECCCOMPOPTS) -c win32.c
|
|
|
|
mv win32.obj win32_b.sobj
|
1996-09-09 05:25:20 -07:00
|
|
|
|
2001-08-28 07:47:48 -07:00
|
|
|
libthreadsnat.lib: win32_n.obj
|
1997-09-01 07:26:16 -07:00
|
|
|
rm -f libthreadsnat.lib
|
2001-08-28 07:47:48 -07:00
|
|
|
$(MKLIB)libthreadsnat.lib win32_n.obj
|
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)
|
2001-11-06 05:21:46 -08:00
|
|
|
$(CAMLC) -a -o threads.cma $(THREAD_OBJS) \
|
|
|
|
-dllib -lthreads -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
|
2001-08-28 07:47:48 -07:00
|
|
|
rm -f *.dll *.lib *.obj *.dobj *.sobj
|
1996-09-09 05:25:20 -07:00
|
|
|
rm -f $(GENFILES)
|
1996-09-04 07:17:43 -07:00
|
|
|
|
|
|
|
install:
|
2001-10-30 06:48:26 -08:00
|
|
|
cp dllthreads.dll $(LIBDIR)/dllthreads.dll
|
1996-09-04 07:17:43 -07:00
|
|
|
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:
|
2001-06-15 07:23:20 -07:00
|
|
|
$(CAMLC) -c -g $(COMPFLAGS) $<
|
1996-09-04 07:17:43 -07:00
|
|
|
|
|
|
|
.ml.cmx:
|
|
|
|
$(CAMLOPT) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
depend:
|
|
|
|
|
|
|
|
include .depend
|