101 lines
4.0 KiB
Makefile
101 lines
4.0 KiB
Makefile
OCAMLVNUM = {OCAMLMAJOR}{OCAMLMINOR}
|
|
MACVNUM = 0x{MAJOR}{MINOR}
|
|
VERSIONSTR = "¶"{OCAMLMAJOR}.{OCAMLMINOR}/Mac{MAJOR}.{MINOR}{STAGE}{REV}¶""
|
|
|
|
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" ¶
|
|
"{clibraries}StdCLib.far.o" "{libraries}MathLib.far.o" ¶
|
|
"{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" ¶
|
|
"{sharedlibraries}StdCLib" ¶
|
|
"{ppclibraries}StdCRuntime.o" "{sharedlibraries}InterfaceLib" ¶
|
|
"{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} ¶
|
|
-d MACVNUM={MACVNUM} -d STAGE={STAGE} -d DEVVNUM={REV} ¶
|
|
-d VERSIONSTR={VERSIONSTR}
|
|
RezIncludes = "{rincludes}types.r" "{rincludes}systypes.r" "{rincludes}sound.r"
|
|
|
|
OBJS = aboutbox.c.o appleevents.c.o clipboard.c.o ¶
|
|
drag.c.o errors.c.o ¶
|
|
events.c.o files.c.o glue.c.o ¶
|
|
graph.c.o lcontrols.c.o lib.c.o main.c.o memory.c.o ¶
|
|
menus.c.o misc.c.o modalfilter.c.o prefs.c.o prims.c.o ¶
|
|
print.c.o scroll.c.o windows.c.o
|
|
|
|
PPCOBJS = aboutbox.c.x appleevents.c.x clipboard.c.x ¶
|
|
drag.c.x errors.c.x ¶
|
|
events.c.x files.c.x glue.c.x ¶
|
|
graph.c.x lcontrols.c.x lib.c.x main.c.x memory.c.x ¶
|
|
menus.c.x misc.c.x modalfilter.c.x prefs.c.x prims.c.x ¶
|
|
print.c.x scroll.c.x windows.c.x
|
|
|
|
all Ä appli
|
|
set status 0
|
|
|
|
primitives Ä ::byterun:primitives graphprims numprims
|
|
catenate ::byterun:primitives graphprims numprims >primitives
|
|
|
|
prims.c Ä 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 " ¶"" . "¶","' primitives >> prims.c
|
|
echo '0 };' >> prims.c
|
|
|
|
OCaml.68k Ä {OBJS}
|
|
ilink -o OCaml.68k {linkoptions} {OBJS} {libs}
|
|
|
|
OCaml.PPC Ä {PPCOBJS}
|
|
ppclink -o OCaml.PPC {ppclinkoptions} {PPCOBJS} {ppclibs}
|
|
rename -y OCaml.PPC.xcoff "Objective Caml.xcoff" # XXX
|
|
|
|
OCaml.bytecode Ä primitives ::toplevellib.cma ::toplevel:topmain.cmo ¶
|
|
::otherlibs:graph:graphics.cma ::otherlibs:num:nums.cma
|
|
::byterun:ocamlrun ::ocamlc -I ::stdlib: -linkall -use-prims primitives ¶
|
|
::toplevellib.cma ::otherlibs:graph:graphics.cma ¶
|
|
::otherlibs:num:nums.cma ::toplevel:topmain.cmo ¶
|
|
-o OCaml.bytecode
|
|
|
|
dummy_fragment Ä dummy_fragment.c.x
|
|
ppclink -xm l -o dummy_fragment {ppclinkoptions} dummy_fragment.c.x
|
|
|
|
appli ÄÄ 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 Ä
|
|
duplicate -y "Objective Caml" "{APPLIDIR}"
|
|
|
|
partialclean Ä
|
|
delete -i OCaml.bytecode "Objective Caml"
|
|
|
|
clean Ä
|
|
delete -i {OBJS} {PPCOBJS} OCaml.68k OCaml.PPC OCaml.bytecode ¶
|
|
"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 Ä prims.c
|
|
makedepend Å.c > Makefile.Mac.depend
|