104 lines
3.0 KiB
Makefile
104 lines
3.0 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
|
|
CC=$(BYTECC)
|
|
CFLAGS=-I..\..\byterun -I..\unix $(BYTECCCOMPOPTS)
|
|
CAMLC=..\..\boot\ocamlrun ..\..\ocamlc -I ..\..\stdlib
|
|
CAMLOPT=..\..\boot\ocamlrun ..\..\ocamlopt -I ..\..\stdlib
|
|
|
|
# Files in this directory
|
|
WIN_OBJS = accept.obj bind.obj channels.obj close.obj \
|
|
close_on.obj connect.obj createprocess.obj dup.obj dup2.obj \
|
|
getpeername.obj getpid.obj getsockname.obj gettimeofday.obj \
|
|
listen.obj lseek.obj \
|
|
mkdir.obj open.obj pipe.obj read.obj select.obj sendrecv.obj \
|
|
shutdown.obj sleep.obj socket.obj sockopt.obj startup.obj system.obj \
|
|
unixsupport.obj windir.obj winwait.obj write.obj
|
|
|
|
# Files from the ..\unix directory
|
|
UNIX_FILES = access.c addrofstr.c chdir.c chmod.c cst2constr.c \
|
|
cstringv.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 putenv.c rename.c rmdir.c \
|
|
socketaddr.c stat.c strofaddr.c time.c unlink.c utimes.c
|
|
|
|
UNIX_OBJS = $(UNIX_FILES:.c=.obj)
|
|
|
|
C_OBJS=$(WIN_OBJS) $(UNIX_OBJS)
|
|
|
|
CAML_OBJS=unix.cmo
|
|
CAMLOPT_OBJS=unix.cmx
|
|
|
|
all: libunix.lib unix.cma
|
|
|
|
allopt: libunix.lib unix.cmxa
|
|
|
|
libunix.lib: copy_unix_files io.h $(C_OBJS)
|
|
rm -f libunix.lib
|
|
$(MKLIB)libunix.lib $(C_OBJS)
|
|
|
|
copy_unix_files:
|
|
@- cd ..\unix & cp -p -u -v $(UNIX_FILES) ../win32unix
|
|
# This requires GNU cp
|
|
@cp ../unix/unix.mli unix.mli
|
|
|
|
io.h: $(SYSTEM_INCLUDES)\io.h
|
|
copy $(SYSTEM_INCLUDES)\io.h io.h
|
|
|
|
unix.cma: $(CAML_OBJS)
|
|
$(CAMLC) -a -linkall -o unix.cma -custom $(CAML_OBJS) \
|
|
-cclib -lunix wsock32.lib
|
|
|
|
unix.cmxa: $(CAMLOPT_OBJS)
|
|
$(CAMLOPT) -a -linkall -o unix.cmxa $(CAMLOPT_OBJS) \
|
|
-cclib -lunix wsock32.lib
|
|
|
|
partialclean:
|
|
rm -f *.cm*
|
|
|
|
clean: partialclean
|
|
rm -f *.lib *.obj
|
|
rm -f $(UNIX_FILES)
|
|
rm -f io.h
|
|
|
|
install:
|
|
cp libunix.lib $(LIBDIR)/libunix.lib
|
|
cp unix.cmi unix.cma $(LIBDIR)
|
|
|
|
installopt:
|
|
cp unix.cmxa unix.cmx unix.lib $(LIBDIR)
|
|
|
|
.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
|
|
|
|
unix.cmi: unix.mli
|
|
unix.cmo: unix.cmi
|
|
|
|
!include .depend
|