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
|
|
|
|
CC=$(BYTECC)
|
2001-08-28 07:47:48 -07:00
|
|
|
CFLAGS=-I..\..\byterun -I..\unix
|
2000-02-05 04:16:09 -08:00
|
|
|
CAMLC=..\..\boot\ocamlrun ..\..\ocamlc -I ..\..\stdlib
|
1996-09-04 07:17:43 -07:00
|
|
|
CAMLOPT=..\..\boot\ocamlrun ..\..\ocamlopt -I ..\..\stdlib
|
|
|
|
|
|
|
|
# Files in this directory
|
1997-09-03 07:38:02 -07:00
|
|
|
WIN_OBJS = accept.obj bind.obj channels.obj close.obj \
|
2001-08-28 07:47:48 -07:00
|
|
|
close_on.obj connect.obj createprocess.obj dup.obj dup2.obj errmsg.obj \
|
1997-09-04 06:45:56 -07:00
|
|
|
getpeername.obj getpid.obj getsockname.obj gettimeofday.obj \
|
2001-04-10 04:15:05 -07:00
|
|
|
link.obj listen.obj lseek.obj \
|
1997-09-04 06:45:56 -07:00
|
|
|
mkdir.obj open.obj pipe.obj read.obj select.obj sendrecv.obj \
|
1996-09-05 06:32:25 -07:00
|
|
|
shutdown.obj sleep.obj socket.obj sockopt.obj startup.obj system.obj \
|
1997-09-03 07:38:02 -07:00
|
|
|
unixsupport.obj windir.obj winwait.obj write.obj
|
1996-09-04 07:17:43 -07:00
|
|
|
|
|
|
|
# Files from the ..\unix directory
|
1999-08-19 06:53:20 -07:00
|
|
|
UNIX_FILES = access.c addrofstr.c chdir.c chmod.c cst2constr.c \
|
2001-08-28 07:47:48 -07:00
|
|
|
cstringv.c envir.c execv.c execve.c execvp.c \
|
1996-09-05 06:32:25 -07:00
|
|
|
exit.c getcwd.c gethost.c gethostname.c getproto.c \
|
1998-05-11 11:42:59 -07:00
|
|
|
getserv.c gmtime.c putenv.c rename.c rmdir.c \
|
1997-09-03 07:38:02 -07:00
|
|
|
socketaddr.c stat.c strofaddr.c time.c unlink.c utimes.c
|
1996-09-05 06:32:25 -07:00
|
|
|
|
1996-09-04 07:17:43 -07:00
|
|
|
UNIX_OBJS = $(UNIX_FILES:.c=.obj)
|
|
|
|
|
|
|
|
C_OBJS=$(WIN_OBJS) $(UNIX_OBJS)
|
|
|
|
|
2001-09-13 02:08:12 -07:00
|
|
|
CAML_OBJS=unix.cmo unixLabels.cmo
|
|
|
|
CAMLOPT_OBJS=$(CAML_OBJS:.cmo=.cmx)
|
1996-09-04 07:17:43 -07:00
|
|
|
|
2001-10-30 06:48:26 -08:00
|
|
|
all: dllunix.dll libunix.lib unix.cma
|
1996-09-04 07:17:43 -07:00
|
|
|
|
1996-10-29 06:51:58 -08:00
|
|
|
allopt: libunix.lib unix.cmxa
|
1996-09-04 07:17:43 -07:00
|
|
|
|
2001-10-30 06:48:26 -08:00
|
|
|
dllunix.dll: copy_unix_files io.h $(C_OBJS:.obj=.dobj)
|
|
|
|
link /nologo /dll /out:dllunix.dll /implib:tmp.lib \
|
2001-08-28 07:47:48 -07:00
|
|
|
$(C_OBJS:.obj=.dobj) ..\..\byterun\ocamlrun.lib wsock32.lib
|
|
|
|
rm tmp.*
|
|
|
|
|
|
|
|
libunix.lib: copy_unix_files io.h $(C_OBJS:.obj=.sobj)
|
1998-05-11 11:42:59 -07:00
|
|
|
rm -f libunix.lib
|
2001-08-28 07:47:48 -07:00
|
|
|
$(MKLIB)libunix.lib $(C_OBJS:.obj=.sobj)
|
1996-09-04 07:17:43 -07:00
|
|
|
|
|
|
|
copy_unix_files:
|
1996-09-05 06:32:25 -07:00
|
|
|
@- cd ..\unix & cp -p -u -v $(UNIX_FILES) ../win32unix
|
|
|
|
# This requires GNU cp
|
2001-09-13 02:08:12 -07:00
|
|
|
@cp ../unix/unix.mli ../unix/unixLabels.ml* .
|
1996-09-05 06:32:25 -07:00
|
|
|
|
2001-09-08 10:08:07 -07:00
|
|
|
io.h: "$(SYSTEM_INCLUDES)\io.h"
|
|
|
|
copy "$(SYSTEM_INCLUDES)\io.h" io.h
|
1996-09-04 07:17:43 -07:00
|
|
|
|
|
|
|
unix.cma: $(CAML_OBJS)
|
2001-08-28 07:47:48 -07:00
|
|
|
$(CAMLC) -a -linkall -o unix.cma $(CAML_OBJS) \
|
2001-11-06 05:21:46 -08:00
|
|
|
-dllib -lunix -cclib -lunix wsock32.lib
|
1996-09-04 07:17:43 -07:00
|
|
|
|
1996-10-29 06:51:58 -08:00
|
|
|
unix.cmxa: $(CAMLOPT_OBJS)
|
2000-03-09 01:12:28 -08:00
|
|
|
$(CAMLOPT) -a -linkall -o unix.cmxa $(CAMLOPT_OBJS) \
|
|
|
|
-cclib -lunix wsock32.lib
|
1996-10-29 06:51:58 -08:00
|
|
|
|
1997-02-16 05:36:42 -08:00
|
|
|
partialclean:
|
|
|
|
rm -f *.cm*
|
1996-09-04 07:17:43 -07:00
|
|
|
|
1997-02-16 05:36:42 -08:00
|
|
|
clean: partialclean
|
2001-08-28 07:47:48 -07:00
|
|
|
rm -f *.lib *.dll *.exp *.sobj *.dobj
|
1996-09-04 07:17:43 -07:00
|
|
|
rm -f $(UNIX_FILES)
|
1996-09-05 06:32:25 -07:00
|
|
|
rm -f io.h
|
1996-09-04 07:17:43 -07:00
|
|
|
|
|
|
|
install:
|
2001-10-30 06:48:26 -08:00
|
|
|
cp dllunix.dll $(LIBDIR)/dllunix.dll
|
1996-09-06 09:52:29 -07:00
|
|
|
cp libunix.lib $(LIBDIR)/libunix.lib
|
|
|
|
cp unix.cmi unix.cma $(LIBDIR)
|
1996-09-04 07:17:43 -07:00
|
|
|
|
|
|
|
installopt:
|
1996-10-29 06:51:58 -08:00
|
|
|
cp unix.cmxa unix.cmx unix.lib $(LIBDIR)
|
1996-09-04 07:17:43 -07:00
|
|
|
|
2001-09-13 02:08:12 -07:00
|
|
|
unixLabels.cmo: unixLabels.ml
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) -nolabels unixLabels.ml
|
|
|
|
|
2001-11-06 05:21:46 -08:00
|
|
|
unixLabels.cmx: unixLabels.ml
|
|
|
|
$(CAMLOPT) -c $(COMPFLAGS) -nolabels unixLabels.ml
|
|
|
|
|
2001-08-28 07:47:48 -07:00
|
|
|
.SUFFIXES: .ml .mli .cmo .cmi .cmx .dobj .sobj
|
1996-09-04 07:17:43 -07:00
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.ml.cmo:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.ml.cmx:
|
|
|
|
$(CAMLOPT) -c $(COMPFLAGS) $<
|
|
|
|
|
2001-08-28 07:47:48 -07:00
|
|
|
.c.dobj:
|
|
|
|
$(BYTECC) $(DLLCCCOMPOPTS) $(CFLAGS) -c $<
|
|
|
|
mv $*.obj $*.dobj
|
|
|
|
|
|
|
|
.c.sobj:
|
|
|
|
$(BYTECC) $(BYTECCCOMPOPTS) $(CFLAGS) -c $<
|
|
|
|
mv $*.obj $*.sobj
|
|
|
|
|
1996-09-04 07:17:43 -07:00
|
|
|
depend:
|
|
|
|
|
|
|
|
!include .depend
|