ocaml/otherlibs/macosunix/Makefile.Mac

152 lines
5.8 KiB
Makefile

#########################################################################
# #
# 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 ¶
chdir.c chmod.c close.c closedir.c ¶
connect.c cst2constr.c cstringv.c dup.c dup2.c ¶
errmsg.c exit.c ¶
fchmod.c fchown.c fcntl.c ftruncate.c ¶
getcwd.c ¶
getgroups.c gethost.c gethostname.c ¶
getpeername.c getproto.c ¶
getserv.c getsockname.c gettimeofday.c ¶
gmtime.c itimer.c listen.c lockf.c ¶
lseek.c mkdir.c open.c opendir.c ¶
pipe.c putenv.c read.c readdir.c readlink.c ¶
rename.c rewinddir.c rmdir.c select.c sendrecv.c ¶
setsid.c shutdown.c signals.c ¶
sleep.c socket.c socketaddr.c socketpair.c ¶
sockopt.c stat.c strofaddr.c symlink.c termios.c ¶
truncate.c unixsupport.c ¶
unlink.c utimes.c write.c ¶
cst2constr.h socketaddr.h ¶
unix.ml unix.mli
UNIX_OBJS = accept.c.o access.c.o addrofstr.c.o alarm.c.o bind.c.o ¶
chdir.c.o chmod.c.o close.c.o closedir.c.o ¶
connect.c.o cst2constr.c.o cstringv.c.o dup.c.o dup2.c.o ¶
errmsg.c.o exit.c.o ¶
fchmod.c.o fchown.c.o fcntl.c.o ftruncate.c.o ¶
getcwd.c.o ¶
getgroups.c.o gethost.c.o gethostname.c.o ¶
getpeername.c.o getproto.c.o ¶
getserv.c.o getsockname.c.o gettimeofday.c.o ¶
gmtime.c.o itimer.c.o listen.c.o lockf.c.o ¶
lseek.c.o mkdir.c.o open.c.o opendir.c.o ¶
pipe.c.o putenv.c.o read.c.o readdir.c.o readlink.c.o ¶
rename.c.o rewinddir.c.o rmdir.c.o select.c.o sendrecv.c.o ¶
setsid.c.o shutdown.c.o signals.c.o ¶
sleep.c.o socket.c.o socketaddr.c.o socketpair.c.o ¶
sockopt.c.o stat.c.o strofaddr.c.o symlink.c.o termios.c.o ¶
truncate.c.o unixsupport.c.o ¶
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 ¶
chdir.c.x chmod.c.x close.c.x closedir.c.x ¶
connect.c.x cst2constr.c.x cstringv.c.x dup.c.x dup2.c.x ¶
errmsg.c.x exit.c.x ¶
fchmod.c.x fchown.c.x fcntl.c.x ftruncate.c.x ¶
getcwd.c.x ¶
getgroups.c.x gethost.c.x gethostname.c.x ¶
getpeername.c.x getproto.c.x ¶
getserv.c.x getsockname.c.x gettimeofday.c.x ¶
gmtime.c.x itimer.c.x listen.c.x lockf.c.x ¶
lseek.c.x mkdir.c.x open.c.x opendir.c.x ¶
pipe.c.x putenv.c.x read.c.x readdir.c.x readlink.c.x ¶
rename.c.x rewinddir.c.x rmdir.c.x select.c.x sendrecv.c.x ¶
setsid.c.x shutdown.c.x signals.c.x ¶
sleep.c.x socket.c.x socketaddr.c.x socketpair.c.x ¶
sockopt.c.x stat.c.x strofaddr.c.x symlink.c.x termios.c.x ¶
truncate.c.x unixsupport.c.x ¶
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 Ä
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 Ä {C_OBJSPPC} :byterun:libcamlrun.x
ppclink {ldbgflag} -xm library -o libcamlrun-unix.x ¶
{C_OBJSPPC} :byterun:libcamlrun.x
libcamlrun-unix.o Ä {C_OBJS} :byterun:libcamlrun.o
lib {ldbgflag} -o libcamlrun-unix.o {C_OBJS} :byterun:libcamlrun.o
copy-files Ä $OutOfDate
directory ::unix:
duplicate -y {UNIX_FILES} ::macosunix:
directory ::macosunix:
newfolder :byterun || set status 0
duplicate -y :::byterun:Å.[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 Ä {CAML_OBJS}
{CAMLC} -a -linkall -o unix.cma {CAML_OBJS}
partialclean Ä
delete -i Å.cmÅ || set status 0
clean Ä partialclean
delete -i Å.[xo] || set status 0
delete -i -y :byterun :config
delete -i {UNIX_FILES}
install Ä
duplicate -y libcamlrun-unix.o libcamlrun-unix.x unix.cmi unix.cma
"{LIBDIR}"
.cmi Ä .mli
{CAMLC} -c {COMPFLAGS} "{depdir}{default}.mli"
.cmo Ä .ml
{CAMLC} -c {COMPFLAGS} "{depdir}{default}.ml"
depend Ä copy-files
begin
MakeDepend -w -objext .x Å.c
MakeDepend -w Å.c
:::boot:ocamlrun :::tools:ocamldep Å.mli Å.ml
end | streamedit -e "/¶t/ replace // ' ' -c °" > Makefile.Mac.depend