ocaml/otherlibs/macosunix/Makefile.Mac

152 lines
5.8 KiB
Makefile
Raw Normal View History

#########################################################################
# #
# Objective Caml #
# #
# Damien Doligez, projet Moscova, 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$
includepath = ":config:,:byterun:,{GUSI}include:"
C = sc
COptions = -i {includepath} -includes unix -w 30,35 {cdbgflag} -model far
PPCC = mrc
PPCCOptions = -i {includepath} -includes unix -w 30,35 {cdbgflag}
CAMLC = :::boot:ocamlrun :::boot:ocamlc -I :::stdlib:
# Files in this directory
MAC_OBJS = macosunix.c.o
MAC_OBJSPPC = macosunix.c.x
# Files from the ::unix: directory
UNIX_FILES = accept.c access.c addrofstr.c alarm.c bind.c <20>
chdir.c chmod.c close.c closedir.c <20>
connect.c cst2constr.c cstringv.c dup.c dup2.c <20>
errmsg.c exit.c <20>
fchmod.c fchown.c fcntl.c ftruncate.c <20>
getcwd.c <20>
getgroups.c gethost.c gethostname.c <20>
getpeername.c getproto.c <20>
getserv.c getsockname.c gettimeofday.c <20>
gmtime.c itimer.c listen.c lockf.c <20>
lseek.c mkdir.c open.c opendir.c <20>
pipe.c putenv.c read.c readdir.c readlink.c <20>
rename.c rewinddir.c rmdir.c select.c sendrecv.c <20>
setsid.c shutdown.c signals.c <20>
sleep.c socket.c socketaddr.c socketpair.c <20>
sockopt.c stat.c strofaddr.c symlink.c termios.c <20>
truncate.c unixsupport.c <20>
unlink.c utimes.c write.c <20>
<20>
cst2constr.h socketaddr.h <20>
unix.ml unix.mli
UNIX_OBJS = accept.c.o access.c.o addrofstr.c.o alarm.c.o bind.c.o <20>
chdir.c.o chmod.c.o close.c.o closedir.c.o <20>
connect.c.o cst2constr.c.o cstringv.c.o dup.c.o dup2.c.o <20>
errmsg.c.o exit.c.o <20>
fchmod.c.o fchown.c.o fcntl.c.o ftruncate.c.o <20>
getcwd.c.o <20>
getgroups.c.o gethost.c.o gethostname.c.o <20>
getpeername.c.o getproto.c.o <20>
getserv.c.o getsockname.c.o gettimeofday.c.o <20>
gmtime.c.o itimer.c.o listen.c.o lockf.c.o <20>
lseek.c.o mkdir.c.o open.c.o opendir.c.o <20>
pipe.c.o putenv.c.o read.c.o readdir.c.o readlink.c.o <20>
rename.c.o rewinddir.c.o rmdir.c.o select.c.o sendrecv.c.o <20>
setsid.c.o shutdown.c.o signals.c.o <20>
sleep.c.o socket.c.o socketaddr.c.o socketpair.c.o <20>
sockopt.c.o stat.c.o strofaddr.c.o symlink.c.o termios.c.o <20>
truncate.c.o unixsupport.c.o <20>
unlink.c.o utimes.c.o write.c.o
PPCUNIX_OBJS = accept.c.x access.c.x addrofstr.c.x alarm.c.x bind.c.x <20>
chdir.c.x chmod.c.x close.c.x closedir.c.x <20>
connect.c.x cst2constr.c.x cstringv.c.x dup.c.x dup2.c.x <20>
errmsg.c.x exit.c.x <20>
fchmod.c.x fchown.c.x fcntl.c.x ftruncate.c.x <20>
getcwd.c.x <20>
getgroups.c.x gethost.c.x gethostname.c.x <20>
getpeername.c.x getproto.c.x <20>
getserv.c.x getsockname.c.x gettimeofday.c.x <20>
gmtime.c.x itimer.c.x listen.c.x lockf.c.x <20>
lseek.c.x mkdir.c.x open.c.x opendir.c.x <20>
pipe.c.x putenv.c.x read.c.x readdir.c.x readlink.c.x <20>
rename.c.x rewinddir.c.x rmdir.c.x select.c.x sendrecv.c.x <20>
setsid.c.x shutdown.c.x signals.c.x <20>
sleep.c.x socket.c.x socketaddr.c.x socketpair.c.x <20>
sockopt.c.x stat.c.x strofaddr.c.x symlink.c.x termios.c.x <20>
truncate.c.x unixsupport.c.x <20>
unlink.c.x utimes.c.x write.c.x
C_OBJS = {MAC_OBJS} {UNIX_OBJS}
C_OBJSPPC = {MAC_OBJSPPC} {PPCUNIX_OBJS}
CAML_OBJS = macosunix_startup.cmo unix.cmo
all <EFBFBD>
domake copy-files
directory :byterun:
domake libcamlrun.x libcamlrun.o
directory ::
domake libcamlrun-unix.x libcamlrun-unix.o unix.cma
### WATCH OUT: libcamlrun.[ox] must be linked last to override getcwd
libcamlrun-unix.x <20> {C_OBJSPPC} :byterun:libcamlrun.x
ppclink {ldbgflag} -xm library -o libcamlrun-unix.x <20>
{C_OBJSPPC} :byterun:libcamlrun.x
libcamlrun-unix.o <20> {C_OBJS} :byterun:libcamlrun.o
lib {ldbgflag} -o libcamlrun-unix.o {C_OBJS} :byterun:libcamlrun.o
copy-files <EFBFBD> $OutOfDate
directory ::unix:
duplicate -y {UNIX_FILES} ::macosunix:
directory ::macosunix:
newfolder :byterun || set status 0
duplicate -y :::byterun:<3A>.[ach] :::byterun:Makefile.Mac.depend :byterun:
begin
echo 'ocamlgusiflag = -d macintosh_GUSI -includes unix -i "{GUSI}include:"'
catenate :::byterun:Makefile.Mac
end > :byterun:Makefile.Mac
duplicate -y :::config: :
unix.cma <EFBFBD> {CAML_OBJS}
{CAMLC} -a -linkall -o unix.cma {CAML_OBJS}
partialclean <EFBFBD>
delete -i <20>.cm<63> || set status 0
clean <EFBFBD> partialclean
delete -i <20>.[xo] || set status 0
delete -i -y :byterun :config
delete -i {UNIX_FILES}
install <EFBFBD>
duplicate -y libcamlrun-unix.o libcamlrun-unix.x unix.cmi unix.cma <20>
"{LIBDIR}"
.cmi <EFBFBD> .mli
{CAMLC} -c {COMPFLAGS} "{depdir}{default}.mli"
.cmo <EFBFBD> .ml
{CAMLC} -c {COMPFLAGS} "{depdir}{default}.ml"
depend <EFBFBD> copy-files
begin
MakeDepend -w -objext .x <20>.c
MakeDepend -w <20>.c
:::boot:ocamlrun :::tools:ocamldep <20>.mli <20>.ml
end | streamedit -e "/<2F>t/ replace // ' ' -c <20>" > Makefile.Mac.depend