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
|
|
|
|
CC=$(BYTECC)
|
1996-09-05 06:32:25 -07:00
|
|
|
CFLAGS=-I..\..\byterun -I..\unix $(BYTECCCOMPOPTS)
|
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 \
|
|
|
|
close_on.obj connect.obj createprocess.obj dup.obj dup2.obj \
|
1997-09-04 06:45:56 -07:00
|
|
|
getpeername.obj getpid.obj getsockname.obj gettimeofday.obj \
|
|
|
|
listen.obj lseek.obj \
|
|
|
|
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 \
|
1997-09-03 07:38:02 -07:00
|
|
|
cstringv.c envir.c errmsg.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)
|
|
|
|
|
|
|
|
CAML_OBJS=unix.cmo
|
1996-10-29 06:51:58 -08:00
|
|
|
CAMLOPT_OBJS=unix.cmx
|
1996-09-04 07:17:43 -07:00
|
|
|
|
|
|
|
all: libunix.lib unix.cma
|
|
|
|
|
1996-10-29 06:51:58 -08:00
|
|
|
allopt: libunix.lib unix.cmxa
|
1996-09-04 07:17:43 -07:00
|
|
|
|
1996-09-05 06:32:25 -07:00
|
|
|
libunix.lib: copy_unix_files io.h $(C_OBJS)
|
1998-05-11 11:42:59 -07:00
|
|
|
rm -f libunix.lib
|
1996-09-04 07:17:43 -07:00
|
|
|
$(MKLIB)libunix.lib $(C_OBJS)
|
|
|
|
|
|
|
|
copy_unix_files:
|
1996-09-05 06:32:25 -07:00
|
|
|
@- cd ..\unix & cp -p -u -v $(UNIX_FILES) ../win32unix
|
|
|
|
# This requires GNU cp
|
1998-05-10 09:42:53 -07:00
|
|
|
@cp ../unix/unix.mli unix.mli
|
1996-09-05 06:32:25 -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)
|
2000-03-09 01:12:28 -08:00
|
|
|
$(CAMLC) -a -linkall -o unix.cma -custom $(CAML_OBJS) \
|
|
|
|
-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
|
|
|
|
rm -f *.lib *.obj
|
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:
|
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
|
|
|
|
|
|
|
.SUFFIXES: .ml .mli .cmo .cmi .cmx
|
|
|
|
|
|
|
|
.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
|
|
|
|
|
|
|
unix.cmi: unix.mli
|
|
|
|
unix.cmo: unix.cmi
|
|
|
|
|
|
|
|
!include .depend
|