1999-11-17 10:59:06 -08:00
|
|
|
|
#########################################################################
|
|
|
|
|
# #
|
|
|
|
|
# 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$
|
|
|
|
|
|
1996-11-02 10:00:46 -08:00
|
|
|
|
C = sc
|
2000-03-01 05:01:44 -08:00
|
|
|
|
COptions = -model far -w 29,30,35 # -d DEBUG -mbg full
|
1999-11-08 11:03:57 -08:00
|
|
|
|
AOptions = -model far # -d DEBUG -wb -l
|
|
|
|
|
LinkOptions = -model far -ad 4 -msg nodup -compact -pad 0 -state nouse -br 68k
|
1998-10-02 06:02:32 -07:00
|
|
|
|
Libs = "{libraries}IntEnv.o" <20>
|
|
|
|
|
"{libraries}Interface.o" <20>
|
|
|
|
|
"{libraries}MacRuntime.o" <20>
|
|
|
|
|
"{libraries}MathLib.o" <20>
|
|
|
|
|
"{clibraries}StdCLib.o" <20>
|
|
|
|
|
"{libraries}ToolLibs.o"
|
|
|
|
|
|
1999-11-08 11:03:57 -08:00
|
|
|
|
PPCC = mrc
|
2000-03-01 05:01:44 -08:00
|
|
|
|
PPCCOptions = -w 29,30,35 # -sym on -d DEBUG # beware: "-sym on" => "-opt off"
|
1999-12-30 05:12:10 -08:00
|
|
|
|
PPCLinkOptions = -d # -sym on
|
1996-11-02 10:00:46 -08:00
|
|
|
|
PPCLibs = "{sharedlibraries}MathLib" "{ppclibraries}PPCCRuntime.o" <20>
|
|
|
|
|
"{ppclibraries}PPCToolLibs.o" "{sharedlibraries}StdCLib" <20>
|
1996-11-06 08:51:11 -08:00
|
|
|
|
"{ppclibraries}StdCRuntime.o" "{sharedlibraries}InterfaceLib"
|
1996-11-02 10:00:46 -08:00
|
|
|
|
|
|
|
|
|
OBJS = interp.a.o misc.c.o stacks.c.o 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 gc_ctrl.c.o terminfo.c.o md5.c.o <20>
|
1996-12-11 11:57:35 -08:00
|
|
|
|
obj.c.o lexing.c.o macintosh.c.o rotatecursor.c.o printexc.c.o callback.c.o <20>
|
2000-02-10 06:04:59 -08:00
|
|
|
|
debugger.c.o weak.c.o compact.c.o instrtrace.c.o finalise.c.o custom.c.o
|
1996-11-02 10:00:46 -08:00
|
|
|
|
|
|
|
|
|
PPCOBJS = interp.c.x misc.c.x stacks.c.x 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 gc_ctrl.c.x terminfo.c.x md5.c.x <20>
|
1996-12-11 11:57:35 -08:00
|
|
|
|
obj.c.x lexing.c.x macintosh.c.x rotatecursor.c.x printexc.c.x callback.c.x <20>
|
2000-02-10 06:04:59 -08:00
|
|
|
|
debugger.c.x weak.c.x compact.c.x instrtrace.c.x finalise.c.x custom.c.x
|
1996-11-02 10:00:46 -08:00
|
|
|
|
|
1998-07-04 09:51:51 -07:00
|
|
|
|
PRIMS = alloc.c array.c compare.c extern.c floats.c gc_ctrl.c hash.c <20>
|
1996-11-02 10:00:46 -08:00
|
|
|
|
intern.c interp.c ints.c io.c lexing.c md5.c meta.c obj.c parsing.c <20>
|
2000-01-07 08:51:58 -08:00
|
|
|
|
signals.c str.c sys.c terminfo.c callback.c weak.c finalise.c
|
1996-11-02 10:00:46 -08:00
|
|
|
|
|
2000-02-10 06:04:59 -08:00
|
|
|
|
PUBLIC_INCLUDES = mlvalues.h alloc.h misc.h callback.h fail.h custom.h
|
1998-04-20 05:41:00 -07:00
|
|
|
|
|
1996-11-02 10:00:46 -08:00
|
|
|
|
all <EFBFBD> ocamlrun libcamlrun.o libcamlrun.x
|
|
|
|
|
|
|
|
|
|
ocamlrun <EFBFBD><EFBFBD> libcamlrun.o prims.c.o
|
1997-03-13 08:24:05 -08:00
|
|
|
|
ilink -c 'MPS ' -t MPST {LinkOptions} -o ocamlrun prims.c.o <20>
|
1998-10-02 06:02:32 -07:00
|
|
|
|
libcamlrun.o {libs}
|
1996-11-02 10:00:46 -08:00
|
|
|
|
|
|
|
|
|
ocamlrun <EFBFBD><EFBFBD> libcamlrun.x prims.c.x
|
1997-03-13 08:24:05 -08:00
|
|
|
|
ppclink -c 'MPS ' -t MPST {PPCLinkOptions} -o ocamlrun prims.c.x <20>
|
|
|
|
|
libcamlrun.x {PPCLibs}
|
1996-11-02 10:00:46 -08:00
|
|
|
|
|
|
|
|
|
libcamlrun.o <EFBFBD> {OBJS}
|
1997-03-13 08:24:05 -08:00
|
|
|
|
lib -o libcamlrun.o {OBJS}
|
1996-11-02 10:00:46 -08:00
|
|
|
|
|
|
|
|
|
libcamlrun.x <EFBFBD> {PPCOBJS}
|
1997-03-13 08:24:05 -08:00
|
|
|
|
ppclink {PPCLinkOptions} -xm library -o libcamlrun.x {PPCOBJS}
|
1996-11-02 10:00:46 -08:00
|
|
|
|
|
|
|
|
|
install <EFBFBD>
|
1997-03-13 08:24:05 -08:00
|
|
|
|
duplicate -y ocamlrun "{BINDIR}ocamlrun"
|
|
|
|
|
duplicate -y libcamlrun.x libcamlrun.o "{LIBDIR}"
|
|
|
|
|
if "`exists -d "{LIBDIR}caml:"`" == ""
|
|
|
|
|
newfolder "{LIBDIR}caml:"
|
|
|
|
|
end
|
1998-04-20 05:41:00 -07:00
|
|
|
|
duplicate -y {PUBLIC_INCLUDES} "{LIBDIR}caml:"
|
1998-07-04 09:51:51 -07:00
|
|
|
|
duplicate -y config.h "{LIBDIR}caml:"
|
1997-03-13 08:24:05 -08:00
|
|
|
|
open -t "{LIBDIR}caml:config.h"
|
|
|
|
|
find <20> "{LIBDIR}caml:config.h"
|
|
|
|
|
find /<2F>'#include "'<EFBFBD>sm-Mac.hŰ/ "{LIBDIR}caml:config.h"
|
|
|
|
|
catenate ::config:sm-Mac.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"
|
1998-07-04 09:51:51 -07:00
|
|
|
|
duplicate -y memory.h "{LIBDIR}caml:"
|
1997-03-13 08:24:05 -08:00
|
|
|
|
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"
|
1996-11-02 10:00:46 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD>
|
1997-03-13 08:24:05 -08:00
|
|
|
|
delete -i <20>.[ox] || set status 0
|
1999-11-18 09:38:45 -08:00
|
|
|
|
delete -i ocamlrun primitives prims.c opnames.h interp.a.lst
|
1999-11-29 11:02:50 -08:00
|
|
|
|
delete -i ocamlrun.xcoff ocamlrun.dbg
|
1996-11-02 10:00:46 -08:00
|
|
|
|
|
|
|
|
|
primitives <EFBFBD> {PRIMS}
|
1998-10-02 06:02:32 -07:00
|
|
|
|
streamedit -d -e "/ ([a-z0-9_]+)<29>0 *'('<27>'* ML *'/ print <20>0" {PRIMS} <20>
|
|
|
|
|
> primitives
|
1996-11-02 10:00:46 -08:00
|
|
|
|
|
|
|
|
|
prims.c <EFBFBD> primitives
|
1997-03-13 08:24:05 -08:00
|
|
|
|
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
|
1996-11-02 10:00:46 -08:00
|
|
|
|
|
|
|
|
|
opnames.h <EFBFBD> instruct.h
|
1997-03-13 08:24:05 -08:00
|
|
|
|
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
|
1996-11-02 10:00:46 -08:00
|
|
|
|
|
|
|
|
|
rotatecursor.c.o <EFBFBD>
|
1997-03-13 08:24:05 -08:00
|
|
|
|
{C} -b rotatecursor.c -o rotatecursor.c.o {COptions}
|
1996-11-02 10:00:46 -08:00
|
|
|
|
|
|
|
|
|
depend <EFBFBD> prims.c opnames.h
|
2000-03-01 05:01:44 -08:00
|
|
|
|
makedepend <20>.c > Makefile.Mac.depend <20> dev:null
|
|
|
|
|
makedepend -objext .x <20>.c >> Makefile.Mac.depend <20> dev:null
|