ocaml/otherlibs/systhreads/Makefile.nt

92 lines
2.6 KiB
Makefile

#########################################################################
# #
# 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$
include ../../config/Makefile.nt
# Compilation options
CAMLC=..\..\boot\ocamlrun ..\..\boot\ocamlc -I ..\..\stdlib -I ..\win32unix
CAMLOPT=..\..\boot\ocamlrun ..\..\ocamlopt -I ..\..\stdlib -I ..\win32unix
BYTECODE_C_OBJS=win32_b.obj
NATIVECODE_C_OBJS=win32_n.obj
THREAD_OBJS=thread.cmo mutex.cmo condition.cmo event.cmo threadUnix.cmo
GENFILES=thread.ml
all: libthreads.lib threads.cma
allopt: libthreadsnat.lib threads.cmxa
libthreads.lib: $(BYTECODE_C_OBJS)
rm -f libthreads.lib
$(MKLIB)libthreads.lib $(BYTECODE_C_OBJS)
win32_b.obj: win32.c
$(BYTECC) -O -I..\..\byterun $(BYTECCCOMPOPTS) -c win32.c
mv win32.obj win32_b.obj
libthreadsnat.lib: $(NATIVECODE_C_OBJS)
rm -f libthreadsnat.lib
$(MKLIB)libthreadsnat.lib $(NATIVECODE_C_OBJS)
win32_n.obj: win32.c
$(NATIVECC) -DNATIVE_CODE -O -I..\..\asmrun -I..\..\byterun $(NATIVECCCOMPOPTS) -c win32.c
mv win32.obj win32_n.obj
threads.cma: $(THREAD_OBJS)
$(CAMLC) -a -o threads.cma $(THREAD_OBJS)
threads.cmxa: $(THREAD_OBJS:.cmo=.cmx)
$(CAMLOPT) -a -o threads.cmxa $(THREAD_OBJS:.cmo=.cmx)
$(THREAD_OBJS:.cmo=.cmx): ..\..\ocamlopt
thread.ml: thread_win32.ml
cp thread_win32.ml thread.ml
partialclean:
rm -f *.cm*
clean: partialclean
rm -f libthreads*.lib *.obj
rm -f $(GENFILES)
install:
cp libthreads.lib $(LIBDIR)/libthreads.lib
if not exist $(LIBDIR)\threads mkdir $(LIBDIR)\threads
cp $(THREAD_OBJS:.cmo=.cmi) threads.cma $(LIBDIR)/threads
rm -f $(LIBDIR)/threads/stdlib.cma
installopt:
cp libthreadsnat.lib $(LIBDIR)/libthreadsnat.lib
cp $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.lib $(LIBDIR)/threads
.SUFFIXES: .ml .mli .cmo .cmi .cmx
.mli.cmi:
$(CAMLC) -c $(COMPFLAGS) $<
.ml.cmo:
$(CAMLC) -c $(COMPFLAGS) $<
.ml.cmx:
$(CAMLOPT) -c $(COMPFLAGS) $<
depend:
# gcc -MM -I../../byterun *.c > .depend
..\..\boot\ocamlrun ../../tools/ocamldep *.mli *.ml >> .depend
include .depend