1996-09-04 07:17:43 -07:00
|
|
|
!include ../../config/Makefile.nt
|
|
|
|
|
|
|
|
# Compilation options
|
|
|
|
SYSTEM_INCLUDES=\msdev\include
|
|
|
|
CC=$(BYTECC)
|
1996-09-05 06:32:25 -07:00
|
|
|
CFLAGS=-I..\..\byterun -I..\unix $(BYTECCCOMPOPTS)
|
1996-09-09 08:02:35 -07:00
|
|
|
CAMLC=..\..\boot\ocamlrun ..\..\boot\ocamlc -I ..\..\stdlib
|
1996-09-04 07:17:43 -07:00
|
|
|
CAMLOPT=..\..\boot\ocamlrun ..\..\ocamlopt -I ..\..\stdlib
|
|
|
|
|
|
|
|
# Files in this directory
|
|
|
|
WIN_OBJS = accept.obj bind.obj close_on.obj connect.obj \
|
1996-09-05 06:32:25 -07:00
|
|
|
createprocess.obj getpeername.obj getpid.obj \
|
1996-09-04 07:17:43 -07:00
|
|
|
getsockname.obj listen.obj mkdir.obj open.obj pipe.obj sendrecv.obj \
|
1996-09-05 06:32:25 -07:00
|
|
|
shutdown.obj sleep.obj socket.obj sockopt.obj startup.obj system.obj \
|
|
|
|
unixsupport.obj windir.obj winwait.obj
|
1996-09-04 07:17:43 -07:00
|
|
|
|
|
|
|
# Files from the ..\unix directory
|
1996-09-05 06:32:25 -07:00
|
|
|
UNIX_FILES = access.c addrofstr.c chdir.c close.c cst2constr.c \
|
|
|
|
cstringv.c dup.c dup2.c envir.c errmsg.c execv.c execve.c execvp.c \
|
|
|
|
exit.c getcwd.c gethost.c gethostname.c getproto.c \
|
|
|
|
getserv.c gmtime.c lseek.c read.c rename.c rmdir.c \
|
|
|
|
socketaddr.c stat.c strofaddr.c time.c unlink.c utimes.c write.c
|
|
|
|
|
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)
|
1996-09-04 07:17:43 -07:00
|
|
|
rm -f libthreads.lib
|
|
|
|
$(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
|
|
|
|
|
|
|
|
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)
|
|
|
|
$(CAMLC) -a -linkall -o unix.cma $(CAML_OBJS)
|
|
|
|
|
1996-10-29 06:51:58 -08:00
|
|
|
unix.cmxa: $(CAMLOPT_OBJS)
|
|
|
|
$(CAMLOPT) -a -linkall -o unix.cmxa $(CAMLOPT_OBJS)
|
|
|
|
|
1996-09-04 07:17:43 -07:00
|
|
|
clean:
|
1996-10-29 06:51:58 -08:00
|
|
|
rm -f *.lib *.obj *.cm*
|
1996-09-04 07:17:43 -07:00
|
|
|
|
|
|
|
realclean:
|
|
|
|
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
|