ocaml/maccaml/Makefile.Mac

101 lines
4.0 KiB
Makefile
Raw Normal View History

OCAMLVNUM = {OCAMLMAJOR}{OCAMLMINOR}
MACVNUM = 0x{MAJOR}{MINOR}
VERSIONSTR = "<22>"{OCAMLMAJOR}.{OCAMLMINOR}/Mac{MAJOR}.{MINOR}{STAGE}{REV}<EFBFBD>""
C = sc
COptions = -I ::byterun: -model far -w 17
LinkOptions = -model far -compact -pad 0 -state nouse -br 68k -msg nodup
SysLibs = "{libraries}IntEnv.far.o" "{libraries}MacRuntime.o" <20>
"{clibraries}StdCLib.far.o" "{libraries}MathLib.far.o" <20>
"{libraries}Interface.o"
CamlrunLibs = ::byterun:libcamlrun.o ::otherlibs:num:libnums.o
WELibs = :WASTE-1.2:WASTELib.o
Libs = {camlrunlibs} {welibs} {syslibs}
PPCC = mrc -proto strict -sym on # XXX
PPCCOptions = -I ::byterun: -w 35 -d DEBUG # XXX
PPCLinkOptions = -d -sym on # XXX
PPCSysLibs = "{sharedlibraries}MathLib" "{ppclibraries}PPCCRuntime.o" <20>
"{sharedlibraries}StdCLib" <20>
"{ppclibraries}StdCRuntime.o" "{sharedlibraries}InterfaceLib" <20>
"{sharedlibraries}DragLib"
PPCCamlrunLibs = ::byterun:libcamlrun.x ::otherlibs:num:libnums.x
PPCWELibs = :WASTE-1.2:WASTELib.x
PPCLibs = {ppccamlrunlibs} {ppcwelibs} {ppcsyslibs}
RezDefs = -d SystemSevenOrLater=1 -d OCAMLVNUM={OCAMLVNUM} <20>
-d MACVNUM={MACVNUM} -d STAGE={STAGE} -d DEVVNUM={REV} <20>
-d VERSIONSTR={VERSIONSTR}
RezIncludes = "{rincludes}types.r" "{rincludes}systypes.r" "{rincludes}sound.r"
OBJS = aboutbox.c.o appleevents.c.o clipboard.c.o <20>
drag.c.o errors.c.o <20>
events.c.o files.c.o glue.c.o <20>
graph.c.o lcontrols.c.o lib.c.o main.c.o memory.c.o <20>
menus.c.o misc.c.o modalfilter.c.o prefs.c.o prims.c.o <20>
print.c.o scroll.c.o windows.c.o
PPCOBJS = aboutbox.c.x appleevents.c.x clipboard.c.x <20>
drag.c.x errors.c.x <20>
events.c.x files.c.x glue.c.x <20>
graph.c.x lcontrols.c.x lib.c.x main.c.x memory.c.x <20>
menus.c.x misc.c.x modalfilter.c.x prefs.c.x prims.c.x <20>
print.c.x scroll.c.x windows.c.x
all <EFBFBD> appli
set status 0
primitives <20> ::byterun:primitives graphprims numprims
catenate ::byterun:primitives graphprims numprims >primitives
prims.c <EFBFBD> primitives
echo '#include "mlvalues.h"' > prims.c
echo '#include "prims.h"' >> prims.c
streamedit -e '1,$ change "extern value " . "();"' primitives >>prims.c
echo 'c_primitive cprim [] = {' >> prims.c
streamedit -e '1,$ change " " . ","' primitives >> prims.c
echo '0 };' >> prims.c
echo 'char * names_of_cprim [] = {' >> prims.c
streamedit -e '1,$ change " <20>"" . "<22>","' primitives >> prims.c
echo '0 };' >> prims.c
OCaml.68k <EFBFBD> {OBJS}
ilink -o OCaml.68k {linkoptions} {OBJS} {libs}
OCaml.PPC <EFBFBD> {PPCOBJS}
ppclink -o OCaml.PPC {ppclinkoptions} {PPCOBJS} {ppclibs}
rename -y OCaml.PPC.xcoff "Objective Caml.xcoff" # XXX
OCaml.bytecode <20> primitives ::toplevellib.cma ::toplevel:topmain.cmo <20>
::otherlibs:graph:graphics.cma ::otherlibs:num:nums.cma
::byterun:ocamlrun ::ocamlc -I ::stdlib: -linkall -use-prims primitives <20>
::toplevellib.cma ::otherlibs:graph:graphics.cma <20>
::otherlibs:num:nums.cma ::toplevel:topmain.cmo <20>
-o OCaml.bytecode
dummy_fragment <EFBFBD> dummy_fragment.c.x
ppclink -xm l -o dummy_fragment {ppclinkoptions} dummy_fragment.c.x
appli <EFBFBD><EFBFBD> ocaml.r OCaml.bytecode OCaml.PPC OCaml.68k dummy_fragment
duplicate -y OCaml.68k "Objective Caml"
rez -a -o "Objective Caml" {RezDefs} {rezincludes} ocaml.r
mergefragment -a OCaml.PPC "Objective Caml"
mergefragment dummy_fragment "Objective Caml"
catenate OCaml.bytecode >>"Objective Caml"
setfile -t APPL -c Caml -a iB "Objective Caml"
install <EFBFBD>
duplicate -y "Objective Caml" "{APPLIDIR}"
partialclean <EFBFBD>
delete -i OCaml.bytecode "Objective Caml"
clean <EFBFBD>
delete -i {OBJS} {PPCOBJS} OCaml.68k OCaml.PPC OCaml.bytecode <20>
"Objective Caml" primitives prims.c null
delete -i dummy_fragment dummy_fragment.c.x dummy_fragment.xcoff
delete -i "Objective Caml.xcoff" "Objective Caml.dbg"
depend <EFBFBD> prims.c
makedepend <20>.c > Makefile.Mac.depend