ocaml/byterun/Makefile.Mac

150 lines
5.7 KiB
Makefile
Raw Normal View History

#########################################################################
# #
# Objective Caml #
# #
# Damien Doligez, projet Para, 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$
C = sc
COptions = -w 29,30,35 {ocamlgusiflag} -i ::config: {cdbgflag} <20>
-model far -mbg full
AOptions = -model far {adbgflag}
LinkOptions = -model far -ad 4 -msg nodup -compact -pad 0 -state nouse -br 68k
Libs = "{libraries}IntEnv.o" <20>
"{libraries}Interface.o" <20>
"{libraries}MacRuntime.o" <20>
"{libraries}MathLib.o" <20>
"{clibraries}StdCLib.o" <20>
"{libraries}ToolLibs.o"
PPCC = mrc
PPCCOptions = -w 29,30,35 {ocamlgusiflag} -i ::config: {cdbgflag}
PPCLinkOptions = -d {ldbgflag}
PPCLibs = "{sharedlibraries}MathLib" "{ppclibraries}PPCCRuntime.o" <20>
"{ppclibraries}PPCToolLibs.o" "{sharedlibraries}StdCLib" <20>
"{ppclibraries}StdCRuntime.o" "{sharedlibraries}InterfaceLib"
OBJS = :interp.a.o :misc.c.o :stacks.c.o <20>
:fix_code.c.o :startup.c.o :main.c.o <20>
:freelist.c.o :major_gc.c.o :minor_gc.c.o :memory.c.o :alloc.c.o :roots.c.o <20>
:fail.c.o :signals.c.o <20>
:compare.c.o :ints.c.o :floats.c.o :str.c.o :array.c.o :io.c.o :extern.c.o <20>
:intern.c.o <20>
:hash.c.o :sys.c.o :meta.c.o :parsing.c.o <20>
:gc_ctrl.c.o :terminfo.c.o :md5.c.o <20>
:obj.c.o :lexing.c.o :macintosh.c.o <20>
:rotatecursor.c.o :printexc.c.o :callback.c.o <20>
:debugger.c.o :weak.c.o :compact.c.o <20>
:instrtrace.c.o :finalise.c.o :custom.c.o
PPCOBJS = :interp.c.x :misc.c.x :stacks.c.x <20>
:fix_code.c.x :startup.c.x :main.c.x <20>
:freelist.c.x :major_gc.c.x :minor_gc.c.x :memory.c.x :alloc.c.x :roots.c.x <20>
:fail.c.x :signals.c.x <20>
:compare.c.x :ints.c.x :floats.c.x :str.c.x :array.c.x :io.c.x :extern.c.x <20>
:intern.c.x <20>
:hash.c.x :sys.c.x :meta.c.x :parsing.c.x <20>
:gc_ctrl.c.x :terminfo.c.x :md5.c.x <20>
:obj.c.x :lexing.c.x :macintosh.c.x <20>
:rotatecursor.c.x :printexc.c.x :callback.c.x <20>
:debugger.c.x :weak.c.x :compact.c.x <20>
:instrtrace.c.x :finalise.c.x :custom.c.x
PRIMS = alloc.c array.c compare.c extern.c floats.c gc_ctrl.c hash.c <20>
intern.c interp.c ints.c io.c lexing.c md5.c meta.c obj.c parsing.c <20>
signals.c str.c sys.c terminfo.c callback.c weak.c finalise.c
PUBLIC_INCLUDES = mlvalues.h alloc.h misc.h callback.h fail.h custom.h
all <EFBFBD> ocamlrun libcamlrun.o libcamlrun.x
ocamlrun <20><> libcamlrun.x :prims.c.x
ppclink -c 'MPS ' -t MPST {PPCLinkOptions} -o ocamlrun prims.c.x <20>
libcamlrun.x {PPCLibs}
ocamlrun <20><> libcamlrun.o :prims.c.o
ilink -c 'MPS ' -t MPST {LinkOptions} -o ocamlrun prims.c.o <20>
libcamlrun.o {libs}
libcamlrun.x <EFBFBD> {PPCOBJS}
ppclink {PPCLinkOptions} -xm library -o libcamlrun.x {PPCOBJS}
libcamlrun.o <EFBFBD> {OBJS}
lib -o libcamlrun.o {OBJS}
install <EFBFBD>
duplicate -y ocamlrun "{BINDIR}ocamlrun"
duplicate -y libcamlrun.x libcamlrun.o "{LIBDIR}"
if "`exists -d "{LIBDIR}caml:"`" == ""
newfolder "{LIBDIR}caml:"
end
duplicate -y {PUBLIC_INCLUDES} "{LIBDIR}caml:"
duplicate -y config.h "{LIBDIR}caml:"
open -t "{LIBDIR}caml:config.h"
find <20> "{LIBDIR}caml:config.h"
find /<2F>'#include <m.h>'Ű/ "{LIBDIR}caml:config.h"
catenate ::config:m.h > "{LIBDIR}caml:config.h".<2E>
find <20> "{LIBDIR}caml:config.h"
find /<2F>'#include <s.h>'Ű/ "{LIBDIR}caml:config.h"
catenate ::config:s.h > "{LIBDIR}caml:config.h".<2E>
find <20> "{LIBDIR}caml:config.h"
clear -c <20> /<2F>'#include "'<EFBFBD>/ "{LIBDIR}caml:config.h"
close -y "{LIBDIR}caml:config.h"
duplicate -y memory.h "{LIBDIR}caml:"
open -t "{LIBDIR}caml:memory.h"
find <20> "{LIBDIR}caml:memory.h"
clear -c <20> /<2F>'#include "'<EFBFBD>'gc.h'<EFBFBD>/ "{LIBDIR}caml:memory.h"
find <20> "{LIBDIR}caml:memory.h"
clear /'#define Alloc_small'/:/<2F>}/ "{LIBDIR}caml:memory.h"
find <20> "{LIBDIR}caml:memory.h"
clear /'#define Modify'/:/<2F>}/ "{LIBDIR}caml:memory.h"
close -y "{LIBDIR}caml:memory.h"
clean <EFBFBD>
delete -i <20>.[ox] || set status 0
delete -i ocamlrun primitives prims.c opnames.h interp.a.lst
delete -i ocamlrun.xcoff ocamlrun.dbg
primitives <EFBFBD> {PRIMS}
streamedit -d -e "/ ([a-z0-9_]+)<29>0 *'('<27>'* ML *'/ print <20>0" {PRIMS} <20>
> primitives
:prims.c <EFBFBD> primitives
begin
echo '#include "mlvalues.h"'
echo '#include "prims.h"'
streamedit -e '1,$ change "extern value " . "();"' primitives
echo 'c_primitive cprim [] = {'
streamedit -e '1,$ change " " . ","' primitives
echo '0 };'
echo 'char * names_of_cprim [] = {'
streamedit -e '1,$ change " <20>"" . "<22>","' primitives
echo '0 };'
end > prims.c
:opnames.h <20> :instruct.h
streamedit -e "/<2F><>/'*'/ delete" <20>
-e "/enum / replace // 'char * names_of_'" <20>
-e '/{<7B>/ replace // "[] = {"' <20>
-e "1,$ replace /<2F>([A-Z][A-Z_0-9]*)<29>0/ '<27>"' <20>0 '<EFBFBD>"' -c <20>" <20>
instruct.h > opnames.h
:md5.c.x <EFBFBD>
{PPCC} :md5.c -o :md5.c.x -opt off {PPCCOptions} -opt off
:rotatecursor.c.o <EFBFBD>
{C} -b rotatecursor.c -o rotatecursor.c.o {COptions}
depend <20> :prims.c :opnames.h
begin
makedepend -w -objext .x <20>.c
makedepend -w <20>.c
end | streamedit -e "/<2F>t/ replace // ' ' -c <20>" > Makefile.Mac.depend