1996-02-21 02:49:46 -08:00
|
|
|
!include ..\config\Makefile.nt
|
|
|
|
|
1997-10-16 09:10:53 -07:00
|
|
|
CC=$(BYTECC)
|
1996-02-21 02:49:46 -08:00
|
|
|
CFLAGS=$(BYTECCCOMPOPTS)
|
|
|
|
|
1996-09-04 08:52:56 -07:00
|
|
|
OBJS=interp.obj misc.obj stacks.obj fix_code.obj startup.obj main.obj \
|
|
|
|
fail.obj signals.obj freelist.obj major_gc.obj minor_gc.obj \
|
|
|
|
memory.obj alloc.obj roots.obj compare.obj ints.obj floats.obj \
|
|
|
|
str.obj array.obj io.obj extern.obj intern.obj hash.obj sys.obj \
|
1996-09-06 09:51:56 -07:00
|
|
|
meta.obj parsing.obj gc_ctrl.obj terminfo.obj md5.obj obj.obj lexing.obj \
|
1997-05-13 07:45:38 -07:00
|
|
|
wincmdline.obj printexc.obj callback.obj debugger.obj weak.obj compact.obj
|
1996-02-21 02:49:46 -08:00
|
|
|
|
1998-05-11 11:42:59 -07:00
|
|
|
PRIMS=alloc.c array.c compare.c extern.c floats.c gc_ctrl.c hash.c \
|
1996-02-26 05:52:15 -08:00
|
|
|
intern.c interp.c ints.c io.c lexing.c md5.c meta.c obj.c parsing.c \
|
1997-03-05 02:48:39 -08:00
|
|
|
signals.c str.c sys.c terminfo.c callback.c weak.c
|
1996-02-21 02:49:46 -08:00
|
|
|
|
1998-04-20 05:41:00 -07:00
|
|
|
PUBLIC_INCLUDES=mlvalues.h alloc.h misc.h callback.h fail.h
|
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
all: ocamlrun.exe
|
1996-02-21 02:49:46 -08:00
|
|
|
|
1997-01-05 06:06:13 -08:00
|
|
|
ocamlrun.exe: libcamlrun.lib prims.obj
|
|
|
|
$(BYTECC) $(BYTECCCOMPOPTS) $(BYTECCLINKOPTS) -o ocamlrun.exe prims.obj libcamlrun.lib $(CCLIBS)
|
1996-02-21 02:49:46 -08:00
|
|
|
|
|
|
|
install:
|
1996-04-30 07:53:58 -07:00
|
|
|
cp ocamlrun.exe $(BINDIR)\ocamlrun.exe
|
1997-01-05 06:06:13 -08:00
|
|
|
cp libcamlrun.lib $(LIBDIR)\libcamlrun.lib
|
1996-02-21 02:49:46 -08:00
|
|
|
if not exist $(LIBDIR)\caml mkdir $(LIBDIR)\caml
|
1998-04-20 05:41:00 -07:00
|
|
|
cp $(PUBLIC_INCLUDES) $(LIBDIR)\caml
|
1996-02-22 04:51:45 -08:00
|
|
|
sed -e "/#include .*\/m.h/r ..\config\m.h" \
|
|
|
|
-e "/#include .*\/s.h/r ..\config\s.h" \
|
1996-02-21 02:49:46 -08:00
|
|
|
-e "/#include /d" config.h > $(LIBDIR)\caml\config.h
|
1996-02-22 04:51:45 -08:00
|
|
|
sed -e "/#include .*gc\.h/d" \
|
1996-02-21 02:49:46 -08:00
|
|
|
-e "/#define Alloc_small/,/^}/d" \
|
|
|
|
-e "/Modify/,/^}/d" memory.h > $(LIBDIR)\caml\memory.h
|
|
|
|
|
1997-01-05 06:06:13 -08:00
|
|
|
libcamlrun.lib: $(OBJS)
|
1997-03-05 02:48:39 -08:00
|
|
|
$(MKLIB)libcamlrun.lib $(OBJS)
|
1997-01-05 06:06:13 -08:00
|
|
|
|
1996-02-21 02:49:46 -08:00
|
|
|
clean:
|
1996-04-30 07:53:58 -07:00
|
|
|
rm -f ocamlrun.exe *.obj *.lib
|
1996-02-21 02:49:46 -08:00
|
|
|
rm -f primitives prims.c opnames.h jumptbl.h
|
|
|
|
|
|
|
|
primitives : $(PRIMS)
|
1997-03-05 02:48:39 -08:00
|
|
|
sed -n -e "/\/\* ML \*\//s/.* \([a-z0-9_]*\) *(.*/\1/p" \
|
1996-02-21 02:49:46 -08:00
|
|
|
$(PRIMS) > primitives
|
|
|
|
|
|
|
|
prims.c : primitives
|
|
|
|
echo #include "mlvalues.h" > prims.c
|
|
|
|
echo #include "prims.h" >> prims.c
|
|
|
|
sed -e "s/.*/extern value &();/" primitives >> prims.c
|
|
|
|
echo c_primitive cprim[] = { >> prims.c
|
|
|
|
sed -e "s/.*/ &,/" primitives >> prims.c
|
|
|
|
echo 0 }; >> prims.c
|
|
|
|
echo char * names_of_cprim[] = { >> prims.c
|
|
|
|
sed -e "s/.*/ \"^&\",/" primitives >> prims.c
|
|
|
|
echo 0 }; >> prims.c
|
|
|
|
|
|
|
|
opnames.h : instruct.h
|
|
|
|
sed -e "/\/\*/d" \
|
|
|
|
-e "s\enum /char * names_of_/" \
|
|
|
|
-e "s/{$$/[] = {/" \
|
|
|
|
-e "s/\([A-Z][A-Z_0-9]*\)/"\1"/g" instruct.h > opnames.h
|
|
|
|
|
|
|
|
# jumptbl.h is required only if you have GCC 2.0 or later
|
|
|
|
jumptbl.h : instruct.h
|
|
|
|
sed -n -e "/^ /s/ \([A-Z]\)/ \&\&lbl_\1/gp" \
|
|
|
|
-e "/^}/q" instruct.h > jumptbl.h
|
|
|
|
|
|
|
|
depend:
|
|
|
|
sed -e "s/\.o/.obj/g" .depend > .depend.nt
|
|
|
|
|
|
|
|
!include .depend.nt
|