ocaml/byterun/Makefile.Mac

118 lines
4.4 KiB
Makefile
Raw Blame History

C = sc
COptions = -model far # -d DEBUG -mbg full
AOptions = -model far # -d DEBUG -wb
LinkOptions = -model far -msg nodup -compact -pad 0 -state nouse -br 68k
Libs = "{libraries}IntEnv.o"
"{libraries}Interface.o"
"{libraries}MacRuntime.o"
"{libraries}MathLib.o"
"{clibraries}StdCLib.o"
"{libraries}ToolLibs.o"
PPCC = mrc -sym on
PPCCOptions = -w 35
PPCLinkOptions = -d -sym on
PPCLibs = "{sharedlibraries}MathLib" "{ppclibraries}PPCCRuntime.o"
"{ppclibraries}PPCToolLibs.o" "{sharedlibraries}StdCLib"
"{ppclibraries}StdCRuntime.o" "{sharedlibraries}InterfaceLib"
OBJS = interp.a.o misc.c.o stacks.c.o fix_code.c.o startup.c.o main.c.o ¶
freelist.c.o major_gc.c.o minor_gc.c.o memory.c.o alloc.c.o roots.c.o ¶
fail.c.o signals.c.o ¶
compare.c.o ints.c.o floats.c.o str.c.o array.c.o io.c.o extern.c.o ¶
intern.c.o ¶
hash.c.o sys.c.o meta.c.o parsing.c.o gc_ctrl.c.o terminfo.c.o md5.c.o ¶
obj.c.o lexing.c.o macintosh.c.o rotatecursor.c.o printexc.c.o callback.c.o ¶
debugger.c.o weak.c.o compact.c.o instrtrace.c.o
PPCOBJS = interp.c.x misc.c.x stacks.c.x fix_code.c.x startup.c.x main.c.x ¶
freelist.c.x major_gc.c.x minor_gc.c.x memory.c.x alloc.c.x roots.c.x ¶
fail.c.x signals.c.x ¶
compare.c.x ints.c.x floats.c.x str.c.x array.c.x io.c.x extern.c.x ¶
intern.c.x ¶
hash.c.x sys.c.x meta.c.x parsing.c.x gc_ctrl.c.x terminfo.c.x md5.c.x ¶
obj.c.x lexing.c.x macintosh.c.x rotatecursor.c.x printexc.c.x callback.c.x ¶
debugger.c.x weak.c.x compact.c.x instrtrace.c.x
PRIMS = alloc.c array.c compare.c extern.c floats.c gc_ctrl.c hash.c ¶
intern.c interp.c ints.c io.c lexing.c md5.c meta.c obj.c parsing.c ¶
signals.c str.c sys.c terminfo.c callback.c weak.c
PUBLIC_INCLUDES = mlvalues.h alloc.h misc.h callback.h fail.h
all Ä ocamlrun libcamlrun.o libcamlrun.x
ocamlrun ÄÄ libcamlrun.o prims.c.o
ilink -c 'MPS ' -t MPST {LinkOptions} -o ocamlrun prims.c.o
libcamlrun.o {libs}
ocamlrun ÄÄ libcamlrun.x prims.c.x
ppclink -c 'MPS ' -t MPST {PPCLinkOptions} -o ocamlrun prims.c.x
libcamlrun.x {PPCLibs}
libcamlrun.o Ä {OBJS}
lib -o libcamlrun.o {OBJS}
libcamlrun.x Ä {PPCOBJS}
ppclink {PPCLinkOptions} -xm library -o libcamlrun.x {PPCOBJS}
install Ä
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 ¥ "{LIBDIR}caml:config.h"
find /Å'#include "'Åsm-Mac.hÅ°/ "{LIBDIR}caml:config.h"
catenate ::config:sm-Mac.h > "{LIBDIR}caml:config.h"
find ¥ "{LIBDIR}caml:config.h"
clear -c ° /Å'#include "'Å/ "{LIBDIR}caml:config.h"
close -y "{LIBDIR}caml:config.h"
duplicate -y memory.h "{LIBDIR}caml:"
open -t "{LIBDIR}caml:memory.h"
find ¥ "{LIBDIR}caml:memory.h"
clear -c ° /Å'#include "'Å'gc.h'Å/ "{LIBDIR}caml:memory.h"
find ¥ "{LIBDIR}caml:memory.h"
clear /'#define Alloc_small'/:/¥}/ "{LIBDIR}caml:memory.h"
find ¥ "{LIBDIR}caml:memory.h"
clear /'#define Modify'/:/¥}/ "{LIBDIR}caml:memory.h"
close -y "{LIBDIR}caml:memory.h"
clean Ä
delete -i Å.[ox] || set status 0
delete -i ocamlrun primitives prims.c opnames.h
primitives Ä {PRIMS}
streamedit -d -e "/ ([a-z0-9_]+)¨0 *'('Å'* ML *'/ print ¨0" {PRIMS}
> 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
opnames.h Ä instruct.h
streamedit -e "/¶¶/'*'/ delete"
-e "/enum / replace // 'char * names_of_'"
-e '/{°/ replace // "[] = {"'
-e "1,$ replace /<2F>([A-Z][A-Z_0-9]*)¨0/ '¶"' ¨0 '"' -c °"
instruct.h > opnames.h
rotatecursor.c.o Ä
{C} -b rotatecursor.c -o rotatecursor.c.o {COptions}
md5.c.x Ä
{PPCC} -opt off md5.c -o md5.c.x {PPCCOptions}
depend Ä prims.c opnames.h
makedepend Å.c > Makefile.Mac.depend