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$
|
|
|
|
|
1995-05-08 08:18:32 -07:00
|
|
|
# Makefile for the Unix interface library
|
|
|
|
|
1996-02-13 08:28:24 -08:00
|
|
|
include ../../config/Makefile
|
1995-05-08 08:18:32 -07:00
|
|
|
|
|
|
|
# Compilation options
|
1995-08-08 06:37:34 -07:00
|
|
|
CC=$(BYTECC)
|
|
|
|
CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS)
|
2000-02-05 04:16:09 -08:00
|
|
|
CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../stdlib
|
1996-04-30 07:53:58 -07:00
|
|
|
CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib
|
1995-05-08 08:18:32 -07:00
|
|
|
|
|
|
|
OBJS=accept.o access.o addrofstr.o alarm.o bind.o chdir.o chmod.o \
|
|
|
|
chown.o chroot.o close.o closedir.o connect.o cst2constr.o cstringv.o \
|
|
|
|
dup.o dup2.o envir.o errmsg.o execv.o execve.o execvp.o exit.o \
|
|
|
|
fchmod.o fchown.o fcntl.o fork.o ftruncate.o getcwd.o getegid.o \
|
|
|
|
geteuid.o getgid.o getgr.o getgroups.o gethost.o gethostname.o \
|
1995-08-08 06:37:34 -07:00
|
|
|
getlogin.o getpeername.o getpid.o getppid.o getproto.o getpw.o \
|
1995-10-31 02:48:06 -08:00
|
|
|
gettimeofday.o getserv.o getsockname.o getuid.o \
|
1997-06-13 08:52:43 -07:00
|
|
|
gmtime.o itimer.o kill.o link.o listen.o lockf.o lseek.o mkdir.o \
|
1998-08-08 09:53:42 -07:00
|
|
|
mkfifo.o nice.o open.o opendir.o pipe.o putenv.o read.o \
|
1995-05-08 08:18:32 -07:00
|
|
|
readdir.o readlink.o rename.o rewinddir.o rmdir.o select.o sendrecv.o \
|
1998-08-08 09:53:42 -07:00
|
|
|
setgid.o setsid.o setuid.o shutdown.o signals.o \
|
|
|
|
sleep.o socket.o socketaddr.o \
|
1996-04-12 08:57:28 -07:00
|
|
|
socketpair.o sockopt.o stat.o strofaddr.o symlink.o termios.o \
|
|
|
|
time.o times.o truncate.o umask.o unixsupport.o unlink.o \
|
|
|
|
utimes.o wait.o write.o
|
1995-05-08 08:18:32 -07:00
|
|
|
|
1995-10-23 09:58:06 -07:00
|
|
|
all: libunix.a unix.cmi unix.cma
|
1995-05-08 08:18:32 -07:00
|
|
|
|
1995-10-23 09:58:06 -07:00
|
|
|
allopt: libunix.a unix.cmi unix.cmxa
|
1995-05-08 08:18:32 -07:00
|
|
|
|
|
|
|
libunix.a: $(OBJS)
|
|
|
|
rm -f libunix.a
|
|
|
|
ar rc libunix.a $(OBJS)
|
|
|
|
$(RANLIB) libunix.a
|
|
|
|
|
1995-10-23 09:58:06 -07:00
|
|
|
unix.cma: unix.cmo
|
2000-03-09 01:12:28 -08:00
|
|
|
$(CAMLC) -a -linkall -custom -o unix.cma unix.cmo -cclib -lunix
|
1995-10-23 09:58:06 -07:00
|
|
|
|
|
|
|
unix.cmxa: unix.cmx
|
2000-03-09 01:12:28 -08:00
|
|
|
$(CAMLOPT) -a -linkall -o unix.cmxa unix.cmx -cclib -lunix
|
1995-05-08 08:18:32 -07:00
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
unix.cmx: ../../ocamlopt
|
1995-11-26 12:23:16 -08:00
|
|
|
|
1997-02-16 05:36:42 -08:00
|
|
|
partialclean:
|
1995-11-06 03:09:03 -08:00
|
|
|
rm -f *.cm*
|
|
|
|
|
1997-02-16 05:36:42 -08:00
|
|
|
clean: partialclean
|
1995-11-06 03:09:03 -08:00
|
|
|
rm -f *.a *.o
|
1995-05-08 08:18:32 -07:00
|
|
|
|
|
|
|
install:
|
|
|
|
cp libunix.a $(LIBDIR)/libunix.a
|
|
|
|
cd $(LIBDIR); $(RANLIB) libunix.a
|
1997-07-30 05:29:46 -07:00
|
|
|
cp unix.cmi unix.cma unix.mli $(LIBDIR)
|
1995-10-23 09:58:06 -07:00
|
|
|
|
|
|
|
installopt:
|
1995-11-09 05:23:22 -08:00
|
|
|
cp unix.cmx unix.cmxa unix.a $(LIBDIR)
|
1995-10-23 09:58:06 -07:00
|
|
|
cd $(LIBDIR); $(RANLIB) unix.a
|
1995-05-08 08:18:32 -07:00
|
|
|
|
1995-10-23 09:58:06 -07:00
|
|
|
.SUFFIXES: .ml .mli .cmo .cmi .cmx
|
1995-05-08 08:18:32 -07:00
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.ml.cmo:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
1995-10-23 09:58:06 -07:00
|
|
|
.ml.cmx:
|
|
|
|
$(CAMLOPT) -c $(COMPFLAGS) $<
|
|
|
|
|
1995-05-08 08:18:32 -07:00
|
|
|
depend:
|
|
|
|
gcc -MM $(CFLAGS) *.c > .depend
|
1998-04-21 09:09:03 -07:00
|
|
|
../../boot/ocamlrun ../../tools/ocamldep *.mli *.ml >> .depend
|
1995-05-08 08:18:32 -07:00
|
|
|
|
|
|
|
include .depend
|