summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--Makefile.nt554
-rw-r--r--asmcomp/i386/emit.mlp2
-rw-r--r--asmrun/.depend.nt432
-rw-r--r--asmrun/Makefile.nt126
-rw-r--r--asmrun/i386.S3
-rw-r--r--bytecomp/bytelink.ml8
-rw-r--r--byterun/.depend.nt498
-rw-r--r--byterun/Makefile.nt94
-rw-r--r--byterun/compare.c5
-rw-r--r--byterun/custom.c12
-rw-r--r--byterun/custom.h5
-rw-r--r--byterun/extern.c4
-rw-r--r--byterun/main.c4
-rw-r--r--byterun/win32.c7
-rw-r--r--config/Makefile.mingw119
-rw-r--r--config/Makefile.msvc (renamed from config/Makefile.nt)51
-rw-r--r--config/m-nt.h8
-rw-r--r--lex/Makefile.nt18
-rw-r--r--ocamldoc/Makefile.nt152
-rw-r--r--otherlibs/bigarray/Makefile.nt37
-rw-r--r--otherlibs/bigarray/mmap_win32.c3
-rw-r--r--otherlibs/dynlink/Makefile.nt20
-rw-r--r--otherlibs/labltk/Makefile.nt78
-rw-r--r--otherlibs/labltk/browser/Makefile.nt30
-rw-r--r--otherlibs/labltk/browser/winmain.c12
-rw-r--r--otherlibs/labltk/camltk/Makefile.gen.nt72
-rw-r--r--otherlibs/labltk/camltk/Makefile.nt12
-rw-r--r--otherlibs/labltk/compiler/Makefile.nt17
-rw-r--r--otherlibs/labltk/frx/Makefile.nt12
-rw-r--r--otherlibs/labltk/jpf/Makefile.nt10
-rw-r--r--otherlibs/labltk/labltk/Makefile.gen.nt66
-rw-r--r--otherlibs/labltk/labltk/Makefile.nt14
-rw-r--r--otherlibs/labltk/lib/Makefile.nt24
-rw-r--r--otherlibs/labltk/support/Makefile.common.nt11
-rw-r--r--otherlibs/labltk/support/Makefile.nt51
-rw-r--r--otherlibs/labltk/tkanim/Makefile.nt51
-rw-r--r--otherlibs/num/Makefile.nt64
-rw-r--r--otherlibs/num/bignum/Makefile.nt118
-rw-r--r--otherlibs/str/Makefile.nt57
-rw-r--r--otherlibs/systhreads/Makefile.nt55
-rw-r--r--otherlibs/systhreads/win32.c34
-rw-r--r--otherlibs/unix/access.c2
-rw-r--r--otherlibs/unix/gethost.c8
-rw-r--r--otherlibs/win32graph/Makefile.nt59
-rw-r--r--otherlibs/win32unix/Makefile.nt87
-rw-r--r--otherlibs/win32unix/accept.c1
-rw-r--r--otherlibs/win32unix/connect.c1
-rw-r--r--otherlibs/win32unix/lockf.c5
-rw-r--r--otherlibs/win32unix/lseek.c3
-rw-r--r--otherlibs/win32unix/sendrecv.c1
-rw-r--r--otherlibs/win32unix/sleep.c2
-rw-r--r--otherlibs/win32unix/sockopt.c1
-rw-r--r--otherlibs/win32unix/system.c1
-rw-r--r--otherlibs/win32unix/unix.ml4
-rw-r--r--otherlibs/win32unix/unixsupport.c1
-rw-r--r--otherlibs/win32unix/windir.c1
-rw-r--r--otherlibs/win32unix/winwait.c3
-rw-r--r--stdlib/Makefile.nt21
-rw-r--r--stdlib/headernt.c9
-rw-r--r--test/Makefile2
-rw-r--r--tools/Makefile.nt38
-rw-r--r--utils/ccomp.ml12
-rw-r--r--utils/config.mli5
-rw-r--r--utils/config.mlp1
-rw-r--r--win32caml/Makefile2
-rw-r--r--yacc/Makefile.nt43
67 files changed, 1248 insertions, 2016 deletions
diff --git a/Makefile b/Makefile
index 8b8fa253e..8bdfb0b5f 100644
--- a/Makefile
+++ b/Makefile
@@ -308,6 +308,7 @@ utils/config.ml: utils/config.mlp config/Makefile
@rm -f utils/config.ml
sed -e 's|%%LIBDIR%%|$(LIBDIR)|' \
-e 's|%%BYTERUN%%|$(BINDIR)/ocamlrun|' \
+ -e 's|%%CCOMPTYPE%%|cc|' \
-e 's|%%BYTECC%%|$(BYTECC) $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS)|' \
-e 's|%%BYTELINK%%|$(BYTECC) $(BYTECCLINKOPTS)|' \
-e 's|%%NATIVECC%%|$(NATIVECC) $(NATIVECCCOMPOPTS)|' \
diff --git a/Makefile.nt b/Makefile.nt
index 709a85ec5..f2bbcbe38 100644
--- a/Makefile.nt
+++ b/Makefile.nt
@@ -14,95 +14,95 @@
# The main Makefile
-!include config\Makefile.nt
+include config/Makefile
-CAMLC=boot\ocamlrun boot\ocamlc -I boot
-CAMLOPT=boot\ocamlrun .\ocamlopt -I stdlib
+CAMLC=boot/ocamlrun boot/ocamlc -I boot
+CAMLOPT=boot/ocamlrun ./ocamlopt -I stdlib
COMPFLAGS=$(INCLUDES)
LINKFLAGS=
-CAMLYACC=boot\ocamlyacc
+CAMLYACC=boot/ocamlyacc
YACCFLAGS=
-CAMLLEX=boot\ocamlrun boot\ocamllex
-CAMLDEP=boot\ocamlrun tools\ocamldep
+CAMLLEX=boot/ocamlrun boot/ocamllex
+CAMLDEP=boot/ocamlrun tools/ocamldep
DEPFLAGS=$(INCLUDES)
-CAMLRUN=byterun\ocamlrun
+CAMLRUN=byterun/ocamlrun
INCLUDES=-I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver -I toplevel
-UTILS=utils\misc.cmo utils\tbl.cmo utils\config.cmo \
- utils\clflags.cmo utils\terminfo.cmo utils\ccomp.cmo utils\warnings.cmo
+UTILS=utils/misc.cmo utils/tbl.cmo utils/config.cmo \
+ utils/clflags.cmo utils/terminfo.cmo utils/ccomp.cmo utils/warnings.cmo
OPTUTILS=$(UTILS)
-PARSING=parsing\linenum.cmo parsing\location.cmo parsing\longident.cmo \
- parsing\syntaxerr.cmo parsing\parser.cmo \
- parsing\lexer.cmo parsing\parse.cmo parsing\printast.cmo
-
-TYPING=typing\ident.cmo typing\path.cmo \
- typing\primitive.cmo typing\types.cmo \
- typing\btype.cmo typing\oprint.cmo \
- typing\subst.cmo typing\predef.cmo \
- typing\datarepr.cmo typing\env.cmo \
- typing\typedtree.cmo typing\ctype.cmo \
- typing\printtyp.cmo typing\includeclass.cmo \
- typing\mtype.cmo typing\includecore.cmo \
- typing\includemod.cmo typing\parmatch.cmo \
- typing\typetexp.cmo typing\typecore.cmo \
- typing\typedecl.cmo typing\typeclass.cmo \
- typing\typemod.cmo
-
-COMP=bytecomp\lambda.cmo bytecomp\printlambda.cmo \
- bytecomp\typeopt.cmo bytecomp\switch.cmo bytecomp\matching.cmo \
- bytecomp\translobj.cmo bytecomp\translcore.cmo \
- bytecomp\translclass.cmo bytecomp\translmod.cmo \
- bytecomp\simplif.cmo bytecomp\runtimedef.cmo
-
-BYTECOMP=bytecomp\meta.cmo bytecomp\instruct.cmo bytecomp\bytegen.cmo \
- bytecomp\printinstr.cmo bytecomp\opcodes.cmo bytecomp\emitcode.cmo \
- bytecomp\bytesections.cmo bytecomp\dll.cmo bytecomp\symtable.cmo \
- bytecomp\bytelink.cmo bytecomp\bytelibrarian.cmo bytecomp\bytepackager.cmo
-
-ASMCOMP=asmcomp\arch.cmo asmcomp\cmm.cmo asmcomp\printcmm.cmo \
- asmcomp\reg.cmo asmcomp\mach.cmo asmcomp\proc.cmo \
- asmcomp\clambda.cmo asmcomp\compilenv.cmo \
- asmcomp\closure.cmo asmcomp\cmmgen.cmo \
- asmcomp\printmach.cmo asmcomp\selectgen.cmo asmcomp\selection.cmo \
- asmcomp\comballoc.cmo asmcomp\liveness.cmo \
- asmcomp\spill.cmo asmcomp\split.cmo \
- asmcomp\interf.cmo asmcomp\coloring.cmo \
- asmcomp\reloadgen.cmo asmcomp\reload.cmo \
- asmcomp\printlinear.cmo asmcomp\linearize.cmo \
- asmcomp\schedgen.cmo asmcomp\scheduling.cmo \
- asmcomp\emitaux.cmo asmcomp\emit.cmo asmcomp\asmgen.cmo \
- asmcomp\asmlink.cmo asmcomp\asmlibrarian.cmo asmcomp\asmpackager.cmo
-
-DRIVER=driver\pparse.cmo driver\errors.cmo driver\compile.cmo \
- driver\main_args.cmo driver\main.cmo
-
-OPTDRIVER=driver\pparse.cmo driver\opterrors.cmo driver\optcompile.cmo \
- driver\optmain.cmo
-
-TOPLEVEL=driver\pparse.cmo driver\errors.cmo driver\compile.cmo \
- toplevel\genprintval.cmo toplevel\toploop.cmo \
- toplevel\trace.cmo toplevel\topdirs.cmo
-
-TOPLEVELLIB=toplevel\toplevellib.cma
-TOPLEVELMAIN=toplevel\topmain.cmo
+PARSING=parsing/linenum.cmo parsing/location.cmo parsing/longident.cmo \
+ parsing/syntaxerr.cmo parsing/parser.cmo \
+ parsing/lexer.cmo parsing/parse.cmo parsing/printast.cmo
+
+TYPING=typing/ident.cmo typing/path.cmo \
+ typing/primitive.cmo typing/types.cmo \
+ typing/btype.cmo typing/oprint.cmo \
+ typing/subst.cmo typing/predef.cmo \
+ typing/datarepr.cmo typing/env.cmo \
+ typing/typedtree.cmo typing/ctype.cmo \
+ typing/printtyp.cmo typing/includeclass.cmo \
+ typing/mtype.cmo typing/includecore.cmo \
+ typing/includemod.cmo typing/parmatch.cmo \
+ typing/typetexp.cmo typing/typecore.cmo \
+ typing/typedecl.cmo typing/typeclass.cmo \
+ typing/typemod.cmo
+
+COMP=bytecomp/lambda.cmo bytecomp/printlambda.cmo \
+ bytecomp/typeopt.cmo bytecomp/switch.cmo bytecomp/matching.cmo \
+ bytecomp/translobj.cmo bytecomp/translcore.cmo \
+ bytecomp/translclass.cmo bytecomp/translmod.cmo \
+ bytecomp/simplif.cmo bytecomp/runtimedef.cmo
+
+BYTECOMP=bytecomp/meta.cmo bytecomp/instruct.cmo bytecomp/bytegen.cmo \
+ bytecomp/printinstr.cmo bytecomp/opcodes.cmo bytecomp/emitcode.cmo \
+ bytecomp/bytesections.cmo bytecomp/dll.cmo bytecomp/symtable.cmo \
+ bytecomp/bytelink.cmo bytecomp/bytelibrarian.cmo bytecomp/bytepackager.cmo
+
+ASMCOMP=asmcomp/arch.cmo asmcomp/cmm.cmo asmcomp/printcmm.cmo \
+ asmcomp/reg.cmo asmcomp/mach.cmo asmcomp/proc.cmo \
+ asmcomp/clambda.cmo asmcomp/compilenv.cmo \
+ asmcomp/closure.cmo asmcomp/cmmgen.cmo \
+ asmcomp/printmach.cmo asmcomp/selectgen.cmo asmcomp/selection.cmo \
+ asmcomp/comballoc.cmo asmcomp/liveness.cmo \
+ asmcomp/spill.cmo asmcomp/split.cmo \
+ asmcomp/interf.cmo asmcomp/coloring.cmo \
+ asmcomp/reloadgen.cmo asmcomp/reload.cmo \
+ asmcomp/printlinear.cmo asmcomp/linearize.cmo \
+ asmcomp/schedgen.cmo asmcomp/scheduling.cmo \
+ asmcomp/emitaux.cmo asmcomp/emit.cmo asmcomp/asmgen.cmo \
+ asmcomp/asmlink.cmo asmcomp/asmlibrarian.cmo asmcomp/asmpackager.cmo
+
+DRIVER=driver/pparse.cmo driver/errors.cmo driver/compile.cmo \
+ driver/main_args.cmo driver/main.cmo
+
+OPTDRIVER=driver/pparse.cmo driver/opterrors.cmo driver/optcompile.cmo \
+ driver/optmain.cmo
+
+TOPLEVEL=driver/pparse.cmo driver/errors.cmo driver/compile.cmo \
+ toplevel/genprintval.cmo toplevel/toploop.cmo \
+ toplevel/trace.cmo toplevel/topdirs.cmo toplevel/topmain.cmo
+
+TOPLEVELLIB=toplevel/toplevellib.cma
+TOPLEVELSTART=toplevel/topstart.cmo
COMPOBJS=$(UTILS) $(PARSING) $(TYPING) $(COMP) $(BYTECOMP) $(DRIVER)
TOPLIB=$(UTILS) $(PARSING) $(TYPING) $(COMP) $(BYTECOMP) $(TOPLEVEL)
-TOPOBJS=toplevel\toplevellib.cma $(TOPLEVELMAIN)
+TOPOBJS=$(TOPLEVELLIB) $(TOPLEVELMAIN)
OPTOBJS=$(OPTUTILS) $(PARSING) $(TYPING) $(COMP) $(ASMCOMP) $(OPTDRIVER)
-EXPUNGEOBJS=utils\misc.cmo utils\tbl.cmo \
- utils\config.cmo utils\clflags.cmo \
- typing\ident.cmo typing\path.cmo typing\types.cmo typing\btype.cmo \
- typing\predef.cmo bytecomp\runtimedef.cmo bytecomp\bytesections.cmo \
- bytecomp\dll.cmo \
- bytecomp\symtable.cmo toplevel\expunge.cmo
+EXPUNGEOBJS=utils/misc.cmo utils/tbl.cmo \
+ utils/config.cmo utils/clflags.cmo \
+ typing/ident.cmo typing/path.cmo typing/types.cmo typing/btype.cmo \
+ typing/predef.cmo bytecomp/runtimedef.cmo bytecomp/bytesections.cmo \
+ bytecomp/dll.cmo \
+ bytecomp/symtable.cmo toplevel/expunge.cmo
PERVASIVES=arg array buffer callback char digest filename format gc hashtbl \
lexing list map obj parsing pervasives printexc printf queue random \
@@ -123,23 +123,17 @@ all: runtime ocamlc ocamllex ocamlyacc ocamltools library ocaml otherlibraries o
# Compile everything the first time
world: coldstart all
-# Set up the configuration files
-configure: FORCE
- cp config\m-nt.h config\m.h
- cp config\s-nt.h config\s.h
- cp config\Makefile.nt config\Makefile
-
# Complete bootstrapping cycle
bootstrap:
# Save the original bootstrap compiler
$(MAKEREC) backup
# Promote the new compiler but keep the old runtime
-# This compiler runs on boot\ocamlrun and produces bytecode for byterun\ocamlrun
+# This compiler runs on boot/ocamlrun and produces bytecode for byterun/ocamlrun
$(MAKEREC) promote-cross
-# Rebuild ocamlc and ocamllex (run on byterun\ocamlrun)
+# Rebuild ocamlc and ocamllex (run on byterun/ocamlrun)
$(MAKEREC) partialclean
$(MAKEREC) ocamlc ocamllex
-# Rebuild the library (using byterun\ocamlrun .\ocamlc)
+# Rebuild the library (using byterun/ocamlrun ./ocamlc)
$(MAKEREC) library-cross
# Promote the new compiler and the new runtime
$(MAKEREC) promote
@@ -153,46 +147,47 @@ LIBFILES=stdlib.cma std_exit.cmo *.cmi camlheader
# Start up the system from the distribution compiler
coldstart:
- cd byterun & $(MAKEREC) all
- cp byterun\ocamlrun.exe boot\ocamlrun.exe
- cd yacc & $(MAKEREC) all
- cp yacc\ocamlyacc.exe boot\ocamlyacc.exe
- cd stdlib & $(MAKEREC) COMPILER=..\boot\ocamlc all
- cd stdlib & cp $(LIBFILES) ..\boot
+ cd byterun ; $(MAKEREC) all
+ cp byterun/ocamlrun.exe boot/ocamlrun.exe
+ cp byterun/ocamlrun.dll boot/ocamlrun.dll
+ cd yacc ; $(MAKEREC) all
+ cp yacc/ocamlyacc.exe boot/ocamlyacc.exe
+ cd stdlib ; $(MAKEREC) COMPILER=../boot/ocamlc all
+ cd stdlib ; cp $(LIBFILES) ../boot
# Build the core system: the minimum needed to make depend and bootstrap
core : runtime ocamlc ocamllex ocamlyacc ocamltools library
# Save the current bootstrap compiler
-MAXSAVED=boot\Saved\Saved.prev\Saved.prev\Saved.prev\Saved.prev\Saved.prev
+MAXSAVED=boot/Saved/Saved.prev/Saved.prev/Saved.prev/Saved.prev/Saved.prev
backup:
- if not exist boot\Saved mkdir boot\Saved
+ if not exist boot/Saved mkdir boot/Saved
if exist $(MAXSAVED) rm -r $(MAXSAVED)
- mv boot\Saved boot\Saved.prev
- mkdir boot\Saved
- mv boot\Saved.prev boot\Saved\Saved.prev
- cp boot\ocamlrun.exe boot\Saved\ocamlrun.exe
- cd boot & mv ocamlc ocamllex ocamlyacc.exe Saved
- cd boot & cp $(LIBFILES) Saved
+ mv boot/Saved boot/Saved.prev
+ mkdir boot/Saved
+ mv boot/Saved.prev boot/Saved/Saved.prev
+ cp boot/ocamlrun.exe boot/Saved/ocamlrun.exe
+ cd boot ; mv ocamlc ocamllex ocamlyacc.exe Saved
+ cd boot ; cp $(LIBFILES) Saved
# Promote the newly compiled system to the rank of cross compiler
# (Runs on the old runtime, produces code for the new runtime)
promote-cross:
- cp ocamlc boot\ocamlc
- cp lex\ocamllex boot\ocamllex
- cp yacc\ocamlyacc.exe boot\ocamlyacc.exe
- cd stdlib & cp $(LIBFILES) ..\boot
+ cp ocamlc boot/ocamlc
+ cp lex/ocamllex boot/ocamllex
+ cp yacc/ocamlyacc.exe boot/ocamlyacc.exe
+ cd stdlib ; cp $(LIBFILES) ../boot
# Promote the newly compiled system to the rank of bootstrap compiler
# (Runs on the new runtime, produces code for the new runtime)
promote: promote-cross
- cp byterun\ocamlrun.exe boot\ocamlrun.exe
+ cp byterun/ocamlrun.exe boot/ocamlrun.exe
# Restore the saved bootstrap compiler if a problem arises
restore:
- cd boot\Saved & mv * ..
- rmdir boot\Saved
- mv boot\Saved.prev boot\Saved
+ cd boot/Saved ; mv * ..
+ rmdir boot/Saved
+ mv boot/Saved.prev boot/Saved
# Check if fixpoint reached
compare:
@@ -201,7 +196,7 @@ compare:
# Remove old bootstrap compilers
cleanboot:
- rm -rf boot\Saved\Saved.prev\*
+ rm -rf boot/Saved/Saved.prev/*
# Compile the native-code compiler
opt: runtimeopt ocamlopt libraryopt otherlibrariesopt camlp4opt
@@ -213,40 +208,41 @@ opt.opt: ocamlc.opt ocamlopt.opt ocamllex.opt ocamltoolsopt.opt ocamldoc.opt
install: installbyt installopt
installbyt:
- if not exist "$(BINDIR)" mkdir "$(BINDIR)"
- if not exist "$(LIBDIR)" mkdir "$(LIBDIR)"
- cd byterun & $(MAKEREC) install
- echo $(LIBDIR)> $(LIBDIR)\ld.conf
- cp ocamlc $(BINDIR)\ocamlc.exe
- cp ocaml $(BINDIR)\ocaml.exe
- cd stdlib & $(MAKEREC) install
- cp lex\ocamllex $(BINDIR)\ocamllex.exe
- cp yacc\ocamlyacc.exe $(BINDIR)\ocamlyacc.exe
- cp toplevel\toplevellib.cma $(LIBDIR)\toplevellib.cma
- $(CAMLC) -a -o $(LIBDIR)\toplevellib.cma $(TOPLIB)
- cp expunge $(LIBDIR)\expunge.exe
- cp typing/outcometree.cmi $(LIBDIR)\outcometree.cmi
- cp typing/outcometree.mli $(LIBDIR)\outcometree.mli
- cp toplevel\topmain.cmo $(LIBDIR)\topmain.cmo
- cp toplevel\toploop.cmi $(LIBDIR)\toploop.cmi
- cp toplevel\topdirs.cmi $(LIBDIR)\topdirs.cmi
- cd tools & $(MAKEREC) install
- cd ocamldoc & $(MAKEREC) install
- for %i in ($(OTHERLIBRARIES)) do (cd otherlibs\%i & $(MAKEREC) install & cd ..\..)
- cd win32caml & $(MAKE) -nologo install
- copy /a README $(DISTRIB)\Readme.gen
- copy /a README.win32 $(DISTRIB)\Readme.win
- copy /a LICENSE $(DISTRIB)\License.txt
- copy /a Changes $(DISTRIB)\Changes.txt
- cd camlp4 & make install
+ mkdir -p $(BINDIR)
+ mkdir -p $(LIBDIR)
+ cd byterun ; $(MAKEREC) install
+ echo $(LIBDIR)> $(LIBDIR)/ld.conf
+ cp ocamlc $(BINDIR)/ocamlc.exe
+ cp ocaml $(BINDIR)/ocaml.exe
+ cd stdlib ; $(MAKEREC) install
+ cp lex/ocamllex $(BINDIR)/ocamllex.exe
+ cp yacc/ocamlyacc.exe $(BINDIR)/ocamlyacc.exe
+ cp toplevel/toplevellib.cma $(LIBDIR)/toplevellib.cma
+ cp expunge $(LIBDIR)/expunge.exe
+ cp typing/outcometree.cmi $(LIBDIR)/outcometree.cmi
+ cp typing/outcometree.mli $(LIBDIR)/outcometree.mli
+ cp toplevel/topmain.cmo $(LIBDIR)/topmain.cmo
+ cp toplevel/toploop.cmi $(LIBDIR)/toploop.cmi
+ cp toplevel/topdirs.cmi $(LIBDIR)/topdirs.cmi
+ cd tools ; $(MAKEREC) install
+ cd ocamldoc ; $(MAKEREC) install
+ for i in $(OTHERLIBRARIES); do $(MAKEREC) -C otherlibs/$$i install; done
+ifeq ($(TOOLCHAIN),msvc)
+ cd win32caml ; $(MAKE) install
+endif
+ cd camlp4 ; make install
+# copy /a README $(DISTRIB)/Readme.gen
+# copy /a README.win32 $(DISTRIB)/Readme.win
+# copy /a LICENSE $(DISTRIB)/License.txt
+# copy /a Changes $(DISTRIB)/Changes.txt
# Installation of the native-code compiler
installopt:
- cd asmrun & $(MAKEREC) install
- cp ocamlopt $(BINDIR)\ocamlopt.exe
- cd stdlib & $(MAKEREC) installopt
- cd ocamldoc & $(MAKEREC) installopt
- for %i in ($(OTHERLIBRARIES)) do (cd otherlibs\%i & $(MAKEREC) installopt & cd ..\..)
+ cd asmrun ; $(MAKEREC) install
+ cp ocamlopt $(BINDIR)/ocamlopt.exe
+ cd stdlib ; $(MAKEREC) installopt
+ cd ocamldoc ; $(MAKEREC) installopt
+ for i in $(OTHERLIBRARIES); do $(MAKEREC) -C otherlibs/$$i installopt; done
clean:: partialclean
@@ -254,6 +250,9 @@ clean:: partialclean
ocamlc: $(COMPOBJS)
$(CAMLC) $(LINKFLAGS) -o ocamlc $(COMPOBJS)
+ @sed -e 's|@compiler@|$$topdir/boot/ocamlrun $$topdir/ocamlc|' \
+ driver/ocamlcomp.sh.in > ocamlcomp.sh
+ @chmod +x ocamlcomp.sh
partialclean::
rm -f ocamlc
@@ -262,6 +261,9 @@ partialclean::
ocamlopt: $(OPTOBJS)
$(CAMLC) $(LINKFLAGS) -o ocamlopt $(OPTOBJS)
+ @sed -e 's|@compiler@|$$topdir/boot/ocamlrun $$topdir/ocamlopt|' \
+ driver/ocamlcomp.sh.in > ocamlcompopt.sh
+ @chmod +x ocamlcompopt.sh
partialclean::
rm -f ocamlopt
@@ -270,10 +272,10 @@ partialclean::
ocaml: $(TOPOBJS) expunge
$(CAMLC) $(LINKFLAGS) -linkall -o ocaml.tmp $(TOPOBJS)
- - $(CAMLRUN) .\expunge ocaml.tmp ocaml $(PERVASIVES)
+ - $(CAMLRUN) ./expunge ocaml.tmp ocaml $(PERVASIVES)
rm -f ocaml.tmp
-toplevel\toplevellib.cma: $(TOPLIB)
+toplevel/toplevellib.cma: $(TOPLIB)
$(CAMLC) -a -o $@ $(TOPLIB)
partialclean::
@@ -281,67 +283,71 @@ partialclean::
# The configuration file
-utils\config.ml: utils\config.mlp config\Makefile.nt
- @rm -f utils\config.ml
- sed -e "s|%%%%LIBDIR%%%%|$(LIBDIR:\=\\\\\\\\)|" \
- -e "s|%%%%BYTERUN%%%%|ocamlrun|" \
- -e "s|%%%%BYTECC%%%%|$(BYTECC) $(BYTECCCOMPOPTS)|" \
- -e "s|%%%%BYTELINK%%%%|$(BYTECC) $(BYTECCLINKOPTS)|" \
- -e "s|%%%%NATIVECC%%%%|$(NATIVECC) $(NATIVECCCOMPOPTS)|" \
- -e "s|%%%%NATIVELINK%%%%|$(NATIVECC) $(NATIVECCLINKOPTS)|" \
- -e "s|%%%%PARTIALLD%%%%|lib /nologo /debugtype:cv|" \
- -e "s|%%%%BYTECCLIBS%%%%|$(BYTECCLIBS)|" \
- -e "s|%%%%NATIVECCLIBS%%%%|$(NATIVECCLIBS)|" \
- -e "s|%%%%ARCH%%%%|$(ARCH)|" \
- -e "s|%%%%MODEL%%%%|$(MODEL)|" \
- -e "s|%%%%SYSTEM%%%%|$(SYSTEM)|" \
- -e "s|%%%%EXT_OBJ%%%%|.obj|" \
- -e "s|%%%%EXT_ASM%%%%|.asm|" \
- -e "s|%%%%EXT_LIB%%%%|.lib|" \
- -e "s|%%%%EXT_DLL%%%%|.dll|" \
- utils\config.mlp > utils\config.ml
- @attrib +r utils\config.ml
+utils/config.ml: utils/config.mlp config/Makefile
+ @rm -f utils/config.ml
+ sed -e "s|%%LIBDIR%%|$(LIBDIR)|" \
+ -e "s|%%BYTERUN%%|ocamlrun|" \
+ -e 's|%%CCOMPTYPE%%|$(CCOMPTYPE)|' \
+ -e "s|%%BYTECC%%|$(BYTECC) $(BYTECCCOMPOPTS)|" \
+ -e "s|%%BYTELINK%%|$(BYTECC) $(BYTECCLINKOPTS)|" \
+ -e "s|%%NATIVECC%%|$(NATIVECC) $(NATIVECCCOMPOPTS)|" \
+ -e "s|%%NATIVELINK%%|$(NATIVECC) $(NATIVECCLINKOPTS)|" \
+ -e "s|%%PARTIALLD%%|$(PARTIALLD)|" \
+ -e "s|%%BYTECCLIBS%%|$(BYTECCLIBS)|" \
+ -e "s|%%NATIVECCLIBS%%|$(NATIVECCLIBS)|" \
+ -e 's|%%RANLIBCMD%%|$(RANLIBCMD)|' \
+ -e 's|%%BINUTILS_NM%%|$(BINUTILS_NM)|' \
+ -e 's|%%BINUTILS_OBJCOPY%%|$(BINUTILS_OBJCOPY)|' \
+ -e "s|%%ARCH%%|$(ARCH)|" \
+ -e "s|%%MODEL%%|$(MODEL)|" \
+ -e "s|%%SYSTEM%%|$(SYSTEM)|" \
+ -e "s|%%EXT_OBJ%%|.$(O)|" \
+ -e "s|%%EXT_ASM%%|.$(S)|" \
+ -e "s|%%EXT_LIB%%|.$(A)|" \
+ -e "s|%%EXT_DLL%%|.dll|" \
+ utils/config.mlp > utils/config.ml
+ @chmod -w utils/config.ml
partialclean::
- rm -f utils\config.ml
+ rm -f utils/config.ml
-beforedepend:: utils\config.ml
+beforedepend:: utils/config.ml
# The parser
-parsing\parser.mli parsing\parser.ml: parsing\parser.mly
- $(CAMLYACC) $(YACCFLAGS) parsing\parser.mly
+parsing/parser.mli parsing/parser.ml: parsing/parser.mly
+ $(CAMLYACC) $(YACCFLAGS) parsing/parser.mly
partialclean::
- rm -f parsing\parser.mli parsing\parser.ml parsing\parser.output
+ rm -f parsing/parser.mli parsing/parser.ml parsing/parser.output
-beforedepend:: parsing\parser.mli parsing\parser.ml
+beforedepend:: parsing/parser.mli parsing/parser.ml
# The lexer
-parsing\lexer.ml: parsing\lexer.mll
- $(CAMLLEX) parsing\lexer.mll
+parsing/lexer.ml: parsing/lexer.mll
+ $(CAMLLEX) parsing/lexer.mll
partialclean::
- rm -f parsing\lexer.ml
+ rm -f parsing/lexer.ml
-beforedepend:: parsing\lexer.ml
+beforedepend:: parsing/lexer.ml
# The auxiliary lexer for counting line numbers
-parsing\linenum.ml: parsing\linenum.mll
- $(CAMLLEX) parsing\linenum.mll
+parsing/linenum.ml: parsing/linenum.mll
+ $(CAMLLEX) parsing/linenum.mll
partialclean::
- rm -f parsing\linenum.ml
+ rm -f parsing/linenum.ml
-beforedepend:: parsing\linenum.ml
+beforedepend:: parsing/linenum.ml
# The bytecode compiler compiled with the native-code compiler
ocamlc.opt: $(COMPOBJS:.cmo=.cmx)
- cd asmrun & $(MAKEREC) meta.obj
- $(CAMLOPT) $(LINKFLAGS) -o ocamlc.opt $(COMPOBJS:.cmo=.cmx) asmrun\meta.obj
+ cd asmrun ; $(MAKEREC) meta.$(O) dynlink.$(O)
+ $(CAMLOPT) $(LINKFLAGS) -o ocamlc.opt $(COMPOBJS:.cmo=.cmx) asmrun/meta.$(O) asmrun/dynlink.$(O)
partialclean::
rm -f ocamlc.opt
@@ -358,89 +364,96 @@ $(OPTOBJS:.cmo=.cmx): ocamlopt
# The numeric opcodes
-bytecomp\opcodes.ml: byterun\instruct.h
- sed -n -e "/^enum/p" -e "s|,||g" -e "/^ /p" byterun\instruct.h | \
- gawk -f tools\make-opcodes > bytecomp\opcodes.ml
+bytecomp/opcodes.ml: byterun/instruct.h
+ sed -n -e "/^enum/p" -e "s|,||g" -e "/^ /p" byterun/instruct.h | \
+ gawk -f tools/make-opcodes > bytecomp/opcodes.ml
partialclean::
- rm -f bytecomp\opcodes.ml
+ rm -f bytecomp/opcodes.ml
-beforedepend:: bytecomp\opcodes.ml
+beforedepend:: bytecomp/opcodes.ml
# The predefined exceptions and primitives
-byterun\primitives:
- cd byterun & $(MAKEREC) primitives
+byterun/primitives:
+ cd byterun ; $(MAKEREC) primitives
-bytecomp\runtimedef.ml: byterun\primitives byterun\fail.h
- echo let builtin_exceptions = ^[^| > bytecomp\runtimedef.ml
- sed -n -e "s|.*/\* \(\"[A-Za-z_]*\"\) \*/$$| \1;|p" byterun\fail.h | \
- sed -e "$$s|;$$||" >> bytecomp\runtimedef.ml
- echo ^|^] >> bytecomp\runtimedef.ml
- echo let builtin_primitives = ^[^| >> bytecomp\runtimedef.ml
- sed -e "s|.*| \"^&\";|" -e "$$s|;$$||" byterun\primitives \
- >> bytecomp\runtimedef.ml
- echo ^|^] >> bytecomp\runtimedef.ml
+bytecomp/runtimedef.ml: byterun/primitives byterun/fail.h
+ (echo 'let builtin_exceptions = [|'; \
+ sed -n -e 's|.*/\* \("[A-Za-z_]*"\) \*/$$| \1;|p' byterun/fail.h | \
+ sed -e '$$s/;$$//'; \
+ echo '|]'; \
+ echo 'let builtin_primitives = [|'; \
+ sed -e 's/.*/ "&";/' -e '$$s/;$$//' byterun/primitives; \
+ echo '|]') > bytecomp/runtimedef.ml
partialclean::
- rm -f bytecomp\runtimedef.ml
+ rm -f bytecomp/runtimedef.ml
-beforedepend:: bytecomp\runtimedef.ml
+beforedepend:: bytecomp/runtimedef.ml
# Choose the right machine-dependent files
-asmcomp\arch.ml: asmcomp\$(ARCH)\arch.ml
- cp asmcomp\$(ARCH)\arch.ml asmcomp\arch.ml
+asmcomp/arch.ml: asmcomp/$(ARCH)/arch.ml
+ cp asmcomp/$(ARCH)/arch.ml asmcomp/arch.ml
partialclean::
- rm -f asmcomp\arch.ml
+ rm -f asmcomp/arch.ml
+
+beforedepend:: asmcomp/arch.ml
-beforedepend:: asmcomp\arch.ml
+ifeq ($(TOOLCHAIN),msvc)
+ASMCOMP_PROC=asmcomp/$(ARCH)/proc_nt.ml
+ASMCOMP_EMIT=asmcomp/$(ARCH)/emit_nt.mlp
+else
+ASMCOMP_PROC=asmcomp/$(ARCH)/proc.ml
+ASMCOMP_EMIT=asmcomp/$(ARCH)/emit.mlp
+endif
-asmcomp\proc.ml: asmcomp\$(ARCH)\proc_nt.ml
- cp asmcomp\$(ARCH)\proc_nt.ml asmcomp\proc.ml
+asmcomp/proc.ml: $(ASMCOMP_PROC)
+ cp $(ASMCOMP_PROC) asmcomp/proc.ml
partialclean::
- rm -f asmcomp\proc.ml
+ rm -f asmcomp/proc.ml
-beforedepend:: asmcomp\proc.ml
+beforedepend:: asmcomp/proc.ml
-asmcomp\selection.ml: asmcomp\$(ARCH)\selection.ml
- cp asmcomp\$(ARCH)\selection.ml asmcomp\selection.ml
+asmcomp/selection.ml: asmcomp/$(ARCH)/selection.ml
+ cp asmcomp/$(ARCH)/selection.ml asmcomp/selection.ml
partialclean::
- rm -f asmcomp\selection.ml
+ rm -f asmcomp/selection.ml
-beforedepend:: asmcomp\selection.ml
+beforedepend:: asmcomp/selection.ml
-asmcomp\reload.ml: asmcomp\$(ARCH)\reload.ml
- cp asmcomp\$(ARCH)\reload.ml asmcomp\reload.ml
+asmcomp/reload.ml: asmcomp/$(ARCH)/reload.ml
+ cp asmcomp/$(ARCH)/reload.ml asmcomp/reload.ml
partialclean::
- rm -f asmcomp\reload.ml
+ rm -f asmcomp/reload.ml
-beforedepend:: asmcomp\reload.ml
+beforedepend:: asmcomp/reload.ml
-asmcomp\scheduling.ml: asmcomp\$(ARCH)\scheduling.ml
- cp asmcomp\$(ARCH)\scheduling.ml asmcomp\scheduling.ml
+asmcomp/scheduling.ml: asmcomp/$(ARCH)/scheduling.ml
+ cp asmcomp/$(ARCH)/scheduling.ml asmcomp/scheduling.ml
partialclean::
- rm -f asmcomp\scheduling.ml
+ rm -f asmcomp/scheduling.ml
-beforedepend:: asmcomp\scheduling.ml
+beforedepend:: asmcomp/scheduling.ml
# Preprocess the code emitters
-asmcomp\emit.ml: asmcomp\$(ARCH)\emit_nt.mlp tools\cvt_emit
- boot\ocamlrun tools\cvt_emit < asmcomp\$(ARCH)\emit_nt.mlp > asmcomp\emit.ml
+asmcomp/emit.ml: $(ASMCOMP_EMIT) tools/cvt_emit
+ boot/ocamlrun tools/cvt_emit < $(ASMCOMP_EMIT) > asmcomp/emit.ml
partialclean::
- rm -f asmcomp\emit.ml
+ rm -f asmcomp/emit.ml
-beforedepend:: asmcomp\emit.ml
+beforedepend:: asmcomp/emit.ml
-tools\cvt_emit: tools\cvt_emit.mll
- cd tools && $(MAKEREC) cvt_emit
+tools/cvt_emit: tools/cvt_emit.mll
+ cd tools ; $(MAKEREC) cvt_emit
# The "expunge" utility
@@ -452,112 +465,114 @@ partialclean::
# The runtime system for the bytecode compiler
-runtime: makeruntime stdlib\libcamlrun.lib
+runtime: makeruntime stdlib/libcamlrun.$(A)
makeruntime:
- cd byterun & $(MAKEREC) all
-stdlib\libcamlrun.lib: byterun\libcamlrun.lib
- cp byterun\libcamlrun.lib stdlib\libcamlrun.lib
+ cd byterun ; $(MAKEREC) all
+stdlib/libcamlrun.$(A): byterun/libcamlrun.$(A)
+ cp byterun/libcamlrun.$(A) stdlib/libcamlrun.$(A)
clean::
- cd byterun & $(MAKEREC) clean
- rm -f stdlib\libcamlrun.lib
+ cd byterun ; $(MAKEREC) clean
+ rm -f stdlib/libcamlrun.$(A)
alldepend::
- cd byterun & $(MAKEREC) depend
+ cd byterun ; $(MAKEREC) depend
# The runtime system for the native-code compiler
-runtimeopt: makeruntimeopt stdlib\libasmrun.lib
+runtimeopt: makeruntimeopt stdlib/libasmrun.$(A)
makeruntimeopt:
- cd asmrun & $(MAKEREC) all
-stdlib\libasmrun.lib: asmrun\libasmrun.lib
- cp asmrun\libasmrun.lib stdlib\libasmrun.lib
+ cd asmrun ; $(MAKEREC) all
+stdlib/libasmrun.$(A): asmrun/libasmrun.$(A)
+ cp asmrun/libasmrun.$(A) stdlib/libasmrun.$(A)
clean::
- cd asmrun & $(MAKEREC) clean
- rm -f stdlib\libasmrun.lib
+ cd asmrun ; $(MAKEREC) clean
+ rm -f stdlib/libasmrun.$(A)
alldepend::
- cd asmrun & $(MAKEREC) depend
+ cd asmrun ; $(MAKEREC) depend
# The library
library:
- cd stdlib & $(MAKEREC) all
+ cd stdlib ; $(MAKEREC) all
library-cross:
- cd stdlib & $(MAKEREC) RUNTIME=..\byterun\ocamlrun all
+ cd stdlib ; $(MAKEREC) RUNTIME=../byterun/ocamlrun all
libraryopt:
- cd stdlib & $(MAKEREC) allopt
+ cd stdlib ; $(MAKEREC) allopt
partialclean::
- cd stdlib & $(MAKEREC) clean
+ cd stdlib ; $(MAKEREC) clean
alldepend::
- cd stdlib & $(MAKEREC) depend
+ cd stdlib ; $(MAKEREC) depend
# The lexer and parser generators
ocamllex:
- cd lex & $(MAKEREC) all
+ cd lex ; $(MAKEREC) all
ocamllex.opt:
- cd lex & $(MAKEREC) allopt
+ cd lex ; $(MAKEREC) allopt
partialclean::
- cd lex & $(MAKEREC) clean
+ cd lex ; $(MAKEREC) clean
alldepend::
- cd lex & $(MAKEREC) depend
+ cd lex ; $(MAKEREC) depend
ocamlyacc:
- cd yacc & $(MAKEREC) all
+ cd yacc ; $(MAKEREC) all
clean::
- cd yacc & $(MAKEREC) clean
+ cd yacc ; $(MAKEREC) clean
# Tools
ocamltools:
- cd tools & $(MAKEREC) all
+ cd tools ; $(MAKEREC) all
ocamltoolsopt.opt:
- cd tools & $(MAKEREC) opt.opt
+ cd tools ; $(MAKEREC) opt.opt
partialclean::
- cd tools & $(MAKEREC) clean
+ cd tools ; $(MAKEREC) clean
alldepend::
- cd tools & $(MAKEREC) depend
+ cd tools ; $(MAKEREC) depend
# OCamldoc
ocamldoc.byte:
- cd ocamldoc & $(MAKEREC) all
+ cd ocamldoc ; $(MAKEREC) all
ocamldoc.opt:
- cd ocamldoc & $(MAKEREC) opt.opt
+ cd ocamldoc ; $(MAKEREC) opt.opt
partialclean::
- cd ocamldoc & $(MAKEREC) clean
+ cd ocamldoc ; $(MAKEREC) clean
alldepend::
- cd ocamldoc & $(MAKEREC) depend
+ cd ocamldoc ; $(MAKEREC) depend
# The extra libraries
otherlibraries:
- -for %i in ($(OTHERLIBRARIES)) do (cd otherlibs\%i & $(MAKEREC) all & cd ..\..)
+ for i in $(OTHERLIBRARIES); do $(MAKEREC) -C otherlibs/$$i all; done
otherlibrariesopt:
- -for %i in ($(OTHERLIBRARIES)) do (cd otherlibs\%i & $(MAKEREC) allopt & cd ..\..)
+ for i in $(OTHERLIBRARIES); do $(MAKEREC) -C otherlibs/$$i allopt; done
partialclean::
- -for %i in ($(OTHERLIBRARIES)) do (cd otherlibs\%i & $(MAKEREC) partialclean & cd ..\..)
+ for i in $(OTHERLIBRARIES); do $(MAKEREC) -C otherlibs/$$i partialclean; done
clean::
- -for %i in ($(OTHERLIBRARIES)) do (cd otherlibs\%i & $(MAKEREC) clean & cd ..\..)
+ for i in $(OTHERLIBRARIES); do $(MAKEREC) -C otherlibs/$$i clean; done
alldepend::
- -for %i in ($(OTHERLIBRARIES)) do (cd otherlibs\%i & $(MAKEREC) depend & cd ..\..)
+ for i in $(OTHERLIBRARIES); do $(MAKEREC) -C otherlibs/$$i depend; done
# Camlp4
camlp4out:
- cd camlp4\config & cat Makefile.tpl Makefile-nt.cnf > Makefile
- cd camlp4 & make
+ cd camlp4/config ; cat Makefile.tpl Makefile-nt.cnf > Makefile
+ cd camlp4 ; $(MAKE)
camlp4opt:
- cd camlp4 & make opt
+ cd camlp4 ; $(MAKE) opt
partialclean::
- cd camlp4 & make clean
+ cd camlp4 ; $(MAKE) clean
# The Win32 toplevel GUI
win32gui:
- cd win32caml & $(MAKE) all
+ifeq ($(TOOLCHAIN),msvc)
+ cd win32caml ; $(MAKE) all
+endif
clean::
- cd win32caml & $(MAKE) clean
+ cd win32caml ; $(MAKE) clean
# Default rules
@@ -573,21 +588,20 @@ clean::
$(CAMLOPT) $(COMPFLAGS) -c $<
partialclean::
- rm -f utils/*.cm* utils/*.obj utils/*.asm
- rm -f parsing/*.cm* parsing/*.obj parsing/*.asm
- rm -f typing/*.cm* typing/*.obj typing/*.asm
- rm -f bytecomp/*.cm* bytecomp/*.obj bytecomp/*.asm
- rm -f asmcomp/*.cm* asmcomp/*.obj asmcomp/*.asm
- rm -f driver/*.cm* driver/*.obj driver/*.asm
- rm -f toplevel/*.cm* toplevel/*.obj toplevel/*.asm
- rm -f tools/*.cm* tools/*.obj tools/*.asm
+ rm -f utils/*.cm* utils/*.$(O) utils/*.$(S)
+ rm -f parsing/*.cm* parsing/*.$(O) parsing/*.$(S)
+ rm -f typing/*.cm* typing/*.$(O) typing/*.$(S)
+ rm -f bytecomp/*.cm* bytecomp/*.$(O) bytecomp/*.$(S)
+ rm -f asmcomp/*.cm* asmcomp/*.$(O) asmcomp/*.$(S)
+ rm -f driver/*.cm* driver/*.$(O) driver/*.$(S)
+ rm -f toplevel/*.cm* toplevel/*.$(O) toplevel/*.$(S)
+ rm -f tools/*.cm* tools/*.$(O) tools/*.$(S)
depend: beforedepend
echo > .depend
- for %d in (utils parsing typing bytecomp asmcomp driver toplevel) do $(CAMLDEP) $(DEPFLAGS) %d\*.mli %d\*.ml >> .depend
+ for %d in (utils parsing typing bytecomp asmcomp driver toplevel) do $(CAMLDEP) $(DEPFLAGS) %d/*.mli %d/*.ml >> .depend
alldepend:: depend
-!include .depend
+include .depend
-FORCE:
diff --git a/asmcomp/i386/emit.mlp b/asmcomp/i386/emit.mlp
index aa4e8db8c..13ddd8b6d 100644
--- a/asmcomp/i386/emit.mlp
+++ b/asmcomp/i386/emit.mlp
@@ -91,7 +91,7 @@ let use_ascii_dir =
let emit_align =
match Config.system with
- "linux_elf" | "bsd_elf" | "solaris" | "beos" | "cygwin" ->
+ "linux_elf" | "bsd_elf" | "solaris" | "beos" | "cygwin" | "mingw" ->
(fun n -> ` .align {emit_int n}\n`)
| _ ->
(fun n -> ` .align {emit_int(Misc.log2 n)}\n`)
diff --git a/asmrun/.depend.nt b/asmrun/.depend.nt
deleted file mode 100644
index d3e6b5efc..000000000
--- a/asmrun/.depend.nt
+++ /dev/null
@@ -1,432 +0,0 @@
-alloc.obj: alloc.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/memory.h ../byterun/gc.h ../byterun/minor_gc.h \
- ../byterun/stacks.h
-array.obj: array.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h
-callback.obj: callback.c ../byterun/callback.h ../byterun/mlvalues.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/misc.h ../byterun/memory.h ../byterun/gc.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h
-compact.obj: compact.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/freelist.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/gc.h ../byterun/gc_ctrl.h \
- ../byterun/major_gc.h ../byterun/memory.h ../byterun/minor_gc.h \
- ../byterun/roots.h ../byterun/weak.h
-compare.obj: compare.c ../byterun/fail.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/memory.h ../byterun/gc.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h
-extern.obj: extern.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/gc.h \
- ../byterun/intext.h ../byterun/io.h ../byterun/memory.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h \
- ../byterun/reverse.h
-fail.obj: fail.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/io.h \
- ../byterun/gc.h ../byterun/memory.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/signals.h \
- stack.h ../byterun/roots.h
-floats.obj: floats.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h ../byterun/stacks.h
-freelist.obj: freelist.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/freelist.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/gc.h ../byterun/gc_ctrl.h \
- ../byterun/major_gc.h
-gc_ctrl.obj: gc_ctrl.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/compact.h ../byterun/gc.h \
- ../byterun/gc_ctrl.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h ../byterun/stacks.h ../byterun/memory.h
-hash.obj: hash.c ../byterun/mlvalues.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/misc.h \
- ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h
-intern.obj: intern.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/gc.h \
- ../byterun/intext.h ../byterun/io.h ../byterun/memory.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h \
- ../byterun/reverse.h ../byterun/md5.h
-ints.obj: ints.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h
-io.obj: io.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/io.h \
- ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/signals.h \
- ../byterun/sys.h
-lexing.obj: lexing.c ../byterun/fail.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/stacks.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h
-main.obj: main.c ../byterun/misc.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/sys.h
-major_gc.obj: major_gc.c ../byterun/compact.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/misc.h \
- ../byterun/fail.h ../byterun/mlvalues.h ../byterun/freelist.h \
- ../byterun/gc.h ../byterun/gc_ctrl.h ../byterun/major_gc.h \
- ../byterun/roots.h ../byterun/memory.h ../byterun/minor_gc.h \
- ../byterun/weak.h
-md5.obj: md5.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/md5.h \
- ../byterun/io.h ../byterun/reverse.h
-memory.obj: memory.c ../byterun/fail.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/freelist.h ../byterun/gc.h \
- ../byterun/gc_ctrl.h ../byterun/major_gc.h ../byterun/memory.h \
- ../byterun/minor_gc.h ../byterun/signals.h
-minor_gc.obj: minor_gc.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/fail.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/gc.h ../byterun/gc_ctrl.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/memory.h \
- ../byterun/minor_gc.h ../byterun/roots.h ../byterun/signals.h
-misc.obj: misc.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/misc.h
-obj.obj: obj.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/gc.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/memory.h \
- ../byterun/minor_gc.h ../byterun/prims.h
-parsing.obj: parsing.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/mlvalues.h ../byterun/misc.h \
- ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/alloc.h
-printexc.obj: printexc.c ../byterun/fail.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h
-roots.obj: roots.c ../byterun/memory.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/gc.h \
- ../byterun/mlvalues.h ../byterun/misc.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h stack.h \
- ../byterun/roots.h
-signals.obj: signals.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/callback.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h ../byterun/fail.h ../byterun/signals.h stack.h \
- ../byterun/sys.h
-startup.obj: startup.c ../byterun/fail.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/gc.h ../byterun/gc_ctrl.h \
- ../byterun/sys.h
-str.obj: str.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h
-sys.obj: sys.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/debugger.h ../byterun/fail.h \
- ../byterun/instruct.h ../byterun/signals.h ../byterun/stacks.h \
- ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/sys.h
-terminfo.obj: terminfo.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/io.h
-weak.obj: weak.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h
-alloc.d.obj: alloc.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/memory.h ../byterun/gc.h ../byterun/minor_gc.h \
- ../byterun/stacks.h
-array.d.obj: array.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h
-callback.d.obj: callback.c ../byterun/callback.h ../byterun/mlvalues.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/misc.h ../byterun/memory.h ../byterun/gc.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h
-compact.d.obj: compact.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/freelist.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/gc.h ../byterun/gc_ctrl.h \
- ../byterun/major_gc.h ../byterun/memory.h ../byterun/minor_gc.h \
- ../byterun/roots.h ../byterun/weak.h
-compare.d.obj: compare.c ../byterun/fail.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/memory.h ../byterun/gc.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h
-extern.d.obj: extern.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/gc.h \
- ../byterun/intext.h ../byterun/io.h ../byterun/memory.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h \
- ../byterun/reverse.h
-fail.d.obj: fail.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/io.h \
- ../byterun/gc.h ../byterun/memory.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/signals.h \
- stack.h ../byterun/roots.h
-floats.d.obj: floats.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h ../byterun/stacks.h
-freelist.d.obj: freelist.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/freelist.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/gc.h ../byterun/gc_ctrl.h \
- ../byterun/major_gc.h
-gc_ctrl.d.obj: gc_ctrl.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/compact.h ../byterun/gc.h \
- ../byterun/gc_ctrl.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h ../byterun/stacks.h ../byterun/memory.h
-hash.d.obj: hash.c ../byterun/mlvalues.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/misc.h \
- ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h
-intern.d.obj: intern.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/gc.h \
- ../byterun/intext.h ../byterun/io.h ../byterun/memory.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h \
- ../byterun/reverse.h ../byterun/md5.h
-ints.d.obj: ints.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h
-io.d.obj: io.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/io.h \
- ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/signals.h \
- ../byterun/sys.h
-lexing.d.obj: lexing.c ../byterun/fail.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/stacks.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h
-main.d.obj: main.c ../byterun/misc.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/sys.h
-major_gc.d.obj: major_gc.c ../byterun/compact.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/misc.h \
- ../byterun/fail.h ../byterun/mlvalues.h ../byterun/freelist.h \
- ../byterun/gc.h ../byterun/gc_ctrl.h ../byterun/major_gc.h \
- ../byterun/roots.h ../byterun/memory.h ../byterun/minor_gc.h \
- ../byterun/weak.h
-md5.d.obj: md5.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/md5.h \
- ../byterun/io.h ../byterun/reverse.h
-memory.d.obj: memory.c ../byterun/fail.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/freelist.h ../byterun/gc.h \
- ../byterun/gc_ctrl.h ../byterun/major_gc.h ../byterun/memory.h \
- ../byterun/minor_gc.h ../byterun/signals.h
-minor_gc.d.obj: minor_gc.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/fail.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/gc.h ../byterun/gc_ctrl.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/memory.h \
- ../byterun/minor_gc.h ../byterun/roots.h ../byterun/signals.h
-misc.d.obj: misc.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/misc.h
-obj.d.obj: obj.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/gc.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/memory.h \
- ../byterun/minor_gc.h ../byterun/prims.h
-parsing.d.obj: parsing.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/mlvalues.h ../byterun/misc.h \
- ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/alloc.h
-printexc.d.obj: printexc.c ../byterun/fail.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h
-roots.d.obj: roots.c ../byterun/memory.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/gc.h \
- ../byterun/mlvalues.h ../byterun/misc.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h stack.h \
- ../byterun/roots.h
-signals.d.obj: signals.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/callback.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h ../byterun/fail.h ../byterun/signals.h stack.h \
- ../byterun/sys.h
-startup.d.obj: startup.c ../byterun/fail.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/gc.h ../byterun/gc_ctrl.h \
- ../byterun/sys.h
-str.d.obj: str.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h
-sys.d.obj: sys.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/debugger.h ../byterun/fail.h \
- ../byterun/instruct.h ../byterun/signals.h ../byterun/stacks.h \
- ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/sys.h
-terminfo.d.obj: terminfo.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/io.h
-weak.d.obj: weak.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h
-alloc.p.obj: alloc.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/memory.h ../byterun/gc.h ../byterun/minor_gc.h \
- ../byterun/stacks.h
-array.p.obj: array.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h
-callback.p.obj: callback.c ../byterun/callback.h ../byterun/mlvalues.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/misc.h ../byterun/memory.h ../byterun/gc.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h
-compact.p.obj: compact.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/freelist.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/gc.h ../byterun/gc_ctrl.h \
- ../byterun/major_gc.h ../byterun/memory.h ../byterun/minor_gc.h \
- ../byterun/roots.h ../byterun/weak.h
-compare.p.obj: compare.c ../byterun/fail.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/memory.h ../byterun/gc.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h
-extern.p.obj: extern.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/gc.h \
- ../byterun/intext.h ../byterun/io.h ../byterun/memory.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h \
- ../byterun/reverse.h
-fail.p.obj: fail.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/io.h \
- ../byterun/gc.h ../byterun/memory.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/signals.h \
- stack.h ../byterun/roots.h
-floats.p.obj: floats.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h ../byterun/stacks.h
-freelist.p.obj: freelist.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/freelist.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/gc.h ../byterun/gc_ctrl.h \
- ../byterun/major_gc.h
-gc_ctrl.p.obj: gc_ctrl.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/compact.h ../byterun/gc.h \
- ../byterun/gc_ctrl.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h ../byterun/stacks.h ../byterun/memory.h
-hash.p.obj: hash.c ../byterun/mlvalues.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/misc.h \
- ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h
-intern.p.obj: intern.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/gc.h \
- ../byterun/intext.h ../byterun/io.h ../byterun/memory.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h \
- ../byterun/reverse.h ../byterun/md5.h
-ints.p.obj: ints.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h
-io.p.obj: io.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/io.h \
- ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/signals.h \
- ../byterun/sys.h
-lexing.p.obj: lexing.c ../byterun/fail.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/stacks.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h
-main.p.obj: main.c ../byterun/misc.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/sys.h
-major_gc.p.obj: major_gc.c ../byterun/compact.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/misc.h \
- ../byterun/fail.h ../byterun/mlvalues.h ../byterun/freelist.h \
- ../byterun/gc.h ../byterun/gc_ctrl.h ../byterun/major_gc.h \
- ../byterun/roots.h ../byterun/memory.h ../byterun/minor_gc.h \
- ../byterun/weak.h
-md5.p.obj: md5.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/md5.h \
- ../byterun/io.h ../byterun/reverse.h
-memory.p.obj: memory.c ../byterun/fail.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/freelist.h ../byterun/gc.h \
- ../byterun/gc_ctrl.h ../byterun/major_gc.h ../byterun/memory.h \
- ../byterun/minor_gc.h ../byterun/signals.h
-minor_gc.p.obj: minor_gc.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/fail.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/gc.h ../byterun/gc_ctrl.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/memory.h \
- ../byterun/minor_gc.h ../byterun/roots.h ../byterun/signals.h
-misc.p.obj: misc.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/misc.h
-obj.p.obj: obj.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/gc.h \
- ../byterun/major_gc.h ../byterun/freelist.h ../byterun/memory.h \
- ../byterun/minor_gc.h ../byterun/prims.h
-parsing.p.obj: parsing.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/mlvalues.h ../byterun/misc.h \
- ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/alloc.h
-printexc.p.obj: printexc.c ../byterun/fail.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h
-roots.p.obj: roots.c ../byterun/memory.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/gc.h \
- ../byterun/mlvalues.h ../byterun/misc.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h stack.h \
- ../byterun/roots.h
-signals.p.obj: signals.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/callback.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h ../byterun/fail.h ../byterun/signals.h stack.h \
- ../byterun/sys.h
-startup.p.obj: startup.c ../byterun/fail.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/gc.h ../byterun/gc_ctrl.h \
- ../byterun/sys.h
-str.p.obj: str.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
- ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h
-sys.p.obj: sys.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/debugger.h ../byterun/fail.h \
- ../byterun/instruct.h ../byterun/signals.h ../byterun/stacks.h \
- ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
- ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/sys.h
-terminfo.p.obj: terminfo.c ../byterun/config.h ../byterun/../config/m.h \
- ../byterun/../config/s.h ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/io.h
-weak.p.obj: weak.c ../byterun/alloc.h ../byterun/misc.h \
- ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
- ../byterun/mlvalues.h ../byterun/fail.h ../byterun/memory.h \
- ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
- ../byterun/minor_gc.h
diff --git a/asmrun/Makefile.nt b/asmrun/Makefile.nt
index 58f55104d..5c0072a98 100644
--- a/asmrun/Makefile.nt
+++ b/asmrun/Makefile.nt
@@ -13,110 +13,60 @@
# $Id$
-!include ..\config\Makefile.nt
+include ../config/Makefile
CC=$(NATIVECC)
-CFLAGS=-I..\byterun -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) $(NATIVECCCOMPOPTS)
+CFLAGS=-I../byterun -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) $(NATIVECCCOMPOPTS)
-COBJS=startup.obj main.obj fail.obj roots.obj signals.obj \
- misc.obj freelist.obj major_gc.obj minor_gc.obj memory.obj alloc.obj \
- compare.obj ints.obj floats.obj str.obj array.obj io.obj extern.obj \
- intern.obj hash.obj sys.obj parsing.obj gc_ctrl.obj terminfo.obj \
- md5.obj obj.obj lexing.obj win32.obj printexc.obj callback.obj \
- weak.obj compact.obj finalise.obj custom.obj globroots.obj
+COBJS=startup.$(O) main.$(O) fail.$(O) roots.$(O) signals.$(O) \
+ misc.$(O) freelist.$(O) major_gc.$(O) minor_gc.$(O) memory.$(O) alloc.$(O) \
+ compare.$(O) ints.$(O) floats.$(O) str.$(O) array.$(O) io.$(O) extern.$(O) \
+ intern.$(O) hash.$(O) sys.$(O) parsing.$(O) gc_ctrl.$(O) terminfo.$(O) \
+ md5.$(O) obj.$(O) lexing.$(O) win32.$(O) printexc.$(O) callback.$(O) \
+ weak.$(O) compact.$(O) finalise.$(O) custom.$(O) globroots.$(O)
-ASMOBJS=$(ARCH)nt.obj
+LINKEDFILES=misc.c freelist.c major_gc.c minor_gc.c memory.c alloc.c array.c \
+ compare.c ints.c floats.c str.c io.c extern.c intern.c hash.c sys.c \
+ parsing.c gc_ctrl.c terminfo.c md5.c obj.c lexing.c printexc.c callback.c \
+ weak.c compact.c meta.c finalise.c custom.c main.c globroots.c \
+ dynlink.c
+
+ifeq ($(TOOLCHAIN),mingw)
+ASMOBJS=i386.o
+else
+ASMOBJS=i386nt.obj
+endif
OBJS=$(COBJS) $(ASMOBJS)
-all: libasmrun.lib
+all: libasmrun.$(A)
+
+libasmrun.$(A): $(OBJS)
+ $(call MKLIB,libasmrun.$(A), $(OBJS))
-libasmrun.lib: $(OBJS)
- rm -f libasmrun.lib
- $(MKLIB)libasmrun.lib $(OBJS)
+i386nt.obj: i386nt.asm
+ ml /nologo /coff /Cp /c /Foi386nt.obj i386nt.asm
+
+i386.o: i386.S
+ gcc -c -DSYS_$(SYSTEM) i386.S
install:
- cp libasmrun.lib $(LIBDIR)
-
-main.c: ../byterun/main.c
- cp ../byterun/main.c main.c
-misc.c: ../byterun/misc.c
- cp ../byterun/misc.c misc.c
-freelist.c: ../byterun/freelist.c
- cp ../byterun/freelist.c freelist.c
-major_gc.c: ../byterun/major_gc.c
- cp ../byterun/major_gc.c major_gc.c
-minor_gc.c: ../byterun/minor_gc.c
- cp ../byterun/minor_gc.c minor_gc.c
-memory.c: ../byterun/memory.c
- cp ../byterun/memory.c memory.c
-alloc.c: ../byterun/alloc.c
- cp ../byterun/alloc.c alloc.c
-array.c: ../byterun/array.c
- cp ../byterun/array.c array.c
-compare.c: ../byterun/compare.c
- cp ../byterun/compare.c compare.c
-ints.c: ../byterun/ints.c
- cp ../byterun/ints.c ints.c
-floats.c: ../byterun/floats.c
- cp ../byterun/floats.c floats.c
-str.c: ../byterun/str.c
- cp ../byterun/str.c str.c
-io.c: ../byterun/io.c
- cp ../byterun/io.c io.c
-extern.c: ../byterun/extern.c
- cp ../byterun/extern.c extern.c
-intern.c: ../byterun/intern.c
- cp ../byterun/intern.c intern.c
-hash.c: ../byterun/hash.c
- cp ../byterun/hash.c hash.c
-sys.c: ../byterun/sys.c
- cp ../byterun/sys.c sys.c
-parsing.c: ../byterun/parsing.c
- cp ../byterun/parsing.c parsing.c
-gc_ctrl.c: ../byterun/gc_ctrl.c
- cp ../byterun/gc_ctrl.c gc_ctrl.c
-terminfo.c: ../byterun/terminfo.c
- cp ../byterun/terminfo.c terminfo.c
-md5.c: ../byterun/md5.c
- cp ../byterun/md5.c md5.c
-obj.c: ../byterun/obj.c
- cp ../byterun/obj.c obj.c
-lexing.c: ../byterun/lexing.c
- cp ../byterun/lexing.c lexing.c
-printexc.c: ../byterun/printexc.c
- cp ../byterun/printexc.c printexc.c
-callback.c: ../byterun/callback.c
- cp ../byterun/callback.c callback.c
-weak.c: ../byterun/weak.c
- cp ../byterun/weak.c weak.c
-compact.c: ../byterun/compact.c
- cp ../byterun/compact.c compact.c
-finalise.c: ../byterun/finalise.c
- cp ../byterun/finalise.c finalise.c
-custom.c: ../byterun/custom.c
- cp ../byterun/custom.c custom.c
-meta.c: ../byterun/meta.c
- cp ../byterun/meta.c meta.c
-globroots.c: ../byterun/globroots.c
- cp ../byterun/globroots.c globroots.c
+ cp libasmrun.$(A) $(LIBDIR)
-LINKEDFILES=misc.c freelist.c major_gc.c minor_gc.c memory.c alloc.c array.c \
- compare.c ints.c floats.c str.c io.c extern.c intern.c hash.c sys.c \
- parsing.c gc_ctrl.c terminfo.c md5.c obj.c lexing.c printexc.c callback.c \
- weak.c compact.c meta.c custom.c main.c globroots.c
+$(LINKEDFILES): %.c: ../byterun/%.c
+ cp ../byterun/$*.c $*.c
-# Need special compilation rule so as not to do -I..\byterun
-win32.obj: ../byterun/win32.c
- $(CC) /c $(NATIVECCCOMPOPTS) -DNATIVE_CODE ..\byterun\win32.c
+# Need special compilation rule so as not to do -I../byterun
+win32.$(O): ../byterun/win32.c
+ $(CC) -c $(NATIVECCCOMPOPTS) -DNATIVE_CODE ../byterun/win32.c
clean::
rm -f $(LINKEDFILES)
clean::
- rm -f *.obj *.lib *~
+ rm -f *.$(O) *.$(A) *~
-depend:
- sed -e "s/\.o/.obj/g" .depend > .depend.nt
+.depend.nt:
+ sed -e 's/\.o/.$(O)/g' .depend > .depend.nt
-!include .depend.nt
+include .depend.nt
diff --git a/asmrun/i386.S b/asmrun/i386.S
index 35aa2cc3c..f89ed3742 100644
--- a/asmrun/i386.S
+++ b/asmrun/i386.S
@@ -35,7 +35,8 @@
#endif
#if defined(SYS_linux_elf) || defined(SYS_bsd_elf) \
- || defined(SYS_solaris) || defined(SYS_beos) || defined(SYS_cygwin)
+ || defined(SYS_solaris) || defined(SYS_beos) || defined(SYS_cygwin) \
+ || defined(SYS_mingw)
#define FUNCTION_ALIGN 4
#else
#define FUNCTION_ALIGN 2
diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml
index 6ac77a49b..6492bf8a3 100644
--- a/bytecomp/bytelink.ml
+++ b/bytecomp/bytelink.ml
@@ -425,8 +425,8 @@ let rec extract suffix l =
;;
let build_custom_runtime prim_name exec_name =
- match Sys.os_type with
- "Unix" | "Cygwin" ->
+ match Config.ccomp_type with
+ "cc" ->
Ccomp.command
(Printf.sprintf
"%s -o %s %s %s %s %s %s -lcamlrun %s"
@@ -440,7 +440,7 @@ let build_custom_runtime prim_name exec_name =
!load_path))
(Ccomp.quote_files (List.rev !Clflags.ccobjs))
Config.bytecomp_c_libraries)
- | "Win32" ->
+ | "msvc" ->
let retcode =
Ccomp.command
(Printf.sprintf
@@ -459,7 +459,7 @@ let build_custom_runtime prim_name exec_name =
remove_file
(Filename.chop_suffix (Filename.basename prim_name) ".c" ^ ".obj");
retcode
- | "MacOS" ->
+ | "mrc" ->
let cppc = "mrc"
and libsppc = "\"{sharedlibraries}MathLib\" \
\"{ppclibraries}PPCCRuntime.o\" \
diff --git a/byterun/.depend.nt b/byterun/.depend.nt
deleted file mode 100644
index d5304419b..000000000
--- a/byterun/.depend.nt
+++ /dev/null
@@ -1,498 +0,0 @@
-alloc.dobj: alloc.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h major_gc.h freelist.h memory.h gc.h minor_gc.h \
- stacks.h
-array.dobj: array.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-backtrace.dobj: backtrace.c config.h ../config/m.h ../config/s.h \
- mlvalues.h misc.h alloc.h io.h instruct.h intext.h fix_code.h exec.h \
- startup.h stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
- sys.h backtrace.h
-callback.dobj: callback.c callback.h mlvalues.h config.h ../config/m.h \
- ../config/s.h misc.h fail.h memory.h gc.h major_gc.h freelist.h \
- minor_gc.h interp.h instruct.h fix_code.h stacks.h
-compact.dobj: compact.c config.h ../config/m.h ../config/s.h finalise.h \
- roots.h misc.h memory.h gc.h mlvalues.h major_gc.h freelist.h \
- minor_gc.h gc_ctrl.h weak.h
-compare.dobj: compare.c custom.h mlvalues.h config.h ../config/m.h \
- ../config/s.h misc.h fail.h memory.h gc.h major_gc.h freelist.h \
- minor_gc.h
-custom.dobj: custom.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h fail.h memory.h gc.h major_gc.h freelist.h \
- minor_gc.h
-debugger.dobj: debugger.c config.h ../config/m.h ../config/s.h debugger.h \
- misc.h mlvalues.h fail.h fix_code.h instruct.h intext.h io.h stacks.h \
- memory.h gc.h major_gc.h freelist.h minor_gc.h sys.h
-dynlink.dobj: dynlink.c config.h ../config/m.h ../config/s.h alloc.h \
- misc.h mlvalues.h dynlink.h fail.h memory.h gc.h major_gc.h \
- freelist.h minor_gc.h osdeps.h prims.h
-extern.dobj: extern.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h memory.h \
- major_gc.h freelist.h minor_gc.h reverse.h
-fail.dobj: fail.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h io.h gc.h memory.h major_gc.h freelist.h minor_gc.h \
- printexc.h signals.h stacks.h
-finalise.dobj: finalise.c callback.h mlvalues.h config.h ../config/m.h \
- ../config/s.h misc.h fail.h roots.h memory.h gc.h major_gc.h \
- freelist.h minor_gc.h signals.h
-fix_code.dobj: fix_code.c config.h ../config/m.h ../config/s.h debugger.h \
- misc.h mlvalues.h fix_code.h instruct.h md5.h io.h memory.h gc.h \
- major_gc.h freelist.h minor_gc.h reverse.h
-floats.dobj: floats.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
- reverse.h stacks.h
-freelist.dobj: freelist.c config.h ../config/m.h ../config/s.h freelist.h \
- misc.h mlvalues.h gc.h gc_ctrl.h major_gc.h
-gc_ctrl.dobj: gc_ctrl.c alloc.h misc.h config.h ../config/m.h \
- ../config/s.h mlvalues.h compact.h custom.h finalise.h roots.h \
- memory.h gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h stacks.h
-globroots.dobj: globroots.c memory.h config.h ../config/m.h ../config/s.h \
- gc.h mlvalues.h misc.h major_gc.h freelist.h minor_gc.h globroots.h
-hash.dobj: hash.c mlvalues.h config.h ../config/m.h ../config/s.h misc.h \
- custom.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-instrtrace.dobj: instrtrace.c
-intern.dobj: intern.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h memory.h \
- major_gc.h freelist.h minor_gc.h reverse.h
-interp.dobj: interp.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h backtrace.h callback.h debugger.h fail.h fix_code.h \
- instrtrace.h instruct.h interp.h major_gc.h freelist.h memory.h gc.h \
- minor_gc.h prims.h signals.h stacks.h jumptbl.h
-ints.dobj: ints.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h fail.h intext.h io.h fix_code.h memory.h gc.h \
- major_gc.h freelist.h minor_gc.h
-io.dobj: io.c config.h ../config/m.h ../config/s.h alloc.h misc.h \
- mlvalues.h custom.h fail.h io.h memory.h gc.h major_gc.h freelist.h \
- minor_gc.h signals.h sys.h
-lexing.dobj: lexing.c fail.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-macintosh.dobj: macintosh.c misc.h config.h ../config/m.h ../config/s.h \
- rotatecursor.h
-main.dobj: main.c misc.h config.h ../config/m.h ../config/s.h mlvalues.h \
- sys.h
-major_gc.dobj: major_gc.c compact.h config.h ../config/m.h ../config/s.h \
- misc.h custom.h mlvalues.h fail.h finalise.h roots.h memory.h gc.h \
- major_gc.h freelist.h minor_gc.h gc_ctrl.h weak.h
-md5.dobj: md5.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h md5.h io.h reverse.h
-memory.dobj: memory.c fail.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h freelist.h gc.h gc_ctrl.h major_gc.h memory.h minor_gc.h \
- signals.h
-meta.dobj: meta.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h fix_code.h interp.h major_gc.h freelist.h memory.h \
- gc.h minor_gc.h prims.h stacks.h
-minor_gc.dobj: minor_gc.c config.h ../config/m.h ../config/s.h fail.h \
- misc.h mlvalues.h finalise.h roots.h memory.h gc.h major_gc.h \
- freelist.h minor_gc.h gc_ctrl.h signals.h
-misc.dobj: misc.c config.h ../config/m.h ../config/s.h misc.h memory.h \
- gc.h mlvalues.h major_gc.h freelist.h minor_gc.h
-mpwtool.dobj: mpwtool.c
-obj.dobj: obj.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h gc.h major_gc.h freelist.h memory.h minor_gc.h \
- prims.h
-parsing.dobj: parsing.c config.h ../config/m.h ../config/s.h mlvalues.h \
- misc.h memory.h gc.h major_gc.h freelist.h minor_gc.h alloc.h
-prims.dobj: prims.c mlvalues.h config.h ../config/m.h ../config/s.h \
- misc.h prims.h
-printexc.dobj: printexc.c backtrace.h mlvalues.h config.h ../config/m.h \
- ../config/s.h misc.h debugger.h fail.h printexc.h
-roots.dobj: roots.c finalise.h roots.h misc.h config.h ../config/m.h \
- ../config/s.h memory.h gc.h mlvalues.h major_gc.h freelist.h \
- minor_gc.h globroots.h stacks.h
-rotatecursor.dobj: rotatecursor.c rotatecursor.h
-signals.dobj: signals.c alloc.h misc.h config.h ../config/m.h \
- ../config/s.h mlvalues.h callback.h fail.h memory.h gc.h major_gc.h \
- freelist.h minor_gc.h roots.h signals.h sys.h
-stacks.dobj: stacks.c config.h ../config/m.h ../config/s.h fail.h misc.h \
- mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-startup.dobj: startup.c config.h ../config/m.h ../config/s.h alloc.h \
- misc.h mlvalues.h backtrace.h callback.h custom.h debugger.h \
- dynlink.h exec.h fail.h fix_code.h gc_ctrl.h instrtrace.h interp.h \
- intext.h io.h memory.h gc.h major_gc.h freelist.h minor_gc.h osdeps.h \
- prims.h printexc.h reverse.h signals.h stacks.h sys.h startup.h
-str.dobj: str.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h
-sys.dobj: sys.c config.h ../config/m.h ../config/s.h alloc.h misc.h \
- mlvalues.h debugger.h fail.h instruct.h signals.h stacks.h memory.h \
- gc.h major_gc.h freelist.h minor_gc.h sys.h
-terminfo.dobj: terminfo.c config.h ../config/m.h ../config/s.h alloc.h \
- misc.h mlvalues.h fail.h io.h
-unix.dobj: unix.c config.h ../config/m.h ../config/s.h memory.h gc.h \
- mlvalues.h misc.h major_gc.h freelist.h minor_gc.h osdeps.h
-weak.dobj: weak.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-win32.dobj: win32.c memory.h config.h ../config/m.h ../config/s.h gc.h \
- mlvalues.h misc.h major_gc.h freelist.h minor_gc.h osdeps.h signals.h
-alloc.d.dobj: alloc.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h major_gc.h freelist.h memory.h gc.h minor_gc.h \
- stacks.h
-array.d.dobj: array.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-backtrace.d.dobj: backtrace.c config.h ../config/m.h ../config/s.h \
- mlvalues.h misc.h alloc.h io.h instruct.h intext.h fix_code.h exec.h \
- startup.h stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
- sys.h backtrace.h
-callback.d.dobj: callback.c callback.h mlvalues.h config.h ../config/m.h \
- ../config/s.h misc.h fail.h memory.h gc.h major_gc.h freelist.h \
- minor_gc.h interp.h instruct.h fix_code.h stacks.h
-compact.d.dobj: compact.c config.h ../config/m.h ../config/s.h finalise.h \
- roots.h misc.h memory.h gc.h mlvalues.h major_gc.h freelist.h \
- minor_gc.h gc_ctrl.h weak.h
-compare.d.dobj: compare.c custom.h mlvalues.h config.h ../config/m.h \
- ../config/s.h misc.h fail.h memory.h gc.h major_gc.h freelist.h \
- minor_gc.h
-custom.d.dobj: custom.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h fail.h memory.h gc.h major_gc.h freelist.h \
- minor_gc.h
-debugger.d.dobj: debugger.c config.h ../config/m.h ../config/s.h debugger.h \
- misc.h mlvalues.h fail.h fix_code.h instruct.h intext.h io.h stacks.h \
- memory.h gc.h major_gc.h freelist.h minor_gc.h sys.h
-dynlink.d.dobj: dynlink.c config.h ../config/m.h ../config/s.h alloc.h \
- misc.h mlvalues.h dynlink.h fail.h memory.h gc.h major_gc.h \
- freelist.h minor_gc.h osdeps.h prims.h
-extern.d.dobj: extern.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h memory.h \
- major_gc.h freelist.h minor_gc.h reverse.h
-fail.d.dobj: fail.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h io.h gc.h memory.h major_gc.h freelist.h minor_gc.h \
- printexc.h signals.h stacks.h
-finalise.d.dobj: finalise.c callback.h mlvalues.h config.h ../config/m.h \
- ../config/s.h misc.h fail.h roots.h memory.h gc.h major_gc.h \
- freelist.h minor_gc.h signals.h
-fix_code.d.dobj: fix_code.c config.h ../config/m.h ../config/s.h debugger.h \
- misc.h mlvalues.h fix_code.h instruct.h md5.h io.h memory.h gc.h \
- major_gc.h freelist.h minor_gc.h reverse.h
-floats.d.dobj: floats.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
- reverse.h stacks.h
-freelist.d.dobj: freelist.c config.h ../config/m.h ../config/s.h freelist.h \
- misc.h mlvalues.h gc.h gc_ctrl.h major_gc.h
-gc_ctrl.d.dobj: gc_ctrl.c alloc.h misc.h config.h ../config/m.h \
- ../config/s.h mlvalues.h compact.h custom.h finalise.h roots.h \
- memory.h gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h stacks.h
-globroots.d.dobj: globroots.c memory.h config.h ../config/m.h ../config/s.h \
- gc.h mlvalues.h misc.h major_gc.h freelist.h minor_gc.h globroots.h
-hash.d.dobj: hash.c mlvalues.h config.h ../config/m.h ../config/s.h misc.h \
- custom.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-instrtrace.d.dobj: instrtrace.c instruct.h misc.h config.h ../config/m.h \
- ../config/s.h mlvalues.h opnames.h
-intern.d.dobj: intern.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h memory.h \
- major_gc.h freelist.h minor_gc.h reverse.h
-interp.d.dobj: interp.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h backtrace.h callback.h debugger.h fail.h fix_code.h \
- instrtrace.h instruct.h interp.h major_gc.h freelist.h memory.h gc.h \
- minor_gc.h prims.h signals.h stacks.h
-ints.d.dobj: ints.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h fail.h intext.h io.h fix_code.h memory.h gc.h \
- major_gc.h freelist.h minor_gc.h
-io.d.dobj: io.c config.h ../config/m.h ../config/s.h alloc.h misc.h \
- mlvalues.h custom.h fail.h io.h memory.h gc.h major_gc.h freelist.h \
- minor_gc.h signals.h sys.h
-lexing.d.dobj: lexing.c fail.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-macintosh.d.dobj: macintosh.c misc.h config.h ../config/m.h ../config/s.h \
- rotatecursor.h
-main.d.dobj: main.c misc.h config.h ../config/m.h ../config/s.h mlvalues.h \
- sys.h
-major_gc.d.dobj: major_gc.c compact.h config.h ../config/m.h ../config/s.h \
- misc.h custom.h mlvalues.h fail.h finalise.h roots.h memory.h gc.h \
- major_gc.h freelist.h minor_gc.h gc_ctrl.h weak.h
-md5.d.dobj: md5.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h md5.h io.h reverse.h
-memory.d.dobj: memory.c fail.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h freelist.h gc.h gc_ctrl.h major_gc.h memory.h minor_gc.h \
- signals.h
-meta.d.dobj: meta.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h fix_code.h interp.h major_gc.h freelist.h memory.h \
- gc.h minor_gc.h prims.h stacks.h
-minor_gc.d.dobj: minor_gc.c config.h ../config/m.h ../config/s.h fail.h \
- misc.h mlvalues.h finalise.h roots.h memory.h gc.h major_gc.h \
- freelist.h minor_gc.h gc_ctrl.h signals.h
-misc.d.dobj: misc.c config.h ../config/m.h ../config/s.h misc.h memory.h \
- gc.h mlvalues.h major_gc.h freelist.h minor_gc.h
-mpwtool.d.dobj: mpwtool.c
-obj.d.dobj: obj.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h gc.h major_gc.h freelist.h memory.h minor_gc.h \
- prims.h
-parsing.d.dobj: parsing.c config.h ../config/m.h ../config/s.h mlvalues.h \
- misc.h memory.h gc.h major_gc.h freelist.h minor_gc.h alloc.h
-prims.d.dobj: prims.c mlvalues.h config.h ../config/m.h ../config/s.h \
- misc.h prims.h
-printexc.d.dobj: printexc.c backtrace.h mlvalues.h config.h ../config/m.h \
- ../config/s.h misc.h debugger.h fail.h printexc.h
-roots.d.dobj: roots.c finalise.h roots.h misc.h config.h ../config/m.h \
- ../config/s.h memory.h gc.h mlvalues.h major_gc.h freelist.h \
- minor_gc.h globroots.h stacks.h
-rotatecursor.d.dobj: rotatecursor.c rotatecursor.h
-signals.d.dobj: signals.c alloc.h misc.h config.h ../config/m.h \
- ../config/s.h mlvalues.h callback.h fail.h memory.h gc.h major_gc.h \
- freelist.h minor_gc.h roots.h signals.h sys.h
-stacks.d.dobj: stacks.c config.h ../config/m.h ../config/s.h fail.h misc.h \
- mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-startup.d.dobj: startup.c config.h ../config/m.h ../config/s.h alloc.h \
- misc.h mlvalues.h backtrace.h callback.h custom.h debugger.h \
- dynlink.h exec.h fail.h fix_code.h gc_ctrl.h instrtrace.h interp.h \
- intext.h io.h memory.h gc.h major_gc.h freelist.h minor_gc.h osdeps.h \
- prims.h printexc.h reverse.h signals.h stacks.h sys.h startup.h
-str.d.dobj: str.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h
-sys.d.dobj: sys.c config.h ../config/m.h ../config/s.h alloc.h misc.h \
- mlvalues.h debugger.h fail.h instruct.h signals.h stacks.h memory.h \
- gc.h major_gc.h freelist.h minor_gc.h sys.h
-terminfo.d.dobj: terminfo.c config.h ../config/m.h ../config/s.h alloc.h \
- misc.h mlvalues.h fail.h io.h
-unix.d.dobj: unix.c config.h ../config/m.h ../config/s.h memory.h gc.h \
- mlvalues.h misc.h major_gc.h freelist.h minor_gc.h osdeps.h
-weak.d.dobj: weak.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-win32.d.dobj: win32.c memory.h config.h ../config/m.h ../config/s.h gc.h \
- mlvalues.h misc.h major_gc.h freelist.h minor_gc.h osdeps.h signals.h
-alloc.sobj: alloc.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h major_gc.h freelist.h memory.h gc.h minor_gc.h \
- stacks.h
-array.sobj: array.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-backtrace.sobj: backtrace.c config.h ../config/m.h ../config/s.h \
- mlvalues.h misc.h alloc.h io.h instruct.h intext.h fix_code.h exec.h \
- startup.h stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
- sys.h backtrace.h
-callback.sobj: callback.c callback.h mlvalues.h config.h ../config/m.h \
- ../config/s.h misc.h fail.h memory.h gc.h major_gc.h freelist.h \
- minor_gc.h interp.h instruct.h fix_code.h stacks.h
-compact.sobj: compact.c config.h ../config/m.h ../config/s.h finalise.h \
- roots.h misc.h memory.h gc.h mlvalues.h major_gc.h freelist.h \
- minor_gc.h gc_ctrl.h weak.h
-compare.sobj: compare.c custom.h mlvalues.h config.h ../config/m.h \
- ../config/s.h misc.h fail.h memory.h gc.h major_gc.h freelist.h \
- minor_gc.h
-custom.sobj: custom.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h fail.h memory.h gc.h major_gc.h freelist.h \
- minor_gc.h
-debugger.sobj: debugger.c config.h ../config/m.h ../config/s.h debugger.h \
- misc.h mlvalues.h fail.h fix_code.h instruct.h intext.h io.h stacks.h \
- memory.h gc.h major_gc.h freelist.h minor_gc.h sys.h
-dynlink.sobj: dynlink.c config.h ../config/m.h ../config/s.h alloc.h \
- misc.h mlvalues.h dynlink.h fail.h memory.h gc.h major_gc.h \
- freelist.h minor_gc.h osdeps.h prims.h
-extern.sobj: extern.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h memory.h \
- major_gc.h freelist.h minor_gc.h reverse.h
-fail.sobj: fail.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h io.h gc.h memory.h major_gc.h freelist.h minor_gc.h \
- printexc.h signals.h stacks.h
-finalise.sobj: finalise.c callback.h mlvalues.h config.h ../config/m.h \
- ../config/s.h misc.h fail.h roots.h memory.h gc.h major_gc.h \
- freelist.h minor_gc.h signals.h
-fix_code.sobj: fix_code.c config.h ../config/m.h ../config/s.h debugger.h \
- misc.h mlvalues.h fix_code.h instruct.h md5.h io.h memory.h gc.h \
- major_gc.h freelist.h minor_gc.h reverse.h
-floats.sobj: floats.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
- reverse.h stacks.h
-freelist.sobj: freelist.c config.h ../config/m.h ../config/s.h freelist.h \
- misc.h mlvalues.h gc.h gc_ctrl.h major_gc.h
-gc_ctrl.sobj: gc_ctrl.c alloc.h misc.h config.h ../config/m.h \
- ../config/s.h mlvalues.h compact.h custom.h finalise.h roots.h \
- memory.h gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h stacks.h
-globroots.sobj: globroots.c memory.h config.h ../config/m.h ../config/s.h \
- gc.h mlvalues.h misc.h major_gc.h freelist.h minor_gc.h globroots.h
-hash.sobj: hash.c mlvalues.h config.h ../config/m.h ../config/s.h misc.h \
- custom.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-instrtrace.sobj: instrtrace.c
-intern.sobj: intern.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h memory.h \
- major_gc.h freelist.h minor_gc.h reverse.h
-interp.sobj: interp.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h backtrace.h callback.h debugger.h fail.h fix_code.h \
- instrtrace.h instruct.h interp.h major_gc.h freelist.h memory.h gc.h \
- minor_gc.h prims.h signals.h stacks.h jumptbl.h
-ints.sobj: ints.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h fail.h intext.h io.h fix_code.h memory.h gc.h \
- major_gc.h freelist.h minor_gc.h
-io.sobj: io.c config.h ../config/m.h ../config/s.h alloc.h misc.h \
- mlvalues.h custom.h fail.h io.h memory.h gc.h major_gc.h freelist.h \
- minor_gc.h signals.h sys.h
-lexing.sobj: lexing.c fail.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-macintosh.sobj: macintosh.c misc.h config.h ../config/m.h ../config/s.h \
- rotatecursor.h
-main.sobj: main.c misc.h config.h ../config/m.h ../config/s.h mlvalues.h \
- sys.h
-major_gc.sobj: major_gc.c compact.h config.h ../config/m.h ../config/s.h \
- misc.h custom.h mlvalues.h fail.h finalise.h roots.h memory.h gc.h \
- major_gc.h freelist.h minor_gc.h gc_ctrl.h weak.h
-md5.sobj: md5.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h md5.h io.h reverse.h
-memory.sobj: memory.c fail.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h freelist.h gc.h gc_ctrl.h major_gc.h memory.h minor_gc.h \
- signals.h
-meta.sobj: meta.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h fix_code.h interp.h major_gc.h freelist.h memory.h \
- gc.h minor_gc.h prims.h stacks.h
-minor_gc.sobj: minor_gc.c config.h ../config/m.h ../config/s.h fail.h \
- misc.h mlvalues.h finalise.h roots.h memory.h gc.h major_gc.h \
- freelist.h minor_gc.h gc_ctrl.h signals.h
-misc.sobj: misc.c config.h ../config/m.h ../config/s.h misc.h memory.h \
- gc.h mlvalues.h major_gc.h freelist.h minor_gc.h
-mpwtool.sobj: mpwtool.c
-obj.sobj: obj.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h gc.h major_gc.h freelist.h memory.h minor_gc.h \
- prims.h
-parsing.sobj: parsing.c config.h ../config/m.h ../config/s.h mlvalues.h \
- misc.h memory.h gc.h major_gc.h freelist.h minor_gc.h alloc.h
-prims.sobj: prims.c mlvalues.h config.h ../config/m.h ../config/s.h \
- misc.h prims.h
-printexc.sobj: printexc.c backtrace.h mlvalues.h config.h ../config/m.h \
- ../config/s.h misc.h debugger.h fail.h printexc.h
-roots.sobj: roots.c finalise.h roots.h misc.h config.h ../config/m.h \
- ../config/s.h memory.h gc.h mlvalues.h major_gc.h freelist.h \
- minor_gc.h globroots.h stacks.h
-rotatecursor.sobj: rotatecursor.c rotatecursor.h
-signals.sobj: signals.c alloc.h misc.h config.h ../config/m.h \
- ../config/s.h mlvalues.h callback.h fail.h memory.h gc.h major_gc.h \
- freelist.h minor_gc.h roots.h signals.h sys.h
-stacks.sobj: stacks.c config.h ../config/m.h ../config/s.h fail.h misc.h \
- mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-startup.sobj: startup.c config.h ../config/m.h ../config/s.h alloc.h \
- misc.h mlvalues.h backtrace.h callback.h custom.h debugger.h \
- dynlink.h exec.h fail.h fix_code.h gc_ctrl.h instrtrace.h interp.h \
- intext.h io.h memory.h gc.h major_gc.h freelist.h minor_gc.h osdeps.h \
- prims.h printexc.h reverse.h signals.h stacks.h sys.h startup.h
-str.sobj: str.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h
-sys.sobj: sys.c config.h ../config/m.h ../config/s.h alloc.h misc.h \
- mlvalues.h debugger.h fail.h instruct.h signals.h stacks.h memory.h \
- gc.h major_gc.h freelist.h minor_gc.h sys.h
-terminfo.sobj: terminfo.c config.h ../config/m.h ../config/s.h alloc.h \
- misc.h mlvalues.h fail.h io.h
-unix.sobj: unix.c config.h ../config/m.h ../config/s.h memory.h gc.h \
- mlvalues.h misc.h major_gc.h freelist.h minor_gc.h osdeps.h
-weak.sobj: weak.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-win32.sobj: win32.c memory.h config.h ../config/m.h ../config/s.h gc.h \
- mlvalues.h misc.h major_gc.h freelist.h minor_gc.h osdeps.h signals.h
-alloc.d.sobj: alloc.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h major_gc.h freelist.h memory.h gc.h minor_gc.h \
- stacks.h
-array.d.sobj: array.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-backtrace.d.sobj: backtrace.c config.h ../config/m.h ../config/s.h \
- mlvalues.h misc.h alloc.h io.h instruct.h intext.h fix_code.h exec.h \
- startup.h stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
- sys.h backtrace.h
-callback.d.sobj: callback.c callback.h mlvalues.h config.h ../config/m.h \
- ../config/s.h misc.h fail.h memory.h gc.h major_gc.h freelist.h \
- minor_gc.h interp.h instruct.h fix_code.h stacks.h
-compact.d.sobj: compact.c config.h ../config/m.h ../config/s.h finalise.h \
- roots.h misc.h memory.h gc.h mlvalues.h major_gc.h freelist.h \
- minor_gc.h gc_ctrl.h weak.h
-compare.d.sobj: compare.c custom.h mlvalues.h config.h ../config/m.h \
- ../config/s.h misc.h fail.h memory.h gc.h major_gc.h freelist.h \
- minor_gc.h
-custom.d.sobj: custom.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h fail.h memory.h gc.h major_gc.h freelist.h \
- minor_gc.h
-debugger.d.sobj: debugger.c config.h ../config/m.h ../config/s.h debugger.h \
- misc.h mlvalues.h fail.h fix_code.h instruct.h intext.h io.h stacks.h \
- memory.h gc.h major_gc.h freelist.h minor_gc.h sys.h
-dynlink.d.sobj: dynlink.c config.h ../config/m.h ../config/s.h alloc.h \
- misc.h mlvalues.h dynlink.h fail.h memory.h gc.h major_gc.h \
- freelist.h minor_gc.h osdeps.h prims.h
-extern.d.sobj: extern.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h memory.h \
- major_gc.h freelist.h minor_gc.h reverse.h
-fail.d.sobj: fail.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h io.h gc.h memory.h major_gc.h freelist.h minor_gc.h \
- printexc.h signals.h stacks.h
-finalise.d.sobj: finalise.c callback.h mlvalues.h config.h ../config/m.h \
- ../config/s.h misc.h fail.h roots.h memory.h gc.h major_gc.h \
- freelist.h minor_gc.h signals.h
-fix_code.d.sobj: fix_code.c config.h ../config/m.h ../config/s.h debugger.h \
- misc.h mlvalues.h fix_code.h instruct.h md5.h io.h memory.h gc.h \
- major_gc.h freelist.h minor_gc.h reverse.h
-floats.d.sobj: floats.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
- reverse.h stacks.h
-freelist.d.sobj: freelist.c config.h ../config/m.h ../config/s.h freelist.h \
- misc.h mlvalues.h gc.h gc_ctrl.h major_gc.h
-gc_ctrl.d.sobj: gc_ctrl.c alloc.h misc.h config.h ../config/m.h \
- ../config/s.h mlvalues.h compact.h custom.h finalise.h roots.h \
- memory.h gc.h major_gc.h freelist.h minor_gc.h gc_ctrl.h stacks.h
-globroots.d.sobj: globroots.c memory.h config.h ../config/m.h ../config/s.h \
- gc.h mlvalues.h misc.h major_gc.h freelist.h minor_gc.h globroots.h
-hash.d.sobj: hash.c mlvalues.h config.h ../config/m.h ../config/s.h misc.h \
- custom.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-instrtrace.d.sobj: instrtrace.c instruct.h misc.h config.h ../config/m.h \
- ../config/s.h mlvalues.h opnames.h
-intern.d.sobj: intern.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h memory.h \
- major_gc.h freelist.h minor_gc.h reverse.h
-interp.d.sobj: interp.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h backtrace.h callback.h debugger.h fail.h fix_code.h \
- instrtrace.h instruct.h interp.h major_gc.h freelist.h memory.h gc.h \
- minor_gc.h prims.h signals.h stacks.h
-ints.d.sobj: ints.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h custom.h fail.h intext.h io.h fix_code.h memory.h gc.h \
- major_gc.h freelist.h minor_gc.h
-io.d.sobj: io.c config.h ../config/m.h ../config/s.h alloc.h misc.h \
- mlvalues.h custom.h fail.h io.h memory.h gc.h major_gc.h freelist.h \
- minor_gc.h signals.h sys.h
-lexing.d.sobj: lexing.c fail.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-macintosh.d.sobj: macintosh.c misc.h config.h ../config/m.h ../config/s.h \
- rotatecursor.h
-main.d.sobj: main.c misc.h config.h ../config/m.h ../config/s.h mlvalues.h \
- sys.h
-major_gc.d.sobj: major_gc.c compact.h config.h ../config/m.h ../config/s.h \
- misc.h custom.h mlvalues.h fail.h finalise.h roots.h memory.h gc.h \
- major_gc.h freelist.h minor_gc.h gc_ctrl.h weak.h
-md5.d.sobj: md5.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h md5.h io.h reverse.h
-memory.d.sobj: memory.c fail.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h freelist.h gc.h gc_ctrl.h major_gc.h memory.h minor_gc.h \
- signals.h
-meta.d.sobj: meta.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h fix_code.h interp.h major_gc.h freelist.h memory.h \
- gc.h minor_gc.h prims.h stacks.h
-minor_gc.d.sobj: minor_gc.c config.h ../config/m.h ../config/s.h fail.h \
- misc.h mlvalues.h finalise.h roots.h memory.h gc.h major_gc.h \
- freelist.h minor_gc.h gc_ctrl.h signals.h
-misc.d.sobj: misc.c config.h ../config/m.h ../config/s.h misc.h memory.h \
- gc.h mlvalues.h major_gc.h freelist.h minor_gc.h
-mpwtool.d.sobj: mpwtool.c
-obj.d.sobj: obj.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h gc.h major_gc.h freelist.h memory.h minor_gc.h \
- prims.h
-parsing.d.sobj: parsing.c config.h ../config/m.h ../config/s.h mlvalues.h \
- misc.h memory.h gc.h major_gc.h freelist.h minor_gc.h alloc.h
-prims.d.sobj: prims.c mlvalues.h config.h ../config/m.h ../config/s.h \
- misc.h prims.h
-printexc.d.sobj: printexc.c backtrace.h mlvalues.h config.h ../config/m.h \
- ../config/s.h misc.h debugger.h fail.h printexc.h
-roots.d.sobj: roots.c finalise.h roots.h misc.h config.h ../config/m.h \
- ../config/s.h memory.h gc.h mlvalues.h major_gc.h freelist.h \
- minor_gc.h globroots.h stacks.h
-rotatecursor.d.sobj: rotatecursor.c rotatecursor.h
-signals.d.sobj: signals.c alloc.h misc.h config.h ../config/m.h \
- ../config/s.h mlvalues.h callback.h fail.h memory.h gc.h major_gc.h \
- freelist.h minor_gc.h roots.h signals.h sys.h
-stacks.d.sobj: stacks.c config.h ../config/m.h ../config/s.h fail.h misc.h \
- mlvalues.h stacks.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-startup.d.sobj: startup.c config.h ../config/m.h ../config/s.h alloc.h \
- misc.h mlvalues.h backtrace.h callback.h custom.h debugger.h \
- dynlink.h exec.h fail.h fix_code.h gc_ctrl.h instrtrace.h interp.h \
- intext.h io.h memory.h gc.h major_gc.h freelist.h minor_gc.h osdeps.h \
- prims.h printexc.h reverse.h signals.h stacks.h sys.h startup.h
-str.d.sobj: str.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h
-sys.d.sobj: sys.c config.h ../config/m.h ../config/s.h alloc.h misc.h \
- mlvalues.h debugger.h fail.h instruct.h signals.h stacks.h memory.h \
- gc.h major_gc.h freelist.h minor_gc.h sys.h
-terminfo.d.sobj: terminfo.c config.h ../config/m.h ../config/s.h alloc.h \
- misc.h mlvalues.h fail.h io.h
-unix.d.sobj: unix.c config.h ../config/m.h ../config/s.h memory.h gc.h \
- mlvalues.h misc.h major_gc.h freelist.h minor_gc.h osdeps.h
-weak.d.sobj: weak.c alloc.h misc.h config.h ../config/m.h ../config/s.h \
- mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h minor_gc.h
-win32.d.sobj: win32.c memory.h config.h ../config/m.h ../config/s.h gc.h \
- mlvalues.h misc.h major_gc.h freelist.h minor_gc.h osdeps.h signals.h
diff --git a/byterun/Makefile.nt b/byterun/Makefile.nt
index 159d1b3c2..c00dc47eb 100644
--- a/byterun/Makefile.nt
+++ b/byterun/Makefile.nt
@@ -13,18 +13,21 @@
# $Id$
-!include ..\config\Makefile.nt
+include ../config/Makefile
CC=$(BYTECC)
-CFLAGS=-DIN_OCAMLRUN -DOCAML_STDLIB_DIR="\"$(LIBDIR:\=\\)\""
+CFLAGS=-DIN_OCAMLRUN -DOCAML_STDLIB_DIR='"$(LIBDIR)"'
-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 \
- meta.obj parsing.obj gc_ctrl.obj terminfo.obj md5.obj obj.obj lexing.obj \
- win32.obj printexc.obj callback.obj debugger.obj weak.obj compact.obj \
- finalise.obj custom.obj backtrace.obj globroots.obj dynlink.obj
+COMMONOBJS=interp.o misc.o stacks.o fix_code.o startup.o \
+ fail.o signals.o freelist.o major_gc.o minor_gc.o \
+ memory.o alloc.o roots.o compare.o ints.o floats.o \
+ str.o array.o io.o extern.o intern.o hash.o sys.o \
+ meta.o parsing.o gc_ctrl.o terminfo.o md5.o obj.o lexing.o \
+ win32.o printexc.o callback.o debugger.o weak.o compact.o \
+ finalise.o custom.o backtrace.o globroots.o dynlink.o
+
+DOBJS=$(COMMONOBJS:.o=.$(DO)) prims.$(DO)
+SOBJS=$(COMMONOBJS:.o=.$(SO)) main.$(SO)
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 \
@@ -33,31 +36,27 @@ PRIMS=alloc.c array.c compare.c extern.c floats.c gc_ctrl.c hash.c \
PUBLIC_INCLUDES=mlvalues.h alloc.h misc.h callback.h fail.h custom.h intext.h
-all: ocamlrun.exe libcamlrun.lib
- if not exist ..\stdlib\caml mkdir ..\stdlib\caml
- cp $(PUBLIC_INCLUDES) ..\stdlib\caml
- sed -e "/#include .*\/m.h/r ..\config\m.h" \
- -e "/#include .*\/s.h/r ..\config\s.h" \
- -e "/#include /d" config.h > ..\stdlib\caml\config.h
- sed -e "/#include .*gc\.h/d" \
- -e "/#define Alloc_small/,/^}/d" \
- -e "/Modify/,/^}/d" memory.h > ..\stdlib\caml\memory.h
+all: ocamlrun.exe libcamlrun.$(A)
+
+ocamlrun.exe: ocamlrun.dll main.$(DO)
+ $(CC) -o ocamlrun.exe main.$(DO) ocamlrun.$(A)
-ocamlrun.exe: $(OBJS:.obj=.dobj) prims.dobj
- link /nologo /out:ocamlrun.exe $(OBJS:.obj=.dobj) prims.dobj $(BYTECCLIBS)
+ocamlrun.dll: $(DOBJS)
+ $(call MKDLL,ocamlrun.dll,ocamlrun.$(A),$(DOBJS) $(BYTECCLIBS))
-libcamlrun.lib: $(OBJS:.obj=.sobj)
- $(MKLIB)libcamlrun.lib $(OBJS:.obj=.sobj)
+libcamlrun.$(A): $(SOBJS)
+ $(call MKLIB,libcamlrun.$(A),$(SOBJS))
install:
- cp ocamlrun.exe $(BINDIR)\ocamlrun.exe
- cp ocamlrun.lib $(LIBDIR)\ocamlrun.lib
- cp libcamlrun.lib $(LIBDIR)\libcamlrun.lib
- if not exist $(LIBDIR)\caml mkdir $(LIBDIR)\caml
- for %i in ($(PUBLIC_INCLUDES)) do sed -f ../tools/cleanup-header %i > $(LIBDIR)\caml\%i
+ cp ocamlrun.exe $(BINDIR)/ocamlrun.exe
+ cp ocamlrun.dll $(BINDIR)/ocamlrun.dll
+ cp ocamlrun.$(A) $(LIBDIR)/ocamlrun.$(A)
+ cp libcamlrun.$(A) $(LIBDIR)/libcamlrun.$(A)
+ test -d $(LIBDIR)/caml || mkdir -p $(LIBDIR)/caml
+ for i in $(PUBLIC_INCLUDES); do sed -f ../tools/cleanup-header $$i > $(LIBDIR)/caml/$$i; done
clean:
- rm -f *.exe *.dobj *.sobj *.lib
+ rm -f *.exe *.dll *.$(O) *.$(A)
rm -f primitives prims.c opnames.h jumptbl.h
primitives : $(PRIMS)
@@ -65,15 +64,15 @@ primitives : $(PRIMS)
$(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 builtin_cprim[] = { >> prims.c
- sed -e "s/.*/ &,/" primitives >> prims.c
- echo 0 }; >> prims.c
- echo char * names_of_builtin_cprim[] = { >> prims.c
- sed -e "s/.*/ \"^&\",/" primitives >> prims.c
- echo 0 }; >> prims.c
+ (echo '#include "mlvalues.h"'; \
+ echo '#include "prims.h"'; \
+ sed -e 's/.*/extern value &();/' primitives; \
+ echo 'c_primitive builtin_cprim[] = {'; \
+ sed -e 's/.*/ &,/' primitives; \
+ echo ' 0 };'; \
+ echo 'char * names_of_builtin_cprim[] = {'; \
+ sed -e 's/.*/ "&",/' primitives; \
+ echo ' 0 };') > prims.c
opnames.h : instruct.h
sed -e "/\/\*/d" \
@@ -86,17 +85,20 @@ jumptbl.h : instruct.h
sed -n -e "/^ /s/ \([A-Z]\)/ \&\&lbl_\1/gp" \
-e "/^}/q" instruct.h > jumptbl.h
-.SUFFIXES: .dobj .sobj
+main.$(DO): main.c
+ $(CC) $(DLLCCCOMPOPTS) -c main.c
+ mv main.$(O) main.$(DO)
+
+.SUFFIXES: .$(DO) .$(SO)
-.c.dobj:
+.c.$(DO):
$(CC) $(CFLAGS) $(DLLCCCOMPOPTS) -c $<
- mv $*.obj $*.dobj
-.c.sobj:
+ mv $*.$(O) $*.$(DO)
+.c.$(SO):
$(CC) $(CFLAGS) $(BYTECCCOMPOPTS) -c $<
- mv $*.obj $*.sobj
+ mv $*.$(O) $*.$(SO)
-depend:
- sed -e "s/\.o/.dobj/g" .depend > .depend.nt
- sed -e "s/\.o/.sobj/g" .depend >> .depend.nt
+.depend.nt:
+ sed -e '/\.d\.o/q' -e 's/^\(.*\)\.o:/\1.$$(DO) \1.$$(SO):/' .depend > .depend.nt
-!include .depend.nt
+include .depend.nt
diff --git a/byterun/compare.c b/byterun/compare.c
index 720940fbc..fa4b092df 100644
--- a/byterun/compare.c
+++ b/byterun/compare.c
@@ -163,7 +163,10 @@ static long compare_val(value v1, value v2)
break;
}
case Custom_tag: {
- int res = Custom_ops_val(v1)->compare(v1, v2);
+ int res;
+ int (*compare)(value v1, value v2) = Custom_ops_val(v1)->compare;
+ if (compare == NULL) failwith("equal: abstract value");
+ res = Custom_ops_val(v1)->compare(v1, v2);
if (res != 0) return res;
break;
}
diff --git a/byterun/custom.c b/byterun/custom.c
index 6bede95a6..f90dde908 100644
--- a/byterun/custom.c
+++ b/byterun/custom.c
@@ -42,18 +42,6 @@ CAMLextern value alloc_custom(struct custom_operations * ops,
return result;
}
-CAMLextern int custom_compare_default(value v1, value v2)
-{
- failwith("equal: abstract value");
- return 0;
-}
-
-CAMLextern void custom_serialize_default(value v, unsigned long * wsize_32,
- unsigned long * wsize_64)
-{
- failwith("output_value: abstract value");
-}
-
struct custom_operations_list {
struct custom_operations * ops;
struct custom_operations_list * next;
diff --git a/byterun/custom.h b/byterun/custom.h
index ca3861f0a..f2fbe1b42 100644
--- a/byterun/custom.h
+++ b/byterun/custom.h
@@ -31,10 +31,9 @@ struct custom_operations {
};
#define custom_finalize_default NULL
-CAMLextern int custom_compare_default(value v1, value v2);
+#define custom_compare_default NULL
#define custom_hash_default NULL
-CAMLextern void custom_serialize_default(value v, unsigned long * wsize_32,
- unsigned long * wsize_64);
+#define custom_serialize_default NULL
#define custom_deserialize_default NULL
#define Custom_ops_val(v) (*((struct custom_operations **) (v)))
diff --git a/byterun/extern.c b/byterun/extern.c
index 0d6c33a08..9298c8a40 100644
--- a/byterun/extern.c
+++ b/byterun/extern.c
@@ -334,6 +334,10 @@ static void extern_rec(value v)
case Custom_tag: {
unsigned long sz_32, sz_64;
char * ident = Custom_ops_val(v)->identifier;
+ void (*serialize)(value v, unsigned long * wsize_32,
+ unsigned long * wsize_64)
+ = Custom_ops_val(v)->serialize;
+ if (serialize == NULL) failwith("output_value: abstract value");
Write(CODE_CUSTOM);
writeblock(ident, strlen(ident) + 1);
Custom_ops_val(v)->serialize(v, &sz_32, &sz_64);
diff --git a/byterun/main.c b/byterun/main.c
index 9afd3f2be..4c7a19159 100644
--- a/byterun/main.c
+++ b/byterun/main.c
@@ -20,10 +20,10 @@
#include "mlvalues.h"
#include "sys.h"
-extern void caml_main (char **);
+CAMLextern void caml_main (char **);
#ifdef _WIN32
-extern void expand_command_line (int *, char ***);
+CAMLextern void expand_command_line (int *, char ***);
#endif
#if macintosh
diff --git a/byterun/win32.c b/byterun/win32.c
index 3320a4712..47445027a 100644
--- a/byterun/win32.c
+++ b/byterun/win32.c
@@ -306,6 +306,12 @@ CAMLexport void expand_command_line(int * argcp, char *** argvp)
/* Wrapper around "system" for Win32. Create a diversion file if
command line is too long. */
+#ifdef __MINGW32__
+int win32_system(char * cmdline)
+{
+ return system(cmdline);
+}
+#else
int win32_system(char * cmdline)
{
#define MAX_CMD_LENGTH 256
@@ -342,6 +348,7 @@ int win32_system(char * cmdline)
return retcode;
}
}
+#endif
/* Wrapper around "getenv" for Win32. Look up resources if environment
variable is not set. Notice that the result is a pointer to static
diff --git a/config/Makefile.mingw b/config/Makefile.mingw
new file mode 100644
index 000000000..97393484f
--- /dev/null
+++ b/config/Makefile.mingw
@@ -0,0 +1,119 @@
+#########################################################################
+# #
+# Objective Caml #
+# #
+# Xavier Leroy, projet Cristal, 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, with #
+# the special exception on linking described in file ../LICENSE. #
+# #
+#########################################################################
+
+# $Id$
+
+# Configuration for Windows, Mingw compiler
+
+######### General configuration
+
+PREFIX=C:/ocamlmgw
+
+### Where to install the binaries
+BINDIR=$(PREFIX)/bin
+
+### Where to install the standard library
+LIBDIR=$(PREFIX)/lib
+
+### Where to install the info files
+DISTRIB=$(PREFIX)
+
+### Location of Mingw include files
+SYSTEM_INCLUDES=c:/Mingw/include
+
+########## Toolchain and OS dependencies
+
+TOOLCHAIN=mingw
+CCOMPTYPE=cc
+O=o
+A=a
+S=s
+SO=s.o
+DO=d.o
+EXE=.exe
+
+########## Configuration for the bytecode compiler
+
+### Which C compiler to use for the bytecode interpreter.
+BYTECC=gcc
+
+### Additional compile-time options for $(BYTECC). (For static linking.)
+BYTECCCOMPOPTS=-O -Wall -Wno-unused
+
+### Additional link-time options for $(BYTECC). (For static linking.)
+BYTECCLINKOPTS=
+
+### Additional compile-time options for $(BYTECC). (For building a DLL.)
+DLLCCCOMPOPTS=-O -Wall -Wno-unused -D_DLL
+
+### Libraries needed
+BYTECCLIBS=-lm
+NATIVECCLIBS=-lm
+
+### How to invoke the C preprocessor
+CPP=gcc -E
+
+### How to build a DLL
+MKDLL=dllwrap --driver-name=gcc --dllname=$(1) --output-lib=$(2) $(3)
+
+### How to build a static library
+MKLIB=rm -f $(1); ar rcs $(1) $(2)
+
+### Canonicalize the name of a system library
+SYSLIB=-l$(1)
+
+### The ranlib command
+RANLIBCMD=ranlib
+
+############# Configuration for the native-code compiler
+
+### Name of architecture for the native-code compiler
+ARCH=i386
+
+### Name of architecture model for the native-code compiler.
+MODEL=default
+
+### Name of operating system family for the native-code compiler.
+SYSTEM=mingw
+
+### Which C compiler to use for the native-code compiler.
+NATIVECC=gcc
+
+### Additional compile-time options for $(NATIVECC).
+NATIVECCCOMPOPTS=-O -Wall -Wno-unused
+
+### Additional link-time options for $(NATIVECC)
+NATIVECCLINKOPTS=
+
+### Build partially-linked object file
+PARTIALLD=ld -r $(NATIVECCLINKOPTS)
+
+### nm and objcopy from GNU binutils
+BINUTILS_NM=nm
+BINUTILS_OBJCOPY=objcopy
+
+############# Configuration for the contributed libraries
+
+OTHERLIBRARIES=win32unix systhreads str num win32graph dynlink bigarray labltk
+
+### Name of the target architecture for the "num" library
+BIGNUM_ARCH=C
+
+### Configuration for LablTk
+TK_DEFS=
+TK_LINK=-ltk80 -ltcl80
+
+############# Aliases for common commands
+
+MAKEREC=$(MAKE) -f Makefile.nt
+MAKECMD=$(MAKE)
diff --git a/config/Makefile.nt b/config/Makefile.msvc
index 7445a2569..44b588e09 100644
--- a/config/Makefile.nt
+++ b/config/Makefile.msvc
@@ -13,23 +13,34 @@
# $Id$
-# Configuration for Windows NT/95, Visual C++ 6.0
+# Configuration for Windows, Visual C++ compiler
######### General configuration
-PREFIX=C:\ocaml
+PREFIX=C:/ocaml
### Where to install the binaries
-BINDIR=$(PREFIX)\bin
+BINDIR=$(PREFIX)/bin
### Where to install the standard library
-LIBDIR=$(PREFIX)\lib
+LIBDIR=$(PREFIX)/lib
### Where to install the info files
DISTRIB=$(PREFIX)
-### Location of VC++ include files
-SYSTEM_INCLUDES=c:\Msdev\VC98\Include
+### Location of MSVC include files
+SYSTEM_INCLUDES=c:/msdev/vc98/include
+
+########## Toolchain and OS dependencies
+
+TOOLCHAIN=msvc
+CCOMPTYPE=msvc
+O=obj
+A=lib
+S=asm
+SO=s.obj
+DO=d.obj
+EXE=.exe
########## Configuration for the bytecode compiler
@@ -52,9 +63,17 @@ NATIVECCLIBS=advapi32.lib
### How to invoke the C preprocessor
CPP=cl /nologo /EP
-### How to invoke the librarian
-MKLIB=lib /nologo /debugtype:CV /out:
-MKDLL=cl /nologo /MD /LD
+### How to build a DLL
+MKDLL=link /nologo /dll /out:$(1) /implib:$(2) $(3)
+
+### How to build a static library
+MKLIB=lib /nologo /debugtype:CV /out:$(1) $(2)
+
+### Canonicalize the name of a system library
+SYSLIB=$(1).lib
+
+### The ranlib command
+RANLIBCMD=
############# Configuration for the native-code compiler
@@ -76,9 +95,12 @@ NATIVECCCOMPOPTS=/Ox /MT
### Additional link-time options for $(NATIVECC)
NATIVECCLINKOPTS=/MT
-### Flags for the assembler
-AS=ml /nologo
-AFLAGS=/coff /Cp
+### Build partially-linked object file
+PARTIALLD=lib /nologo /debugtype:cv
+
+### nm and objcopy are missing
+BINUTILS_NM=
+BINUTILS_OBJCOPY=
############# Configuration for the contributed libraries
@@ -88,9 +110,10 @@ OTHERLIBRARIES=win32unix systhreads str num win32graph dynlink bigarray labltk
BIGNUM_ARCH=C
### Configuration for LablTk
-TK_DEFS=-Ic:\Tcl\include
+TK_DEFS=-Ic:/Tcl/include
TK_LINK=tk83.lib tcl83.lib
############# Aliases for common commands
-MAKEREC=$(MAKE) -nologo -f Makefile.nt
+MAKEREC=$(MAKE) -f Makefile.nt
+MAKECMD=$(MAKE)
diff --git a/config/m-nt.h b/config/m-nt.h
index 962e7f18e..46e8817bd 100644
--- a/config/m-nt.h
+++ b/config/m-nt.h
@@ -13,7 +13,8 @@
/* $Id$ */
-/* Machine configuration, Intel x86 processors, Win32, Visual C++ compiler */
+/* Machine configuration, Intel x86 processors, Win32,
+ Visual C++ or Mingw compiler */
#undef ARCH_SIXTYFOUR
#undef ARCH_BIG_ENDIAN
@@ -21,8 +22,13 @@
#define SIZEOF_INT 4
#define SIZEOF_LONG 4
#define SIZEOF_SHORT 2
+#ifdef __MINGW32__
+#define ARCH_INT64_TYPE long long
+#define ARCH_UINT64_TYPE unsigned long long
+#else
#define ARCH_INT64_TYPE __int64
#define ARCH_UINT64_TYPE unsigned __int64
+#endif
#define ARCH_INT64_PRINTF_FORMAT "I64"
#undef NONSTANDARD_DIV_MOD
diff --git a/lex/Makefile.nt b/lex/Makefile.nt
index 03f13b548..f8b1c852c 100644
--- a/lex/Makefile.nt
+++ b/lex/Makefile.nt
@@ -14,14 +14,14 @@
# The lexer generator
-CAMLC=..\boot\ocamlrun ..\boot\ocamlc -I ..\boot
-CAMLOPT=..\boot\ocamlrun ..\ocamlopt -I ..\stdlib
-COMPFLAGS=
+CAMLC=../boot/ocamlrun ../boot/ocamlc -I ../boot
+CAMLOPT=../boot/ocamlrun ../ocamlopt -I ../stdlib
+COMPFLAGS=-warn-error A
LINKFLAGS=
-CAMLYACC=..\boot\ocamlyacc
-YACCFLAGS=
-CAMLLEX=..\boot\ocamlrun ..\boot\ocamllex
-CAMLDEP=..\boot\ocamlrun ..\tools\ocamldep
+CAMLYACC=../boot/ocamlyacc
+YACCFLAGS=-v
+CAMLLEX=../boot/ocamlrun ../boot/ocamllex
+CAMLDEP=../boot/ocamlrun ../tools/ocamldep
DEPFLAGS=
OBJS=parser.cmo lexer.cmo lexgen.cmo compact.cmo output.cmo main.cmo
@@ -37,7 +37,7 @@ ocamllex.opt: $(OBJS:.cmo=.cmx)
clean::
rm -f ocamllex ocamllex.opt
- rm -f *.cmo *.cmi
+ rm -f *.cmo *.cmi *.cmx *.$(O)
parser.ml parser.mli: parser.mly
$(CAMLYACC) $(YACCFLAGS) parser.mly
@@ -70,4 +70,4 @@ beforedepend:: lexer.ml
depend: beforedepend
$(CAMLDEP) *.mli *.ml > .depend
-!include .depend
+include .depend
diff --git a/ocamldoc/Makefile.nt b/ocamldoc/Makefile.nt
index dfdadf76b..29f0b540d 100644
--- a/ocamldoc/Makefile.nt
+++ b/ocamldoc/Makefile.nt
@@ -11,17 +11,17 @@
# $Id$
-!include ..\config\Makefile.nt
+include ../config/Makefile
-CAMLRUN =..\boot\ocamlrun
-OCAMLC =$(CAMLRUN) ..\ocamlc -warn-error A
-OCAMLOPT =$(CAMLRUN) ..\ocamlopt
-OCAMLLEX =$(CAMLRUN) ..\boot\ocamllex
-OCAMLYACC=..\boot\ocamlyacc
+CAMLRUN =../boot/ocamlrun
+OCAMLC =$(CAMLRUN) ../ocamlc -warn-error A
+OCAMLOPT =$(CAMLRUN) ../ocamlopt
+OCAMLLEX =$(CAMLRUN) ../boot/ocamllex
+OCAMLYACC=../boot/ocamlyacc
OCAMLLIB = $(LIBDIR)
OCAMLBIN = $(BINDIR)
-EXTRAC_CRC = $(CAMLRUN) ..\otherlibs\dynlink\extract_crc
+EXTRAC_CRC = $(CAMLRUN) ../otherlibs/dynlink/extract_crc
OCAMLPP=-pp "grep -v DEBUG"
@@ -35,8 +35,8 @@ OCAMLDOC_OPT=$(OCAMLDOC).opt
OCAMLDOC_LIBCMA=odoc_info.cma
OCAMLDOC_LIBCMI=odoc_info.cmi
OCAMLDOC_LIBCMXA=odoc_info.cmxa
-OCAMLDOC_LIBA=odoc_info.a
-INSTALL_LIBDIR=$(OCAMLLIB)\ocamldoc
+OCAMLDOC_LIBA=odoc_info.$(A)
+INSTALL_LIBDIR=$(OCAMLLIB)/ocamldoc
INSTALL_BINDIR=$(OCAMLBIN)
INSTALL_MLIS=odoc_info.mli
@@ -45,19 +45,19 @@ INSTALL_CMIS=$(INSTALL_MLIS:.mli=.cmi)
# Compilation
#############
OCAMLSRCDIR=..
-INCLUDES= -I $(OCAMLSRCDIR)\parsing \
- -I $(OCAMLSRCDIR)\utils \
- -I $(OCAMLSRCDIR)\typing \
- -I $(OCAMLSRCDIR)\driver \
- -I $(OCAMLSRCDIR)\bytecomp \
- -I $(OCAMLSRCDIR)\tools \
- -I $(OCAMLSRCDIR)\stdlib \
- -I $(OCAMLSRCDIR)\otherlibs\str \
- -I $(OCAMLSRCDIR)\otherlibs\dynlink \
- -I $(OCAMLSRCDIR)\otherlibs\win32unix \
- -I $(OCAMLSRCDIR)\otherlibs\num \
- -I $(OCAMLSRCDIR)\otherlibs\graph \
- -I $(OCAMLSRCDIR)\toplevel \
+INCLUDES= -I $(OCAMLSRCDIR)/parsing \
+ -I $(OCAMLSRCDIR)/utils \
+ -I $(OCAMLSRCDIR)/typing \
+ -I $(OCAMLSRCDIR)/driver \
+ -I $(OCAMLSRCDIR)/bytecomp \
+ -I $(OCAMLSRCDIR)/tools \
+ -I $(OCAMLSRCDIR)/stdlib \
+ -I $(OCAMLSRCDIR)/otherlibs/str \
+ -I $(OCAMLSRCDIR)/otherlibs/dynlink \
+ -I $(OCAMLSRCDIR)/otherlibs/win32unix \
+ -I $(OCAMLSRCDIR)/otherlibs/num \
+ -I $(OCAMLSRCDIR)/otherlibs/graph \
+ -I $(OCAMLSRCDIR)/toplevel \
COMPFLAGS=$(INCLUDES)
LINKFLAGS=$(INCLUDES)
@@ -119,52 +119,52 @@ LIBCMXFILES= $(LIBCMOFILES:.cmo=.cmx)
LIBCMIFILES= $(LIBCMOFILES:.cmo=.cmi)
# Les cmo et cmx de la distrib OCAML
-OCAMLCMOFILES=$(OCAMLSRCDIR)\parsing\printast.cmo \
- $(OCAMLSRCDIR)\typing\ident.cmo \
- $(OCAMLSRCDIR)\utils\tbl.cmo \
- $(OCAMLSRCDIR)\utils\misc.cmo \
- $(OCAMLSRCDIR)\utils\config.cmo \
- $(OCAMLSRCDIR)\utils\clflags.cmo \
- $(OCAMLSRCDIR)\utils\warnings.cmo \
- $(OCAMLSRCDIR)\utils\ccomp.cmo \
- $(OCAMLSRCDIR)\parsing\linenum.cmo\
- $(OCAMLSRCDIR)\parsing\location.cmo\
- $(OCAMLSRCDIR)\parsing\longident.cmo \
- $(OCAMLSRCDIR)\parsing\syntaxerr.cmo \
- $(OCAMLSRCDIR)\parsing\parser.cmo \
- $(OCAMLSRCDIR)\parsing\lexer.cmo \
- $(OCAMLSRCDIR)\parsing\parse.cmo \
- $(OCAMLSRCDIR)\typing\types.cmo \
- $(OCAMLSRCDIR)\typing\path.cmo \
- $(OCAMLSRCDIR)\typing\btype.cmo \
- $(OCAMLSRCDIR)\typing\predef.cmo \
- $(OCAMLSRCDIR)\typing\datarepr.cmo \
- $(OCAMLSRCDIR)\typing\subst.cmo \
- $(OCAMLSRCDIR)\typing\env.cmo \
- $(OCAMLSRCDIR)\typing\ctype.cmo \
- $(OCAMLSRCDIR)\typing\primitive.cmo \
- $(OCAMLSRCDIR)\typing\oprint.cmo \
- $(OCAMLSRCDIR)\typing\printtyp.cmo \
- $(OCAMLSRCDIR)\typing\includecore.cmo \
- $(OCAMLSRCDIR)\typing\typetexp.cmo \
- $(OCAMLSRCDIR)\typing\parmatch.cmo \
- $(OCAMLSRCDIR)\typing\typedtree.cmo \
- $(OCAMLSRCDIR)\typing\typecore.cmo \
- $(OCAMLSRCDIR)\typing\includeclass.cmo \
- $(OCAMLSRCDIR)\typing\typedecl.cmo \
- $(OCAMLSRCDIR)\typing\typeclass.cmo \
- $(OCAMLSRCDIR)\typing\mtype.cmo \
- $(OCAMLSRCDIR)\typing\includemod.cmo \
- $(OCAMLSRCDIR)\typing\typemod.cmo \
- $(OCAMLSRCDIR)\bytecomp\lambda.cmo \
- $(OCAMLSRCDIR)\bytecomp\typeopt.cmo \
- $(OCAMLSRCDIR)\bytecomp\printlambda.cmo \
- $(OCAMLSRCDIR)\bytecomp\switch.cmo \
- $(OCAMLSRCDIR)\bytecomp\matching.cmo \
- $(OCAMLSRCDIR)\bytecomp\translobj.cmo \
- $(OCAMLSRCDIR)\bytecomp\translcore.cmo \
- $(OCAMLSRCDIR)\bytecomp\translclass.cmo \
- $(OCAMLSRCDIR)\tools\depend.cmo
+OCAMLCMOFILES=$(OCAMLSRCDIR)/parsing/printast.cmo \
+ $(OCAMLSRCDIR)/typing/ident.cmo \
+ $(OCAMLSRCDIR)/utils/tbl.cmo \
+ $(OCAMLSRCDIR)/utils/misc.cmo \
+ $(OCAMLSRCDIR)/utils/config.cmo \
+ $(OCAMLSRCDIR)/utils/clflags.cmo \
+ $(OCAMLSRCDIR)/utils/warnings.cmo \
+ $(OCAMLSRCDIR)/utils/ccomp.cmo \
+ $(OCAMLSRCDIR)/parsing/linenum.cmo\
+ $(OCAMLSRCDIR)/parsing/location.cmo\
+ $(OCAMLSRCDIR)/parsing/longident.cmo \
+ $(OCAMLSRCDIR)/parsing/syntaxerr.cmo \
+ $(OCAMLSRCDIR)/parsing/parser.cmo \
+ $(OCAMLSRCDIR)/parsing/lexer.cmo \
+ $(OCAMLSRCDIR)/parsing/parse.cmo \
+ $(OCAMLSRCDIR)/typing/types.cmo \
+ $(OCAMLSRCDIR)/typing/path.cmo \
+ $(OCAMLSRCDIR)/typing/btype.cmo \
+ $(OCAMLSRCDIR)/typing/predef.cmo \
+ $(OCAMLSRCDIR)/typing/datarepr.cmo \
+ $(OCAMLSRCDIR)/typing/subst.cmo \
+ $(OCAMLSRCDIR)/typing/env.cmo \
+ $(OCAMLSRCDIR)/typing/ctype.cmo \
+ $(OCAMLSRCDIR)/typing/primitive.cmo \
+ $(OCAMLSRCDIR)/typing/oprint.cmo \
+ $(OCAMLSRCDIR)/typing/printtyp.cmo \
+ $(OCAMLSRCDIR)/typing/includecore.cmo \
+ $(OCAMLSRCDIR)/typing/typetexp.cmo \
+ $(OCAMLSRCDIR)/typing/parmatch.cmo \
+ $(OCAMLSRCDIR)/typing/typedtree.cmo \
+ $(OCAMLSRCDIR)/typing/typecore.cmo \
+ $(OCAMLSRCDIR)/typing/includeclass.cmo \
+ $(OCAMLSRCDIR)/typing/typedecl.cmo \
+ $(OCAMLSRCDIR)/typing/typeclass.cmo \
+ $(OCAMLSRCDIR)/typing/mtype.cmo \
+ $(OCAMLSRCDIR)/typing/includemod.cmo \
+ $(OCAMLSRCDIR)/typing/typemod.cmo \
+ $(OCAMLSRCDIR)/bytecomp/lambda.cmo \
+ $(OCAMLSRCDIR)/bytecomp/typeopt.cmo \
+ $(OCAMLSRCDIR)/bytecomp/printlambda.cmo \
+ $(OCAMLSRCDIR)/bytecomp/switch.cmo \
+ $(OCAMLSRCDIR)/bytecomp/matching.cmo \
+ $(OCAMLSRCDIR)/bytecomp/translobj.cmo \
+ $(OCAMLSRCDIR)/bytecomp/translcore.cmo \
+ $(OCAMLSRCDIR)/bytecomp/translclass.cmo \
+ $(OCAMLSRCDIR)/tools/depend.cmo
OCAMLCMXFILES=$(OCAMLCMOFILES:.cmo=.cmx)
@@ -298,18 +298,18 @@ odoc_see_lexer.ml: odoc_see_lexer.mll
# Installation targets
######################
install: dummy
- if not exist $(INSTALL_BINDIR) $(MKDIR) $(INSTALL_BINDIR)
- if not exist $(INSTALL_LIBDIR) $(MKDIR) $(INSTALL_LIBDIR)
+ $(MKDIR) -p $(INSTALL_BINDIR)
+ $(MKDIR) -p $(INSTALL_LIBDIR)
$(CP) $(OCAMLDOC) $(INSTALL_BINDIR)/$(OCAMLDOC).exe
$(CP) ocamldoc.sty ocamldoc.hva *.cmi $(GENERATORS) $(OCAMLDOC_LIBCMA) $(INSTALL_LIBDIR)
$(CP) $(INSTALL_MLIS) $(INSTALL_CMIS) $(INSTALL_LIBDIR)
installopt:
- if exist $(OCAMLDOC_OPT) $(MAKE_REC) installopt_really
+ if test -f $(OCAMLDOC_OPT); then $(MAKEREC) installopt_really; fi
installopt_really:
- if not exist $(INSTALL_BINDIR) $(MKDIR) $(INSTALL_BINDIR)
- if not exist $(INSTALL_LIBDIR) $(MKDIR) $(INSTALL_LIBDIR)
+ $(MKDIR) -p $(INSTALL_BINDIR)
+ $(MKDIR) -p $(INSTALL_LIBDIR)
$(CP) $(OCAMLDOC_OPT) $(INSTALL_BINDIR)/$(OCAMLDOC_OPT)
$(CP) ocamldoc.sty ocamldoc.hva $(OCAMLDOC_LIBA) $(OCAMLDOC_LIBCMXA) $(INSTALL_LIBDIR)
$(CP) $(INSTALL_MLIS) $(INSTALL_CMIS) $(INSTALL_LIBDIR)
@@ -319,13 +319,13 @@ installopt_really:
############################
clean:: dummy
- @rm -f *~ \#*\#
- @rm -f $(OCAMLDOC) $(OCAMLDOC_OPT) *.cma *.cmxa *.cmo *.cmi *.cmx *.a *.o
+ @rm -f *~ /#*/#
+ @rm -f $(OCAMLDOC) $(OCAMLDOC_OPT) *.cma *.cmxa *.cmo *.cmi *.cmx *.$(A) *.$(O)
@rm -f odoc_parser.output odoc_text_parser.output
@rm -f odoc_lexer.ml odoc_text_lexer.ml odoc_see_lexer.ml odoc_ocamlhtml.ml
@rm -f odoc_parser.ml odoc_parser.mli odoc_text_parser.ml odoc_text_parser.mli odoc_crc.ml
-.depend depend::
+depend::
rm -f .depend
$(OCAMLYACC) odoc_text_parser.mly
$(OCAMLYACC) odoc_parser.mly
diff --git a/otherlibs/bigarray/Makefile.nt b/otherlibs/bigarray/Makefile.nt
index 17d84ed1a..ea647ab1a 100644
--- a/otherlibs/bigarray/Makefile.nt
+++ b/otherlibs/bigarray/Makefile.nt
@@ -13,12 +13,12 @@
# $Id$
-include ..\..\config\Makefile.nt
+include ../../config/Makefile
CC=$(BYTECC)
-CFLAGS=-I..\..\byterun -I..\win32unix
-CAMLC=..\..\boot\ocamlrun ..\..\ocamlc -I ..\..\stdlib -I ..\win32unix
-CAMLOPT=..\..\boot\ocamlrun ..\..\ocamlopt -I ..\..\stdlib -I ..\win32unix
+CFLAGS=-I../../byterun -I../win32unix
+CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../stdlib -I ../win32unix
+CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib -I ../win32unix
C_OBJS=bigarray_stubs.obj mmap_win32.obj
@@ -28,14 +28,13 @@ all: dllbigarray.dll libbigarray.lib bigarray.cma
allopt: libbigarray.lib bigarray.cmxa
-dllbigarray.dll: $(C_OBJS:.obj=.dobj)
- link /nologo /dll /out:dllbigarray.dll /implib:tmp.lib \
- $(C_OBJS:.obj=.dobj) ..\..\byterun\ocamlrun.lib
+dllbigarray.dll: $(C_OBJS:.obj=.$(DO))
+ $(call MKDLL,dllbigarray.dll,tmp.$(A),\
+ $(C_OBJS:.obj=.$(DO)) ../../byterun/ocamlrun.$(A))
rm tmp.*
-libbigarray.lib: $(C_OBJS:.obj=.sobj)
- rm -f libunix.lib
- $(MKLIB)libbigarray.lib $(C_OBJS:.obj=.sobj)
+libbigarray.lib: $(C_OBJS:.obj=.$(SO))
+ $(call MKLIB,libbigarray.$(A),$(C_OBJS:.obj=.$(SO)))
bigarray.cma: $(CAML_OBJS)
$(CAMLC) -a -linkall -o bigarray.cma $(CAML_OBJS) \
@@ -46,20 +45,20 @@ bigarray.cmxa: $(CAML_OBJS:.cmo=.cmx)
$(CAML_OBJS:.cmo=.cmx) -cclib -lbigarray
install:
- cp dllbigarray.dll libbigarray.lib $(LIBDIR)
+ cp dllbigarray.dll libbigarray.$(A) $(LIBDIR)
cp bigarray.cmi bigarray.mli bigarray.cma $(LIBDIR)
cp bigarray.h $(LIBDIR)/caml/bigarray.h
installopt:
- cp bigarray.lib $(CAML_OBJS:.cmo=.cmx) bigarray.cmxa $(LIBDIR)
+ cp bigarray.$(A) $(CAML_OBJS:.cmo=.cmx) bigarray.cmxa $(LIBDIR)
partialclean:
rm -f *.cm*
clean: partialclean
- rm -f *.dll *.lib *.dobj *.sobj
+ rm -f *.dll *.$(A) *.$(O)
-.SUFFIXES: .ml .mli .cmo .cmi .cmx .dobj .sobj
+.SUFFIXES: .ml .mli .cmo .cmi .cmx .$(DO) .$(SO)
.mli.cmi:
$(CAMLC) -c $(COMPFLAGS) $<
@@ -70,16 +69,16 @@ clean: partialclean
.ml.cmx:
$(CAMLOPT) -c $(COMPFLAGS) $<
-.c.dobj:
+.c.$(DO):
$(BYTECC) $(DLLCCCOMPOPTS) $(CFLAGS) -c $<
- mv $*.obj $*.dobj
+ mv $*.$(O) $*.$(DO)
-.c.sobj:
+.c.$(SO):
$(BYTECC) $(BYTECCCOMPOPTS) $(CFLAGS) -c $<
- mv $*.obj $*.sobj
+ mv $*.$(O) $*.$(SO)
depend:
gcc -MM $(CFLAGS) *.c > .depend
- ..\..\boot\ocamlrun ..\..\tools\ocamldep *.mli *.ml >> .depend
+ ../../boot/ocamlrun ../../tools/ocamldep *.mli *.ml >> .depend
include .depend
diff --git a/otherlibs/bigarray/mmap_win32.c b/otherlibs/bigarray/mmap_win32.c
index 82735cb9e..a3701611d 100644
--- a/otherlibs/bigarray/mmap_win32.c
+++ b/otherlibs/bigarray/mmap_win32.c
@@ -17,6 +17,7 @@
#include <stdio.h>
#include <string.h>
#include "bigarray.h"
+#include "alloc.h"
#include "custom.h"
#include "fail.h"
#include "mlvalues.h"
@@ -110,6 +111,6 @@ static void bigarray_sys_error(void)
buffer,
sizeof(buffer),
NULL))
- sprintf(buffer, "Unknown error %d\n", errnum);
+ sprintf(buffer, "Unknown error %ld\n", errnum);
raise_sys_error(copy_string(buffer));
}
diff --git a/otherlibs/dynlink/Makefile.nt b/otherlibs/dynlink/Makefile.nt
index 439915428..56d14ba63 100644
--- a/otherlibs/dynlink/Makefile.nt
+++ b/otherlibs/dynlink/Makefile.nt
@@ -15,17 +15,17 @@
# Makefile for the dynamic link library
-!include ..\..\config\Makefile.nt
+include ../../config/Makefile
-CAMLC=..\..\boot\ocamlrun ..\..\ocamlc
-INCLUDES=-I ..\..\utils -I ..\..\typing -I ..\..\bytecomp
-COMPFLAGS=-I ..\..\stdlib $(INCLUDES)
+CAMLC=../../boot/ocamlrun ../../ocamlc
+INCLUDES=-I ../../utils -I ../../typing -I ../../bytecomp
+COMPFLAGS=-warn-error A -I ../../stdlib $(INCLUDES)
OBJS=dynlink.cmo
-COMPILEROBJS=misc.cmo config.cmo tbl.cmo \
- clflags.cmo ident.cmo path.cmo \
+COMPILEROBJS=misc.cmo config.cmo tbl.cmo clflags.cmo \
+ ident.cmo path.cmo \
types.cmo btype.cmo predef.cmo runtimedef.cmo \
- bytesections.cmo dll.cmo symtable.cmo opcodes.cmo
+ bytesections.cmo dll.cmo symtable.cmo opcodes.cmo meta.cmo
all: dynlink.cma extract_crc
@@ -38,7 +38,7 @@ extract_crc: dynlink.cma extract_crc.cmo
$(CAMLC) $(COMPFLAGS) -o extract_crc dynlink.cma extract_crc.cmo
install:
- cp dynlink.cmi dynlink.cma extract_crc $(LIBDIR)
+ cp dynlink.cmi dynlink.cma dynlink.mli extract_crc $(LIBDIR)
installopt:
@@ -56,6 +56,6 @@ clean: partialclean
$(CAMLC) -c $(COMPFLAGS) $<
depend:
- ..\..\boot\ocamlrun ..\..\tools\ocamldep *.mli *.ml > .depend
+ ../../boot/ocamlrun ../../tools/ocamldep $(INCLUDES) *.mli *.ml >.depend
-!include .depend
+include .depend
diff --git a/otherlibs/labltk/Makefile.nt b/otherlibs/labltk/Makefile.nt
index c5e979a06..0f91c1ace 100644
--- a/otherlibs/labltk/Makefile.nt
+++ b/otherlibs/labltk/Makefile.nt
@@ -1,59 +1,59 @@
# Top Makefile for LablTk
-!include ..\..\config\Makefile.nt
+include ../../config/Makefile
SUBDIRS=compiler support lib labltk camltk jpf frx tkanim examples_labltk examples_camltk browser
all:
- cd support & $(MAKEREC)
- cd compiler & $(MAKEREC)
- cd labltk & $(MAKE) -nologo -f Makefile.gen.nt
- cd labltk & $(MAKEREC)
- cd camltk & $(MAKE) -nologo -f Makefile.gen.nt
- cd camltk & $(MAKEREC)
- cd lib & $(MAKEREC)
- cd jpf & $(MAKEREC)
- cd frx & $(MAKEREC)
- cd tkanim & $(MAKEREC)
- cd browser & $(MAKEREC)
+ cd support ; $(MAKEREC)
+ cd compiler ; $(MAKEREC)
+ cd labltk ; $(MAKECMD) -f Makefile.gen.nt
+ cd labltk ; $(MAKEREC)
+ cd camltk ; $(MAKECMD) -f Makefile.gen.nt
+ cd camltk ; $(MAKEREC)
+ cd lib ; $(MAKEREC)
+ cd jpf ; $(MAKEREC)
+ cd frx ; $(MAKEREC)
+ cd tkanim ; $(MAKEREC)
+ cd browser ; $(MAKEREC)
allopt:
- cd support & $(MAKEREC) opt
- cd labltk & $(MAKE) -nologo -f Makefile.gen.nt
- cd labltk & $(MAKEREC) opt
- cd camltk & $(MAKE) -nologo -f Makefile.gen.nt
- cd camltk & $(MAKEREC) opt
- cd lib & $(MAKEREC) opt
- cd jpf & $(MAKEREC) opt
- cd frx & $(MAKEREC) opt
- cd tkanim & $(MAKEREC) opt
+ cd support ; $(MAKEREC) opt
+ cd labltk ; $(MAKECMD) -f Makefile.gen.nt
+ cd labltk ; $(MAKEREC) opt
+ cd camltk ; $(MAKECMD) -f Makefile.gen.nt
+ cd camltk ; $(MAKEREC) opt
+ cd lib ; $(MAKEREC) opt
+ cd jpf ; $(MAKEREC) opt
+ cd frx ; $(MAKEREC) opt
+ cd tkanim ; $(MAKEREC) opt
example: examples_labltk/all examples_camltk/all
examples_labltk/all:
- cd examples_labltk & $(MAKEREC) all
+ cd examples_labltk ; $(MAKEREC) all
examples_camltk/all:
- cd examples_camltk & $(MAKEREC) all
+ cd examples_camltk ; $(MAKEREC) all
install:
- cd labltk & $(MAKEREC) install
- cd camltk & $(MAKEREC) install
- cd lib & $(MAKEREC) install
- cd support & $(MAKEREC) install
- cd compiler & $(MAKEREC) install
- cd jpf & $(MAKEREC) install
- cd frx & $(MAKEREC) install
- cd tkanim & $(MAKEREC) install
- cd browser & $(MAKEREC) install
+ cd labltk ; $(MAKEREC) install
+ cd camltk ; $(MAKEREC) install
+ cd lib ; $(MAKEREC) install
+ cd support ; $(MAKEREC) install
+ cd compiler ; $(MAKEREC) install
+ cd jpf ; $(MAKEREC) install
+ cd frx ; $(MAKEREC) install
+ cd tkanim ; $(MAKEREC) install
+ cd browser ; $(MAKEREC) install
installopt:
- cd labltk & $(MAKEREC) installopt
- cd camltk & $(MAKEREC) installopt
- cd lib & $(MAKEREC) installopt
- cd jpf & $(MAKEREC) installopt
- cd frx & $(MAKEREC) installopt
- cd tkanim & $(MAKEREC) installopt
+ cd labltk ; $(MAKEREC) installopt
+ cd camltk ; $(MAKEREC) installopt
+ cd lib ; $(MAKEREC) installopt
+ cd jpf ; $(MAKEREC) installopt
+ cd frx ; $(MAKEREC) installopt
+ cd tkanim ; $(MAKEREC) installopt
partialclean clean:
- for %d in ($(SUBDIRS)) do (cd %d & $(MAKEREC) clean & cd ..)
+ for d in $(SUBDIRS); do $(MAKEREC) -C $$d clean; done
diff --git a/otherlibs/labltk/browser/Makefile.nt b/otherlibs/labltk/browser/Makefile.nt
index 43b3828b2..729acb710 100644
--- a/otherlibs/labltk/browser/Makefile.nt
+++ b/otherlibs/labltk/browser/Makefile.nt
@@ -1,12 +1,18 @@
-!include ..\support\Makefile.common.nt
+include ../support/Makefile.common.nt
LABLTKLIB=-I ../labltk -I ../lib -I ../support
OTHERSLIB=-I $(OTHERS)/win32unix -I $(OTHERS)/str -I $(OTHERS)/systhreads
OCAMLTOPLIB=-I $(TOPDIR)/parsing -I $(TOPDIR)/utils -I $(TOPDIR)/typing
INCLUDES=$(OTHERSLIB) $(LABLTKLIB) $(OCAMLTOPLIB)
-CCFLAGS=-I..\..\..\byterun /Zi $(TK_DEFS)
+CCFLAGS=-I../../../byterun $(TK_DEFS)
-OBJ = list2.cmo useunix.cmo setpath.cmo lexical.cmo \
+ifeq ($(CCOMPTYPE),cc)
+WINDOWS_APP=
+else
+WINDOWS_APP=-cclib "/link /subsystem:windows"
+endif
+
+OBJS = list2.cmo useunix.cmo setpath.cmo lexical.cmo \
fileselect.cmo searchid.cmo searchpos.cmo shell.cmo \
help.cmo \
viewer.cmo typecheck.cmo editor.cmo main.cmo
@@ -18,7 +24,7 @@ JG = jg_tk.cmo jg_config.cmo jg_bind.cmo jg_completion.cmo \
# Default rules
-.SUFFIXES: .ml .mli .cmo .cmi .cmx
+.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .$(O)
.ml.cmo:
$(CAMLCOMP) $(INCLUDES) $<
@@ -26,27 +32,27 @@ JG = jg_tk.cmo jg_config.cmo jg_bind.cmo jg_completion.cmo \
.mli.cmi:
$(CAMLCOMP) $(INCLUDES) $<
-y.c.obj:
+.c.$(O):
$(BYTECC) $(BYTECCCOMPOPTS) $(CCFLAGS) -c $<
all: ocamlbrowser.exe
ocamlbrowser.exe: $(TOPDIR)/toplevel/toplevellib.cma \
- ..\support\lib$(LIBNAME).lib
-ocamlbrowser.exe: jglib.cma $(OBJ) winmain.obj
+ ../support/lib$(LIBNAME).$(A)
+ocamlbrowser.exe: jglib.cma $(OBJS) winmain.$(O)
$(CAMLC) -o ocamlbrowser.exe -custom $(INCLUDES) \
$(TOPDIR)/toplevel/toplevellib.cma \
- unix.cma threads.cma str.cma $(LIBNAME).cma jglib.cma $(OBJ) \
- winmain.obj -cclib "/subsystem:windows"
+ unix.cma threads.cma str.cma $(LIBNAME).cma jglib.cma $(OBJS) \
+ winmain.$(O) $(WINDOWS_APP)
jglib.cma: $(JG)
$(CAMLCOMP) -a -o jglib.cma $(JG)
install:
- if exist ocamlbrowser.exe cp ocamlbrowser.exe $(BINDIR)
+ if test -f ocamlbrowser.exe; then cp ocamlbrowser.exe $(BINDIR); fi
clean:
- rm -f *.cm? ocamlbrowser.exe dummy.mli *~ *.orig *.obj *.pdb
+ rm -f *.cm? ocamlbrowser.exe dummy.mli *~ *.orig *.$(O)
depend:
$(CAMLDEP) *.ml *.mli > .depend
@@ -55,4 +61,4 @@ dummy.mli:
cp dummyWin.mli dummy.mli
shell.cmo: dummy.cmi
-!include .depend
+include .depend
diff --git a/otherlibs/labltk/browser/winmain.c b/otherlibs/labltk/browser/winmain.c
index 6805ecfcd..d36f6786f 100644
--- a/otherlibs/labltk/browser/winmain.c
+++ b/otherlibs/labltk/browser/winmain.c
@@ -1,12 +1,18 @@
-#include <callback.h>
#include <windows.h>
+#include <mlvalues.h>
+#include <callback.h>
+#include <sys.h>
+
extern int __argc;
extern char **__argv;
-extern void expand_command_line (int *, char ***);
+extern void expand_command_line(int * argcp, char *** argvp);
extern void caml_main (char **);
int WINAPI WinMain(HINSTANCE h, HINSTANCE HPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
- return main(__argc, __argv);
+ expand_command_line(&__argc, &__argv);
+ caml_main(__argv);
+ sys_exit(Val_int(0));
+ return 0;
}
diff --git a/otherlibs/labltk/camltk/Makefile.gen.nt b/otherlibs/labltk/camltk/Makefile.gen.nt
index bee2939db..73d90d422 100644
--- a/otherlibs/labltk/camltk/Makefile.gen.nt
+++ b/otherlibs/labltk/camltk/Makefile.gen.nt
@@ -1,43 +1,47 @@
-!include ..\support\Makefile.common.nt
+include ../support/Makefile.common.nt
all: cTk.ml camltk.ml .depend
-_tkgen.ml: ..\Widgets.src ..\compiler\tkcompiler.exe
- cd .. & ..\..\boot\ocamlrun compiler/tkcompiler.exe -camltk -outdir camltk
+_tkgen.ml: ../Widgets.src ../compiler/tkcompiler.exe
+ cd .. ; ../../boot/ocamlrun compiler/tkcompiler.exe -camltk -outdir camltk
# dependencies are broken: wouldn't work with gmake 3.77
-cTk.ml camltk.ml .depend: _tkgen.ml ..\builtin\report.ml ..\compiler\pp.exe #../builtin/builtin_*.ml
- type << > _cTk.ml
-##define CAMLTK
-include Camltkwrap
-open Widget
-open Protocol
-open Textvariable
-<<
- type ..\builtin\report.ml >> _cTk.ml
- type ..\builtin\builtin_*.ml >> _cTk.ml
- type _tkgen.ml >> _cTk.ml
- type << >> _cTk.ml
-
-
-module Tkintf = struct
-<<
- type ..\builtin\builtini_*.ml >> _cTk.ml
- type _tkigen.ml >> _cTk.ml
- type << >> _cTk.ml
-end (* module Tkintf *)
-
-
-open Tkintf
-
-
-<<
- type ..\builtin\builtinf_*.ml >> _cTk.ml
- type _tkfgen.ml >> _cTk.ml
- ..\..\..\boot\ocamlrun ..\compiler\pp.exe < _cTk.ml > cTk.ml
+cTk.ml camltk.ml .depend: _tkgen.ml ../builtin/report.ml ../compiler/pp.exe #../builtin/builtin_*.ml
+ (echo '##define CAMLTK'; \
+ echo 'include Camltkwrap'; \
+ echo 'open Widget'; \
+ echo 'open Protocol'; \
+ echo 'open Textvariable'; \
+ echo ; \
+ cat ../builtin/report.ml; \
+ echo ; \
+ cat ../builtin/builtin_*.ml; \
+ echo ; \
+ cat _tkgen.ml; \
+ echo ; \
+ echo ; \
+ echo 'module Tkintf = struct'; \
+ cat ../builtin/builtini_*.ml; \
+ cat _tkigen.ml; \
+ echo 'end (* module Tkintf *)'; \
+ echo ; \
+ echo ; \
+ echo 'open Tkintf' ;\
+ echo ; \
+ echo ; \
+ cat ../builtin/builtinf_*.ml; \
+ cat _tkfgen.ml; \
+ echo ; \
+ ) > _cTk.ml
+ ../../../boot/ocamlrun ../compiler/pp < _cTk.ml > cTk.ml
rm -f _cTk.ml
- $(CAMLDEP) -I ..\support *.mli *.ml > .depend
+ $(CAMLDEP) -I ../support [a-z]*.mli [a-z]*.ml | \
+ sed -e 's|\\\\\\(.\\)|/\\1|g' > .depend
+
+../compiler/pp.exe:
+ cd ../compiler; $(MAKEREC) pp.exe
clean:
- rm -f modules .depend
+ rm -f *.cm* *.ml *.mli *.$(O) *.$(A)
+# rm -f modules .depend
diff --git a/otherlibs/labltk/camltk/Makefile.nt b/otherlibs/labltk/camltk/Makefile.nt
index 66988797c..6c81dbc49 100644
--- a/otherlibs/labltk/camltk/Makefile.nt
+++ b/otherlibs/labltk/camltk/Makefile.nt
@@ -1,4 +1,4 @@
-!include ..\support\Makefile.common.nt
+include ../support/Makefile.common.nt
COMPFLAGS= -I ../support
@@ -8,10 +8,10 @@ opt: camltkobjsx
# All .{ml,mli} files are generated in this directory
clean :
- rm -f *.cm* *.ml *.mli *.a *.obj
+ rm -f *.cm* *.ml *.mli *.$(A) *.$(O)
$(MAKE) -f Makefile.gen.nt clean
-!include .\modules
+include ./modules
CAMLTKOBJS = $(WIDGETOBJS) cTk.cmo camltk.cmo
CAMLTKOBJSX = $(CAMLTKOBJS:.cmo=.cmx)
@@ -21,11 +21,11 @@ camltkobjs: $(CAMLTKOBJS)
camltkobjsx: $(CAMLTKOBJSX)
install: $(CAMLTKOBJS)
- @if not exist $(INSTALLDIR) mkdir $(INSTALLDIR)
+ mkdir -p $(INSTALLDIR)
cp *.cmi [a-z]*.mli $(INSTALLDIR)
installopt: $(CAMLTKOBJSX)
- @if not exist $(INSTALLDIR) mkdir $(INSTALLDIR)
+ mkdir -p $(INSTALLDIR)
cp $(CAMLTKOBJSX) $(INSTALLDIR)
.SUFFIXES :
@@ -40,4 +40,4 @@ installopt: $(CAMLTKOBJSX)
.ml.cmx:
$(CAMLOPT) -c $(COMPFLAGS) $<
-!include .depend
+include .depend
diff --git a/otherlibs/labltk/compiler/Makefile.nt b/otherlibs/labltk/compiler/Makefile.nt
index 4a18e8ee5..3c936ba4c 100644
--- a/otherlibs/labltk/compiler/Makefile.nt
+++ b/otherlibs/labltk/compiler/Makefile.nt
@@ -1,4 +1,4 @@
-!include ..\support\Makefile.common.nt
+include ../support/Makefile.common.nt
OBJS= ../support/support.cmo flags.cmo copyright.cmo \
tsort.cmo tables.cmo printer.cmo lexer.cmo \
@@ -30,15 +30,10 @@ ppyac.ml ppyac.mli: ppyac.mly
$(CAMLYACC) -v ppyac.mly
copyright.ml: copyright
- type << > copyright.ml
-let copyright="
-<<
- type copyright >> copyright.ml
- type << >> copyright.ml
-"
-
-let write ~w = w copyright;;
-<<
+ (echo "let copyright=\"\\"; \
+ cat copyright; \
+ echo "\""; \
+ echo "let write ~w = w copyright;;") > copyright.ml
clean :
rm -f *.cm* parser.ml parser.mli lexer.ml copyright.ml
@@ -65,4 +60,4 @@ install:
depend: parser.ml parser.mli lexer.ml pplex.ml ppyac.ml ppyac.mli
$(CAMLDEP) *.mli *.ml > .depend
-!include .depend
+include .depend
diff --git a/otherlibs/labltk/frx/Makefile.nt b/otherlibs/labltk/frx/Makefile.nt
index bf624ee16..2f37a4cb9 100644
--- a/otherlibs/labltk/frx/Makefile.nt
+++ b/otherlibs/labltk/frx/Makefile.nt
@@ -1,4 +1,4 @@
-!include ..\support\Makefile.common.nt
+include ../support/Makefile.common.nt
COMPFLAGS=-I ../camltk -I ../support
@@ -24,15 +24,15 @@ install: libfrx.cma
cp *.cmi *.mli libfrx.cma $(INSTALLDIR)
installopt: libfrx.cmxa
- cp libfrx.cmxa libfrx.lib $(INSTALLDIR)
+ cp libfrx.cmxa libfrx.$(A) $(INSTALLDIR)
clean:
- rm -f *.cm* *.obj *.a *~ *test *.lib
+ rm -f *.cm* *.$(O) *.$(A) *~ *test
-$(OBJS) $(OBJS:.cmo=.cmi): ..\lib\$(LIBNAME).cma
+$(OBJS) $(OBJS:.cmo=.cmi): ../lib/$(LIBNAME).cma
-$(OBJSX): ..\lib\$(LIBNAME).cmxa
+$(OBJSX): ../lib/$(LIBNAME).cmxa
.SUFFIXES :
.SUFFIXES : .mli .ml .cmi .cmo .cmx
@@ -50,4 +50,4 @@ $(OBJSX): ..\lib\$(LIBNAME).cmxa
depend:
$(CAMLDEP) *.mli *.ml > .depend
-!include .depend
+include .depend
diff --git a/otherlibs/labltk/jpf/Makefile.nt b/otherlibs/labltk/jpf/Makefile.nt
index cccd58436..7501a01d4 100644
--- a/otherlibs/labltk/jpf/Makefile.nt
+++ b/otherlibs/labltk/jpf/Makefile.nt
@@ -1,4 +1,4 @@
-!include ..\support\Makefile.common.nt
+include ../support/Makefile.common.nt
COMPFLAGS=-I ../labltk -I ../support -I $(OTHERS)/win32unix -I $(OTHERS)/str
@@ -24,14 +24,14 @@ install: libjpf.cma
cp $(OBJS:.cmo=.cmi) $(OBJS:.cmo=.mli) libjpf.cma $(INSTALLDIR)
installopt: libjpf.cmxa
- cp libjpf.cmxa libjpf.lib $(INSTALLDIR)
+ cp libjpf.cmxa libjpf.$(A) $(INSTALLDIR)
clean:
- rm -f *.cm* *.obj *.a *~ *test *.lib
+ rm -f *.cm* *.$(O) *.$(A) *~ *test
-$(OBJS) $(OBJS:.cmo=.cmi): ..\lib\$(LIBNAME).cma
+$(OBJS) $(OBJS:.cmo=.cmi): ../lib/$(LIBNAME).cma
-$(OBJSX): ..\lib\$(LIBNAME).cmxa
+$(OBJSX): ../lib/$(LIBNAME).cmxa
### Tests
diff --git a/otherlibs/labltk/labltk/Makefile.gen.nt b/otherlibs/labltk/labltk/Makefile.gen.nt
index dc0fa9367..c72db74bb 100644
--- a/otherlibs/labltk/labltk/Makefile.gen.nt
+++ b/otherlibs/labltk/labltk/Makefile.gen.nt
@@ -1,43 +1,41 @@
-!include ..\support\Makefile.common.nt
+include ../support/Makefile.common.nt
all: tk.ml labltk.ml .depend
-_tkgen.ml: ..\Widgets.src ..\compiler\tkcompiler.exe
- cd .. & ..\..\boot\ocamlrun compiler/tkcompiler.exe -outdir labltk
+_tkgen.ml: ../Widgets.src ../compiler/tkcompiler.exe
+ cd .. ; ../../boot/ocamlrun compiler/tkcompiler.exe -outdir labltk
# dependencies are broken: wouldn't work with gmake 3.77
-tk.ml labltk.ml .depend: _tkgen.ml ..\builtin\report.ml ..\compiler\pp.exe #../builtin/builtin_*.ml
- type << > _tk.ml
-open StdLabels
-open Widget
-open Protocol
-open Support
-open Textvariable
-<<
- type ..\builtin\report.ml >> _tk.ml
- type ..\builtin\builtin_*.ml >> _tk.ml
- type _tkgen.ml >> _tk.ml
- type << >> _tk.ml
-
-
-module Tkintf = struct
-<<
- type ..\builtin\builtini_*.ml >> _tk.ml
- type _tkigen.ml >> _tk.ml
- type << >> _tk.ml
-end (* module Tkintf *)
-
-
-open Tkintf
-
-
-<<
- type ..\builtin\builtinf_*.ml >> _tk.ml
- type _tkfgen.ml >> _tk.ml
- ..\..\..\boot\ocamlrun ..\compiler\pp.exe < _tk.ml > tk.ml
+tk.ml labltk.ml .depend: _tkgen.ml ../builtin/report.ml ../compiler/pp.exe #../builtin/builtin_*.ml
+ (echo 'open StdLabels'; \
+ echo 'open Widget'; \
+ echo 'open Protocol'; \
+ echo 'open Support'; \
+ echo 'open Textvariable'; \
+ cat ../builtin/report.ml; \
+ cat ../builtin/builtin_*.ml; \
+ cat _tkgen.ml; \
+ echo ; \
+ echo ; \
+ echo 'module Tkintf = struct'; \
+ cat ../builtin/builtini_*.ml; \
+ cat _tkigen.ml; \
+ echo 'end (* module Tkintf *)'; \
+ echo ; \
+ echo ; \
+ echo 'open Tkintf' ;\
+ echo ; \
+ echo ; \
+ cat ../builtin/builtinf_*.ml; \
+ cat _tkfgen.ml; \
+ echo ; \
+ ) > _tk.ml
+ ../../../boot/ocamlrun ../compiler/pp < _tk.ml > tk.ml
rm -f _tk.ml
- $(CAMLDEP) -I ../support *.mli *.ml > .depend
+ $(CAMLDEP) -I ../support [a-z]*.mli [a-z]*.ml | \
+ sed -e 's|\\\\\\(.\\)|/\\1|g' > .depend
clean:
- rm -f modules .depend
+ rm -f *.cm* *.ml *.mli *.$(O) *.$(A)
+# rm -f modules .depend
diff --git a/otherlibs/labltk/labltk/Makefile.nt b/otherlibs/labltk/labltk/Makefile.nt
index 12582b807..a8f4f694d 100644
--- a/otherlibs/labltk/labltk/Makefile.nt
+++ b/otherlibs/labltk/labltk/Makefile.nt
@@ -1,4 +1,4 @@
-!include ..\support\Makefile.common.nt
+include ../support/Makefile.common.nt
COMPFLAGS= -I ../support
@@ -8,10 +8,10 @@ opt: labltkobjsx
# All .{ml,mli} files are generated in this directory
clean :
- rm -f *.cm* *.ml *.mli *.a *.obj
+ rm -f *.cm* *.ml *.mli *.$(A) *.$(O)
$(MAKE) -f Makefile.gen.nt clean
-!include .\modules
+include ./modules
LABLTKOBJS = $(WIDGETOBJS) tk.cmo labltk.cmo
LABLTKOBJSX = $(LABLTKOBJS:.cmo=.cmx)
@@ -21,15 +21,15 @@ labltkobjs: $(LABLTKOBJS)
labltkobjsx: $(LABLTKOBJSX)
install: $(LABLTKOBJS)
- @if not exist $(INSTALLDIR) mkdir $(INSTALLDIR)
+ mkdir -p $(INSTALLDIR)
cp *.cmi [a-z]*.mli $(INSTALLDIR)
installopt: $(LABLTKOBJSX)
- @if not exist $(INSTALLDIR) mkdir $(INSTALLDIR)
+ mkdir -p $(INSTALLDIR)
cp $(LABLTKOBJSX) $(INSTALLDIR)
.SUFFIXES :
-.SUFFIXES : .mli .ml .cmi .cmx .cmo .mlp
+.SUFFIXES : .mli .ml .cmi .cmx .cmo
.mli.cmi:
$(CAMLCOMP) $(COMPFLAGS) $<
@@ -40,4 +40,4 @@ installopt: $(LABLTKOBJSX)
.ml.cmx:
$(CAMLOPT) -c $(COMPFLAGS) $<
-!include .depend
+include .depend
diff --git a/otherlibs/labltk/lib/Makefile.nt b/otherlibs/labltk/lib/Makefile.nt
index 99176c73e..ef1aee527 100644
--- a/otherlibs/labltk/lib/Makefile.nt
+++ b/otherlibs/labltk/lib/Makefile.nt
@@ -1,16 +1,16 @@
-!include ..\support\Makefile.common.nt
+include ../support/Makefile.common.nt
all: $(LIBNAME).cma
opt: $(LIBNAME).cmxa
clean:
- rm -f $(LIBNAME).cma $(LIBNAME).cmxa *.lib
+ rm -f $(LIBNAME).cma $(LIBNAME).cmxa *.$(A)
-!include ..\labltk\modules
+include ../labltk/modules
LABLTKOBJS=tk.cmo $(WIDGETOBJS)
-!include ..\camltk\modules
+include ../camltk/modules
CAMLTKOBJS=cTk.cmo $(CWIDGETOBJS) labltk.cmo camltk.cmo
SUPPORT=../support/support.cmo ../support/rawwidget.cmo \
@@ -23,16 +23,16 @@ TKOBJS=$(SUPPORT) $(LABLTKOBJS) $(CAMLTKOBJS)
TOPDEPS = $(TOPDIR)/toplevel/toplevellib.cma $(TOPDIR)/toplevel/topmain.cmo
$(LIBNAME).cma: $(SUPPORT)
- cd ..\labltk & $(MAKEREC)
- cd ..\camltk & $(MAKEREC)
+ cd ../labltk ; $(MAKEREC)
+ cd ../camltk ; $(MAKEREC)
$(CAMLLIBR) -o $(LIBNAME).cma -I ../labltk -I ../camltk $(TKOBJS) \
- -dllib -l$(LIBNAME) -cclib -l$(LIBNAME) $(TK_LINK)
+ -dllib -l$(LIBNAME) -cclib -l$(LIBNAME) -cclib "$(TK_LINK)"
$(LIBNAME).cmxa: $(SUPPORT:.cmo=.cmx)
cd ../labltk; $(MAKEREC) opt
cd ../camltk; $(MAKEREC) opt
$(CAMLOPTLIBR) -o $(LIBNAME).cmxa -I ../labltk -I ../camltk \
- $(TKOBJS:.cmo=.cmx) -cclib -l$(LIBNAME) $(TK_LINK)
+ $(TKOBJS:.cmo=.cmx) -cclib -l$(LIBNAME) -cclib "$(TK_LINK)"
# $(LIBNAME)top$(EXE) : $(TOPDEPS) $(LIBNAME).cma ../support/lib$(LIBNAME).a
# $(CAMLC) -linkall -o $(LIBNAME)top$(EXE) -I ../support \
@@ -49,11 +49,9 @@ $(LIBNAME).cmxa: $(SUPPORT:.cmo=.cmx)
# @echo 'exec $(INSTALLDIR)/$(LIBNAME)top$(EXE) -I $(INSTALLDIR) $$*' >> $@
install: all
- @if not exist $(INSTALLDIR) mkdir $(INSTALLDIR)
+ mkdir -p $(INSTALLDIR)
cp $(LIBNAME).cma $(INSTALLDIR)
-# @if test -d $(BINDIR); then : ; else mkdir $(BINDIR); fi
-# cp $(LIBNAME) $(BINDIR)
installopt: opt
- @if not exist $(INSTALLDIR) mkdir $(INSTALLDIR)
- cp $(LIBNAME).cmxa $(LIBNAME).lib $(INSTALLDIR)
+ mkdir -p $(INSTALLDIR)
+ cp $(LIBNAME).cmxa $(LIBNAME).$(A) $(INSTALLDIR)
diff --git a/otherlibs/labltk/support/Makefile.common.nt b/otherlibs/labltk/support/Makefile.common.nt
index f2f22110c..98cb7022b 100644
--- a/otherlibs/labltk/support/Makefile.common.nt
+++ b/otherlibs/labltk/support/Makefile.common.nt
@@ -1,25 +1,24 @@
## Paths are relative to subdirectories
## Where you compiled Objective Caml
TOPDIR=../../..
-TOPDIRNT=..\..\..
## Where to find OCaml binaries
-EXEDIR=$(TOPDIRNT)
+EXEDIR=$(TOPDIR)
## Path to the otherlibs subdirectory
OTHERS=../..
LIBNAME=mltk
-!include $(TOPDIRNT)\config\Makefile.nt
+include $(TOPDIR)/config/Makefile
-INSTALLDIR=$(LIBDIR)\$(LIBNAME)
+INSTALLDIR=$(LIBDIR)/$(LIBNAME)
TKLINKOPT=$(STATIC)
## Tools from the Objective Caml distribution
-CAMLRUN=$(EXEDIR)\boot\ocamlrun
+CAMLRUN=$(EXEDIR)/boot/ocamlrun
CAMLC=$(CAMLRUN) $(TOPDIR)/ocamlc -I $(TOPDIR)/stdlib
CAMLCOMP=$(CAMLC) -labels -c
-CAMLYACC=$(EXEDIR)\boot\ocamlyacc -v
+CAMLYACC=$(EXEDIR)/boot/ocamlyacc -v
CAMLLEX=$(CAMLRUN) $(TOPDIR)/boot/ocamllex
CAMLLIBR=$(CAMLC) -a
CAMLDEP=$(CAMLRUN) $(TOPDIR)/tools/ocamldep
diff --git a/otherlibs/labltk/support/Makefile.nt b/otherlibs/labltk/support/Makefile.nt
index acc3071dc..d7cc02248 100644
--- a/otherlibs/labltk/support/Makefile.nt
+++ b/otherlibs/labltk/support/Makefile.nt
@@ -1,28 +1,29 @@
-!include Makefile.common.nt
+include Makefile.common.nt
all: support.cmo rawwidget.cmo widget.cmo protocol.cmo \
textvariable.cmo timer.cmo fileevent.cmo camltkwrap.cmo \
- dll$(LIBNAME).dll lib$(LIBNAME).lib
+ dll$(LIBNAME).dll lib$(LIBNAME).$(A)
opt: support.cmx rawwidget.cmx widget.cmx protocol.cmx \
textvariable.cmx timer.cmx fileevent.cmx camltkwrap.cmx \
- lib$(LIBNAME).lib
+ lib$(LIBNAME).$(A)
-COBJS=cltkCaml.obj cltkUtf.obj cltkEval.obj cltkEvent.obj cltkFile.obj \
- cltkMain.obj cltkMisc.obj cltkTimer.obj cltkVar.obj cltkWait.obj cltkImg.obj
+COBJS=cltkCaml.o cltkUtf.o cltkEval.o cltkEvent.o cltkFile.o \
+ cltkMain.o cltkMisc.o cltkTimer.o cltkVar.o cltkWait.o cltkImg.o
+DCOBJS=$(COBJS:.o=.$(DO))
+SCOBJS=$(COBJS:.o=.$(SO))
-CCFLAGS=-I..\..\..\byterun -I..\..\win32unix $(TK_DEFS)
+CCFLAGS=-I../../../byterun -I../../win32unix $(TK_DEFS)
COMPFLAGS=-I $(OTHERS)/win32unix
-dll$(LIBNAME).dll : $(COBJS:.obj=.dobj)
- link /nologo /dll /out:dll$(LIBNAME).dll /implib:dll$(LIBNAME).lib \
- $(COBJS:.obj=.dobj) ..\..\..\byterun\ocamlrun.lib \
- $(TK_LINK) wsock32.lib
+dll$(LIBNAME).dll : $(DCOBJS)
+ $(call MKDLL,dll$(LIBNAME).dll,dll$(LIBNAME).$(A),\
+ $(DCOBJS) ../../../byterun/ocamlrun.$(A) \
+ $(TK_LINK) $(call SYSLIB,wsock32))
-lib$(LIBNAME).lib : $(COBJS:.obj=.sobj)
- rm -f lib$(LIBNAME).lib
- $(MKLIB)lib$(LIBNAME).lib $(COBJS:.obj=.sobj)
+lib$(LIBNAME).$(A) : $(SCOBJS)
+ $(call MKLIB,lib$(LIBNAME).$(A), $(SCOBJS))
PUB=fileevent.cmi fileevent.mli \
protocol.cmi protocol.mli \
@@ -31,17 +32,17 @@ PUB=fileevent.cmi fileevent.mli \
rawwidget.cmi rawwidget.mli \
widget.cmi widget.mli
-install: dll$(LIBNAME).dll lib$(LIBNAME).lib $(PUB)
- @if not exist $(INSTALLDIR) mkdir $(INSTALLDIR)
+install:
+ mkdir -p $(INSTALLDIR)
cp $(PUB) $(INSTALLDIR)
- cp dll$(LIBNAME).dll dll$(LIBNAME).lib lib$(LIBNAME).lib $(INSTALLDIR)
- echo $(INSTALLDIR)>> $(LIBDIR)\ld.conf
+ cp dll$(LIBNAME).dll dll$(LIBNAME).$(A) lib$(LIBNAME).$(A) $(INSTALLDIR)
+ echo $(INSTALLDIR) >> $(LIBDIR)/ld.conf
clean :
- rm -f *.cm* *.dobj *.sobj *.dll *.lib *.exp *.obj
+ rm -f *.cm* *.$(O) *.dll *.$(A) *.exp
.SUFFIXES :
-.SUFFIXES : .mli .ml .cmi .cmo .cmx .mlp .c .dobj .sobj
+.SUFFIXES : .mli .ml .cmi .cmo .cmx .mlp .c .$(DO) .$(SO)
.mli.cmi:
$(CAMLCOMP) $(COMPFLAGS) $<
@@ -52,17 +53,17 @@ clean :
.ml.cmx:
$(CAMLOPT) -c $(COMPFLAGS) $<
-.c.dobj:
+.c.$(DO):
$(BYTECC) $(DLLCCCOMPOPTS) $(CCFLAGS) -c $<
- mv $*.obj $*.dobj
+ mv $*.$(O) $*.$(DO)
-.c.sobj:
+.c.$(SO):
$(BYTECC) $(BYTECCCOMPOPTS) $(CCFLAGS) -c $<
- mv $*.obj $*.sobj
+ mv $*.$(O) $*.$(SO)
depend:
$(CAMLDEP) *.mli *.ml > .depend
-$(COBJS): camltk.h
+$(DCOBJS) $(SCOBJS): camltk.h
-!include .depend
+include .depend
diff --git a/otherlibs/labltk/tkanim/Makefile.nt b/otherlibs/labltk/tkanim/Makefile.nt
index 8f2291133..11039bcbc 100644
--- a/otherlibs/labltk/tkanim/Makefile.nt
+++ b/otherlibs/labltk/tkanim/Makefile.nt
@@ -1,33 +1,34 @@
-!include ..\support\Makefile.common.nt
+include ../support/Makefile.common.nt
-CCFLAGS=-I..\support -I..\..\..\byterun $(TK_DEFS)
+CCFLAGS=-I../support -I../../../byterun $(TK_DEFS)
COMPFLAGS=-I $(OTHERS)/win32unix -I ../support -I ../camltk
-all: tkanim.cma dlltkanim.dll libtkanim.lib
-opt: tkanim.cmxa libtkanim.lib
+all: tkanim.cma dlltkanim.dll libtkanim.$(A)
+opt: tkanim.cmxa libtkanim.$(A)
example: gifanimtest.exe
OBJS=tkanim.cmo
COBJS= cltkaniminit.obj tkAnimGIF.obj
+DCOBJS=$(COBJS:.obj=.$(DO))
+SCOBJS=$(COBJS:.obj=.$(SO))
tkanim.cma: $(OBJS)
$(CAMLLIBR) -o tkanim.cma $(OBJS) \
- -dllib -ltkanim -cclib -ltkanim $(TK_LINK)
+ -dllib -ltkanim -cclib -ltkanim -cclib "$(TK_LINK)"
tkanim.cmxa: $(OBJS:.cmo=.cmx)
$(CAMLOPTLIBR) -o tkanim.cmxa $(OBJS:.cmo=.cmx) \
- -cclib -ltkanim $(TK_LINK)
+ -cclib -ltkanim -cclib "$(TK_LINK)"
-libtkanim.lib: $(COBJS:.obj=.sobj)
- rm -f libtkanim.lib
- $(MKLIB)libtkanim.lib $(COBJS:.obj=.sobj)
+libtkanim.$(A): $(SCOBJS)
+ $(call MKLIB,libtkanim.$(A), $(SCOBJS))
-dlltkanim.dll: $(COBJS:.obj=.dobj)
- link /nologo /dll /out:dlltkanim.dll /implib:tmp.lib \
- $(COBJS:.obj=.dobj) ..\support\dll$(LIBNAME).lib \
- ..\..\..\byterun\ocamlrun.lib \
- $(TK_LINK) wsock32.lib
+dlltkanim.dll: $(DCOBJS)
+ $(call MKDLL,dlltkanim.dll,tmp.$(A), \
+ $(DCOBJS) ../support/dll$(LIBNAME).$(A) \
+ ../../../byterun/ocamlrun.$(A) \
+ $(TK_LINK) $(call SYSLIB,wsock32))
rm tmp.*
gifanimtest.exe: all gifanimtest.cmo
@@ -38,14 +39,14 @@ gifanimtest.exe: all gifanimtest.cmo
# -L. -ltkanim $(LIBS)
clean:
- rm -f *.cm* *.obj *.dobj *.sobj *.lib *.dll gifanimtest.exe
+ rm -f *.cm* *.$(O) *.$(A) *.dll gifanimtest.exe
-$(OBJS) $(OBJS:.cmo=.cmi): ..\lib\$(LIBNAME).cma
+$(OBJS) $(OBJS:.cmo=.cmi): ../lib/$(LIBNAME).cma
-$(OBJS:.cmo=.cmx): ..\lib\$(LIBNAME).cmxa
+$(OBJS:.cmo=.cmx): ../lib/$(LIBNAME).cmxa
.SUFFIXES :
-.SUFFIXES : .mli .ml .cmi .cmo .mlp .cmx .c .dobj .sobj
+.SUFFIXES : .mli .ml .cmi .cmo .mlp .cmx .c .$(DO) .$(SO)
.mli.cmi:
$(CAMLCOMP) $(COMPFLAGS) $<
@@ -56,21 +57,21 @@ $(OBJS:.cmo=.cmx): ..\lib\$(LIBNAME).cmxa
.ml.cmx:
$(CAMLOPT) -c $(COMPFLAGS) $<
-.c.dobj:
+.c.$(DO):
$(BYTECC) $(DLLCCCOMPOPTS) $(CCFLAGS) -c $<
- mv $*.obj $*.dobj
+ mv $*.$(O) $*.$(DO)
-.c.sobj:
+.c.$(SO):
$(BYTECC) $(BYTECCCOMPOPTS) $(CCFLAGS) -c $<
- mv $*.obj $*.sobj
+ mv $*.$(O) $*.$(SO)
install: tkanim.cma
- cp tkanim.cma *.cmi *.mli libtkanim.lib dlltkanim.dll $(INSTALLDIR)
+ cp tkanim.cma *.cmi *.mli libtkanim.$(A) dlltkanim.dll $(INSTALLDIR)
installopt: tkanim.cmxa
- cp tkanim.cmxa $(INSTALLDIR)
+ cp tkanim.cmxa tkanim.$(A) $(INSTALLDIR)
depend: tkanim.ml
$(CAMLDEP) *.mli *.ml > .depend
-!include .depend
+include .depend
diff --git a/otherlibs/num/Makefile.nt b/otherlibs/num/Makefile.nt
index 67cf96044..e4a9a654a 100644
--- a/otherlibs/num/Makefile.nt
+++ b/otherlibs/num/Makefile.nt
@@ -15,24 +15,28 @@
# Makefile for the "num" (exact rational arithmetic) library
-!include ..\..\config\Makefile.nt
+include ../../config/Makefile
# Compilation options
CC=$(BYTECC)
-CFLAGS=-O -I.\bignum\h -I..\..\byterun
-CAMLC=..\..\boot\ocamlrun ..\..\ocamlc -I ..\..\boot -w s
-CAMLOPT=..\..\boot\ocamlrun ..\..\ocamlopt -I ..\..\stdlib -w s
+CFLAGS=-O -I./bignum/h -I../../byterun
+CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../boot -w s
+CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib -w s
CAMLOBJS=int_misc.cmo string_misc.cmo nat.cmo big_int.cmo arith_flags.cmo \
ratio.cmo num.cmo arith_status.cmo
CMIFILES=big_int.cmi nat.cmi num.cmi ratio.cmi arith_status.cmi
-COBJS=nat_stubs.obj
+DCOBJS=nat_stubs.$(DO)
+SCOBJS=nat_stubs.$(SO)
+BIGNUM_SOBJS=bignum/o/KerN.$(SO) bignum/o/bnInit.$(SO) \
+ bignum/o/bnMult.$(SO) bignum/o/bnDivide.$(SO) \
+ bignum/o/bnCmp.$(SO) bignum/o/bzf.$(SO) bignum/o/bz.$(SO)
-all: dllnums.dll libnums.lib nums.cma $(CMIFILES)
+all: dllnums.dll libnums.$(A) nums.cma $(CMIFILES)
-allopt: libnums.lib nums.cmxa $(CMIFILES)
+allopt: libnums.$(A) nums.cmxa $(CMIFILES)
nums.cma: $(CAMLOBJS)
$(CAMLC) -a -o nums.cma $(CAMLOBJS) -dllib -lnums -cclib -lnums
@@ -40,36 +44,36 @@ nums.cma: $(CAMLOBJS)
nums.cmxa: $(CAMLOBJS:.cmo=.cmx)
$(CAMLOPT) -a -o nums.cmxa $(CAMLOBJS:.cmo=.cmx) -cclib -lnums
-dllnums.dll: bignum\dbignum.lib $(COBJS:.obj=.dobj)
- link /nologo /dll /out:dllnums.dll /implib:tmp.lib \
- bignum\dbignum.lib $(COBJS:.obj=.dobj) ..\..\byterun\ocamlrun.lib
+dllnums.dll: bignum/dbignum.$(A) $(DCOBJS)
+ $(call MKDLL,dllnums.dll,tmp.$(A),\
+ $(DCOBJS) bignum/dbignum.$(A) ../../byterun/ocamlrun.$(A))
rm tmp.*
-libnums.lib: bignum\sbignum.lib $(COBJS:.obj=.sobj)
- $(MKLIB)libnums.lib bignum\sbignum.lib $(COBJS:.obj=.sobj)
+libnums.$(A): bignum/sbignum.$(A) $(SCOBJS)
+ $(call MKLIB,libnums.$(A),$(SCOBJS) $(BIGNUM_SOBJS))
-bignum\dbignum.lib bignum\sbignum.lib:
- cd bignum & $(MAKEREC)
+bignum/dbignum.$(A) bignum/sbignum.$(A):
+ cd bignum ; $(MAKEREC)
-$(CAMLOBJS:.cmo=.cmx): ..\..\ocamlopt
+$(CAMLOBJS:.cmo=.cmx): ../../ocamlopt
install:
- cp dllnums.dll $(LIBDIR)\dllnums.dll
- cp libnums.lib $(LIBDIR)\libnums.lib
+ cp dllnums.dll $(LIBDIR)/dllnums.dll
+ cp libnums.$(A) $(LIBDIR)/libnums.$(A)
cp nums.cma $(CMIFILES) $(LIBDIR)
installopt:
- cp $(CAMLOBJS:.cmo=.cmx) nums.cmxa nums.lib $(LIBDIR)
+ cp $(CAMLOBJS:.cmo=.cmx) nums.cmxa nums.$(A) $(LIBDIR)
partialclean:
rm -f *.cm*
clean: partialclean
- rm -f *.dll *.lib *.dobj *.sobj
- cd bignum & $(MAKEREC) scratch
- cd test & $(MAKEREC) clean
+ rm -f *.dll *.$(A) *.$(O)
+ cd bignum ; $(MAKEREC) scratch
+ cd test ; $(MAKEREC) clean
-.SUFFIXES: .ml .mli .cmi .cmo .cmx .dobj .sobj
+.SUFFIXES: .ml .mli .cmi .cmo .cmx .$(DO) .$(SO)
.mli.cmi:
$(CAMLC) -c $(COMPFLAGS) $<
@@ -80,18 +84,18 @@ clean: partialclean
.ml.cmx:
$(CAMLOPT) -c $(COMPFLAGS) $<
-.c.dobj:
+.c.$(DO):
$(BYTECC) $(DLLCCCOMPOPTS) $(CFLAGS) -c $<
- mv $*.obj $*.dobj
+ mv $*.$(O) $*.$(DO)
-.c.sobj:
+.c.$(SO):
$(BYTECC) $(BYTECCCOMPOPTS) $(CFLAGS) -c $<
- mv $*.obj $*.sobj
+ mv $*.$(O) $*.$(SO)
-nat_stubs.obj: nat.h
+nat_stubs.$(O): nat.h
depend:
- sed -e "s/\.o/.dobj/g" .depend > .depend.nt
- sed -e "s/\.o/.sobj/g" .depend >> .depend.nt
+ sed -e 's/\.o/.$(DO)/g' .depend > .depend.nt
+ sed -e 's/\.o/.$(SO)/g' .depend >> .depend.nt
-!include .depend.nt
+include .depend.nt
diff --git a/otherlibs/num/bignum/Makefile.nt b/otherlibs/num/bignum/Makefile.nt
index c29b1b997..10e67b82c 100644
--- a/otherlibs/num/bignum/Makefile.nt
+++ b/otherlibs/num/bignum/Makefile.nt
@@ -1,87 +1,87 @@
-!include ..\..\..\config\Makefile.nt
+include ../../../config/Makefile
CC = $(BYTECC)
-CFLAGS = -c -I.\h -DCAML_LIGHT
-KERNH = h\BigNum.h
-OBJS = o\KerN.obj o\bnInit.obj o\bnMult.obj o\bnDivide.obj \
- o\bnCmp.obj o\bzf.obj o\bz.obj
+CFLAGS = -c -I./h -DCAML_LIGHT
+KERNH = h/BigNum.h
+OBJS = o/KerN.$(O) o/bnInit.$(O) o/bnMult.$(O) o/bnDivide.$(O) \
+ o/bnCmp.$(O) o/bzf.$(O) o/bz.$(O)
-all: dbignum.lib sbignum.lib
+all: dbignum.$(A) sbignum.$(A)
scratch:
- rm -f *.lib o/*.dobj o/*.sobj
+ rm -f *.$(A) o/*.$(O)
# DLL
-dbignum.lib: $(OBJS:.obj=.dobj)
- $(MKLIB)dbignum.lib $(OBJS:.obj=.dobj)
+dbignum.$(A): $(OBJS:.$(O)=.$(DO))
+ $(call MKLIB,dbignum.$(A),$(OBJS:.$(O)=.$(DO)))
-o\KerN.dobj: c\KerN.c
- $(CC) $(CFLAGS) $(DLLCCCOMPOPTS) c\KerN.c
- mv KerN.obj o\KerN.dobj
+o/KerN.$(DO): c/KerN.c
+ $(CC) $(CFLAGS) $(DLLCCCOMPOPTS) c/KerN.c
+ mv KerN.$(O) o/KerN.$(DO)
-o\bnInit.dobj: c\bn\bnInit.c $(KERNH)
- $(CC) $(CFLAGS) $(DLLCCCOMPOPTS) c\bn\bnInit.c
- mv bnInit.obj o\bnInit.dobj
+o/bnInit.$(DO): c/bn/bnInit.c $(KERNH)
+ $(CC) $(CFLAGS) $(DLLCCCOMPOPTS) c/bn/bnInit.c
+ mv bnInit.$(O) o/bnInit.$(DO)
-o\bnMult.dobj: c\bn\bnMult.c $(KERNH)
- $(CC) $(CFLAGS) $(DLLCCCOMPOPTS) c\bn\bnMult.c
- mv bnMult.obj o\bnMult.dobj
+o/bnMult.$(DO): c/bn/bnMult.c $(KERNH)
+ $(CC) $(CFLAGS) $(DLLCCCOMPOPTS) c/bn/bnMult.c
+ mv bnMult.$(O) o/bnMult.$(DO)
-o\bnDivide.dobj: c\bn\bnDivide.c $(KERNH)
- $(CC) $(CFLAGS) $(DLLCCCOMPOPTS) c\bn\bnDivide.c
- mv bnDivide.obj o\bnDivide.dobj
+o/bnDivide.$(DO): c/bn/bnDivide.c $(KERNH)
+ $(CC) $(CFLAGS) $(DLLCCCOMPOPTS) c/bn/bnDivide.c
+ mv bnDivide.$(O) o/bnDivide.$(DO)
-o\bnCmp.dobj: c\bn\bnCmp.c $(KERNH)
- $(CC) $(CFLAGS) $(DLLCCCOMPOPTS) c\bn\bnCmp.c
- mv bnCmp.obj o\bnCmp.dobj
+o/bnCmp.$(DO): c/bn/bnCmp.c $(KERNH)
+ $(CC) $(CFLAGS) $(DLLCCCOMPOPTS) c/bn/bnCmp.c
+ mv bnCmp.$(O) o/bnCmp.$(DO)
-o\bz.dobj: c\bz.c h/BigZ.h $(KERNH)
- $(CC) $(CFLAGS) $(DLLCCCOMPOPTS) c\bz.c
- mv bz.obj o\bz.dobj
+o/bz.$(DO): c/bz.c h/BigZ.h $(KERNH)
+ $(CC) $(CFLAGS) $(DLLCCCOMPOPTS) c/bz.c
+ mv bz.$(O) o/bz.$(DO)
-o\br.dobj: c\br.c h/BigR.h h/BigZ.h $(KERNH)
- $(CC) $(CFLAGS) $(DLLCCCOMPOPTS) c\br.c
- mv br.obj o\br.dobj
+o/br.$(DO): c/br.c h/BigR.h h/BigZ.h $(KERNH)
+ $(CC) $(CFLAGS) $(DLLCCCOMPOPTS) c/br.c
+ mv br.$(O) o/br.$(DO)
-o\bzf.dobj: c\bzf.c h/BigZ.h $(KERNH)
- $(CC) $(CFLAGS) $(DLLCCCOMPOPTS) c\bzf.c
- mv bzf.obj o\bzf.dobj
+o/bzf.$(DO): c/bzf.c h/BigZ.h $(KERNH)
+ $(CC) $(CFLAGS) $(DLLCCCOMPOPTS) c/bzf.c
+ mv bzf.$(O) o/bzf.$(DO)
# Static
-sbignum.lib: $(OBJS:.obj=.sobj)
- $(MKLIB)sbignum.lib $(OBJS:.obj=.sobj)
+sbignum.$(A): $(OBJS:.$(O)=.$(SO))
+ $(call MKLIB,sbignum.$(A),$(OBJS:.$(O)=.$(SO)))
-o\KerN.sobj: c\KerN.c
- $(CC) $(CFLAGS) $(BYTECCCOMPOPTS) c\KerN.c
- mv KerN.obj o\KerN.sobj
+o/KerN.$(SO): c/KerN.c
+ $(CC) $(CFLAGS) $(BYTECCCOMPOPTS) c/KerN.c
+ mv KerN.$(O) o/KerN.$(SO)
-o\bnInit.sobj: c\bn\bnInit.c $(KERNH)
- $(CC) $(CFLAGS) $(BYTECCCOMPOPTS) c\bn\bnInit.c
- mv bnInit.obj o\bnInit.sobj
+o/bnInit.$(SO): c/bn/bnInit.c $(KERNH)
+ $(CC) $(CFLAGS) $(BYTECCCOMPOPTS) c/bn/bnInit.c
+ mv bnInit.$(O) o/bnInit.$(SO)
-o\bnMult.sobj: c\bn\bnMult.c $(KERNH)
- $(CC) $(CFLAGS) $(BYTECCCOMPOPTS) c\bn\bnMult.c
- mv bnMult.obj o\bnMult.sobj
+o/bnMult.$(SO): c/bn/bnMult.c $(KERNH)
+ $(CC) $(CFLAGS) $(BYTECCCOMPOPTS) c/bn/bnMult.c
+ mv bnMult.$(O) o/bnMult.$(SO)
-o\bnDivide.sobj: c\bn\bnDivide.c $(KERNH)
- $(CC) $(CFLAGS) $(BYTECCCOMPOPTS) c\bn\bnDivide.c
- mv bnDivide.obj o\bnDivide.sobj
+o/bnDivide.$(SO): c/bn/bnDivide.c $(KERNH)
+ $(CC) $(CFLAGS) $(BYTECCCOMPOPTS) c/bn/bnDivide.c
+ mv bnDivide.$(O) o/bnDivide.$(SO)
-o\bnCmp.sobj: c\bn\bnCmp.c $(KERNH)
- $(CC) $(CFLAGS) $(BYTECCCOMPOPTS) c\bn\bnCmp.c
- mv bnCmp.obj o\bnCmp.sobj
+o/bnCmp.$(SO): c/bn/bnCmp.c $(KERNH)
+ $(CC) $(CFLAGS) $(BYTECCCOMPOPTS) c/bn/bnCmp.c
+ mv bnCmp.$(O) o/bnCmp.$(SO)
-o\bz.sobj: c\bz.c h/BigZ.h $(KERNH)
- $(CC) $(CFLAGS) $(BYTECCCOMPOPTS) c\bz.c
- mv bz.obj o\bz.sobj
+o/bz.$(SO): c/bz.c h/BigZ.h $(KERNH)
+ $(CC) $(CFLAGS) $(BYTECCCOMPOPTS) c/bz.c
+ mv bz.$(O) o/bz.$(SO)
-o\br.sobj: c\br.c h/BigR.h h/BigZ.h $(KERNH)
- $(CC) $(CFLAGS) $(BYTECCCOMPOPTS) c\br.c
- mv br.obj o\br.sobj
+o/br.$(SO): c/br.c h/BigR.h h/BigZ.h $(KERNH)
+ $(CC) $(CFLAGS) $(BYTECCCOMPOPTS) c/br.c
+ mv br.$(O) o/br.$(SO)
-o\bzf.sobj: c\bzf.c h/BigZ.h $(KERNH)
- $(CC) $(CFLAGS) $(BYTECCCOMPOPTS) c\bzf.c
- mv bzf.obj o\bzf.sobj
+o/bzf.$(SO): c/bzf.c h/BigZ.h $(KERNH)
+ $(CC) $(CFLAGS) $(BYTECCCOMPOPTS) c/bzf.c
+ mv bzf.$(O) o/bzf.$(SO)
diff --git a/otherlibs/str/Makefile.nt b/otherlibs/str/Makefile.nt
index 51a52890d..4cbffc65f 100644
--- a/otherlibs/str/Makefile.nt
+++ b/otherlibs/str/Makefile.nt
@@ -15,27 +15,28 @@
# Makefile for the str library
-!include ..\..\config\Makefile.nt
+include ../../config/Makefile
# Compilation options
CC=$(BYTECC)
-CFLAGS=-I$(REGEXLIB) -I..\..\byterun
-CAMLC=..\..\boot\ocamlrun ..\..\ocamlc -I ..\..\boot
-CAMLOPT=..\..\boot\ocamlrun ..\..\ocamlopt -I ..\..\stdlib
+CFLAGS=-I$(REGEXLIB) -I../../byterun
+CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../boot
+CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib
REGEXLIB=regex-0.12
REGEXFLAGS=-DREGEX_MALLOC -DSTDC_HEADERS
-COBJS=strstubs.obj $(REGEXLIB)\regex.obj
+DCOBJS=strstubs.$(DO) $(REGEXLIB)/regex.$(DO)
+SCOBJS=strstubs.$(SO) $(REGEXLIB)/regex.$(SO)
-all: dllstr.dll libstr.lib str.cmi str.cma
+all: dllstr.dll libstr.$(A) str.cmi str.cma
-allopt: libstr.lib str.cmi str.cmxa
+allopt: libstr.$(A) str.cmi str.cmxa
-dllstr.dll: $(COBJS:.obj=.dobj)
- link /nologo /dll /out:dllstr.dll /implib:tmp.lib $(COBJS:.obj=.dobj) ..\..\byterun\ocamlrun.lib
+dllstr.dll: $(DCOBJS)
+ $(call MKDLL,dllstr.dll,tmp.$(A),$(DCOBJS) ../../byterun/ocamlrun.$(A))
rm tmp.*
-libstr.lib: $(COBJS:.obj=.sobj)
- $(MKLIB)libstr.lib $(COBJS:.obj=.sobj)
+libstr.$(A): $(SCOBJS)
+ $(call MKLIB,libstr.$(A),$(SCOBJS))
str.cma: str.cmo
$(CAMLC) -a -o str.cma str.cmo -dllib -lstr -cclib -lstr
@@ -43,32 +44,32 @@ str.cma: str.cmo
str.cmxa: str.cmx
$(CAMLOPT) -a -o str.cmxa str.cmx -cclib -lstr
-$(REGEXLIB)\regex.dobj: $(REGEXLIB)\regex.c $(REGEXLIB)\regex.h
- cd $(REGEXLIB) & $(CC) $(REGEXFLAGS) $(DLLCCCOMPOPTS) -c regex.c
- mv $(REGEXLIB)\regex.obj $(REGEXLIB)\regex.dobj
+$(REGEXLIB)/regex.$(DO): $(REGEXLIB)/regex.c $(REGEXLIB)/regex.h
+ cd $(REGEXLIB); $(CC) $(REGEXFLAGS) $(DLLCCCOMPOPTS) -c regex.c
+ mv $(REGEXLIB)/regex.$(O) $(REGEXLIB)/regex.$(DO)
-$(REGEXLIB)\regex.sobj: $(REGEXLIB)\regex.c $(REGEXLIB)\regex.h
- cd $(REGEXLIB) & $(CC) $(REGEXFLAGS) $(BYTECCCOMPOPTS) -c regex.c
- mv $(REGEXLIB)\regex.obj $(REGEXLIB)\regex.sobj
+$(REGEXLIB)/regex.$(SO): $(REGEXLIB)/regex.c $(REGEXLIB)/regex.h
+ cd $(REGEXLIB); $(CC) $(REGEXFLAGS) $(BYTECCCOMPOPTS) -c regex.c
+ mv $(REGEXLIB)/regex.$(O) $(REGEXLIB)/regex.$(SO)
-str.cmx: ..\..\ocamlopt
+str.cmx: ../../ocamlopt
partialclean:
rm -f *.cm*
clean: partialclean
- rm -f *.lib *.dll *.dobj *.sobj
- rm -f $(REGEXLIB)/*.dobj $(REGEXLIB)/*.sobj
+ rm -f *.$(A) *.dll *.$(O) *.$(SO)
+ rm -f $(REGEXLIB)/*.$(O)
install:
- cp dllstr.dll $(LIBDIR)\dllstr.dll
- cp libstr.lib $(LIBDIR)\libstr.lib
+ cp dllstr.dll $(LIBDIR)/dllstr.dll
+ cp libstr.$(A) $(LIBDIR)/libstr.$(A)
cp str.cma str.cmi $(LIBDIR)
installopt:
- cp str.cmx str.cmxa str.lib $(LIBDIR)
+ cp str.cmx str.cmxa str.$(A) $(LIBDIR)
-.SUFFIXES: .ml .mli .cmo .cmi .cmx .dobj .sobj
+.SUFFIXES: .ml .mli .cmo .cmi .cmx .$(DO) .$(SO)
.mli.cmi:
$(CAMLC) -c $(COMPFLAGS) $<
@@ -79,13 +80,13 @@ installopt:
.ml.cmx:
$(CAMLOPT) -c $(COMPFLAGS) $<
-.c.dobj:
+.c.$(DO):
$(BYTECC) $(DLLCCCOMPOPTS) $(CFLAGS) -c $<
- mv $*.obj $*.dobj
+ mv $*.$(O) $*.$(DO)
-.c.sobj:
+.c.$(SO):
$(BYTECC) $(BYTECCCOMPOPTS) $(CFLAGS) -c $<
- mv $*.obj $*.sobj
+ mv $*.$(O) $*.$(SO)
depend:
diff --git a/otherlibs/systhreads/Makefile.nt b/otherlibs/systhreads/Makefile.nt
index 3c31df890..810e30553 100644
--- a/otherlibs/systhreads/Makefile.nt
+++ b/otherlibs/systhreads/Makefile.nt
@@ -13,44 +13,41 @@
# $Id$
-include ../../config/Makefile.nt
+include ../../config/Makefile
# Compilation options
-CAMLC=..\..\boot\ocamlrun ..\..\ocamlc -I ..\..\stdlib -I ..\win32unix
-CAMLOPT=..\..\boot\ocamlrun ..\..\ocamlopt -I ..\..\stdlib -I ..\win32unix
+CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../stdlib -I ../win32unix
+CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib -I ../win32unix
THREAD_OBJS=thread.cmo mutex.cmo condition.cmo event.cmo threadUnix.cmo
GENFILES=thread.ml
-all: dllthreads.dll libthreads.lib threads.cma
+all: dllthreads.dll libthreads.$(A) threads.cma
-allopt: libthreadsnat.lib threads.cmxa
+allopt: libthreadsnat.$(A) threads.cmxa
-dllthreads.dll: win32_b.dobj
- link /nologo /dll /out:dllthreads.dll /implib:tmp.lib \
- win32_b.dobj ..\..\byterun\ocamlrun.lib
+dllthreads.dll: win32_b.$(DO)
+ $(call MKDLL,dllthreads.dll,tmp.lib,win32_b.$(DO) ../../byterun/ocamlrun.$(A))
rm tmp.*
-libthreads.lib: win32_b.sobj
- rm -f libthreads.lib
- $(MKLIB)libthreads.lib win32_b.sobj
+libthreads.$(A): win32_b.$(SO)
+ $(call MKLIB,libthreads.$(A),win32_b.$(SO))
-win32_b.dobj: win32.c
- $(BYTECC) -I..\..\byterun $(DLLCCCOMPOPTS) -c win32.c
- mv win32.obj win32_b.dobj
+win32_b.$(DO): win32.c
+ $(BYTECC) -I../../byterun $(DLLCCCOMPOPTS) -c win32.c
+ mv win32.$(O) win32_b.$(DO)
-win32_b.sobj: win32.c
- $(BYTECC) -I..\..\byterun $(BYTECCCOMPOPTS) -c win32.c
- mv win32.obj win32_b.sobj
+win32_b.$(SO): win32.c
+ $(BYTECC) -I../../byterun $(BYTECCCOMPOPTS) -c win32.c
+ mv win32.$(O) win32_b.$(SO)
-libthreadsnat.lib: win32_n.obj
- rm -f libthreadsnat.lib
- $(MKLIB)libthreadsnat.lib win32_n.obj
+libthreadsnat.$(A): win32_n.$(O)
+ $(call MKLIB,libthreadsnat.lib,win32_n.$(O))
-win32_n.obj: win32.c
- $(NATIVECC) -DNATIVE_CODE -O -I..\..\asmrun -I..\..\byterun $(NATIVECCCOMPOPTS) -c win32.c
- mv win32.obj win32_n.obj
+win32_n.$(O): win32.c
+ $(NATIVECC) -DNATIVE_CODE -O -I../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) -c win32.c
+ mv win32.$(O) win32_n.$(O)
threads.cma: $(THREAD_OBJS)
$(CAMLC) -a -o threads.cma $(THREAD_OBJS) \
@@ -60,7 +57,7 @@ threads.cmxa: $(THREAD_OBJS:.cmo=.cmx)
$(CAMLOPT) -a -o threads.cmxa $(THREAD_OBJS:.cmo=.cmx) \
-cclib -lthreadsnat
-$(THREAD_OBJS:.cmo=.cmx): ..\..\ocamlopt
+$(THREAD_OBJS:.cmo=.cmx): ../../ocamlopt
thread.ml: thread_win32.ml
cp thread_win32.ml thread.ml
@@ -69,19 +66,19 @@ partialclean:
rm -f *.cm*
clean: partialclean
- rm -f *.dll *.lib *.obj *.dobj *.sobj
+ rm -f *.dll *.$(A) *.$(O)
rm -f $(GENFILES)
install:
cp dllthreads.dll $(LIBDIR)/dllthreads.dll
- cp libthreads.lib $(LIBDIR)/libthreads.lib
- if not exist $(LIBDIR)\threads mkdir $(LIBDIR)\threads
+ cp libthreads.$(A) $(LIBDIR)/libthreads.$(A)
+ mkdir -p $(LIBDIR)/threads
cp $(THREAD_OBJS:.cmo=.cmi) threads.cma $(LIBDIR)/threads
rm -f $(LIBDIR)/threads/stdlib.cma
installopt:
- cp libthreadsnat.lib $(LIBDIR)/libthreadsnat.lib
- cp $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.lib $(LIBDIR)/threads
+ cp libthreadsnat.$(A) $(LIBDIR)/libthreadsnat.$(A)
+ cp $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.$(A) $(LIBDIR)/threads
.SUFFIXES: .ml .mli .cmo .cmi .cmx
diff --git a/otherlibs/systhreads/win32.c b/otherlibs/systhreads/win32.c
index 78b73ec4d..e5d7b4503 100644
--- a/otherlibs/systhreads/win32.c
+++ b/otherlibs/systhreads/win32.c
@@ -270,7 +270,7 @@ static void caml_thread_finalize(value vthread)
/* Initialize the thread machinery */
-CAMLprim caml_thread_initialize(value unit)
+CAMLprim value caml_thread_initialize(value unit)
{
value vthread = Val_unit;
value descr;
@@ -359,7 +359,7 @@ static void caml_thread_start(caml_thread_t th)
/* The thread now stops running */
}
-CAMLprim caml_thread_new(value clos)
+CAMLprim value caml_thread_new(value clos)
{
caml_thread_t th;
value vthread = Val_unit;
@@ -427,7 +427,7 @@ CAMLprim caml_thread_new(value clos)
/* Return the current thread */
-CAMLprim caml_thread_self(value unit)
+CAMLprim value caml_thread_self(value unit)
{
if (curr_thread == NULL) invalid_argument("Thread.self: not initialized");
return curr_thread->descr;
@@ -435,14 +435,14 @@ CAMLprim caml_thread_self(value unit)
/* Return the identifier of a thread */
-CAMLprim caml_thread_id(value th)
+CAMLprim value caml_thread_id(value th)
{
return Ident(th);
}
/* Print uncaught exception and backtrace */
-CAMLprim caml_thread_uncaught_exception(value exn)
+CAMLprim value caml_thread_uncaught_exception(value exn)
{
char * msg = format_caml_exception(exn);
fprintf(stderr, "Thread %d killed on uncaught exception %s\n",
@@ -457,7 +457,7 @@ CAMLprim caml_thread_uncaught_exception(value exn)
/* Allow re-scheduling */
-CAMLprim caml_thread_yield(value unit)
+CAMLprim value caml_thread_yield(value unit)
{
enter_blocking_section();
Sleep(0);
@@ -467,7 +467,7 @@ CAMLprim caml_thread_yield(value unit)
/* Suspend the current thread until another thread terminates */
-CAMLprim caml_thread_join(value th)
+CAMLprim value caml_thread_join(value th)
{
HANDLE h;
Begin_root(th) /* prevent deallocation of handle */
@@ -505,7 +505,7 @@ static struct custom_operations caml_mutex_ops = {
custom_deserialize_default
};
-CAMLprim caml_mutex_new(value unit)
+CAMLprim value caml_mutex_new(value unit)
{
value mut;
mut = alloc_custom(&caml_mutex_ops, sizeof(HANDLE), 1, Max_mutex_number);
@@ -514,7 +514,7 @@ CAMLprim caml_mutex_new(value unit)
return mut;
}
-CAMLprim caml_mutex_lock(value mut)
+CAMLprim value caml_mutex_lock(value mut)
{
int retcode;
Begin_root(mut) /* prevent deallocation of mutex */
@@ -526,7 +526,7 @@ CAMLprim caml_mutex_lock(value mut)
return Val_unit;
}
-CAMLprim caml_mutex_unlock(value mut)
+CAMLprim value caml_mutex_unlock(value mut)
{
BOOL retcode;
Begin_root(mut) /* prevent deallocation of mutex */
@@ -538,7 +538,7 @@ CAMLprim caml_mutex_unlock(value mut)
return Val_unit;
}
-CAMLprim caml_mutex_try_lock(value mut)
+CAMLprim value caml_mutex_try_lock(value mut)
{
int retcode;
retcode = WaitForSingleObject(Mutex_val(mut), 0);
@@ -549,7 +549,7 @@ CAMLprim caml_mutex_try_lock(value mut)
/* Delay */
-CAMLprim caml_thread_delay(value val)
+CAMLprim value caml_thread_delay(value val)
{
enter_blocking_section();
Sleep((DWORD)(Double_val(val)*1000)); /* milliseconds */
@@ -588,7 +588,7 @@ static struct custom_operations caml_condition_ops = {
custom_deserialize_default
};
-CAMLprim caml_condition_new(value unit)
+CAMLprim value caml_condition_new(value unit)
{
value cond;
cond = alloc_custom(&caml_condition_ops, sizeof(struct caml_condvar),
@@ -600,7 +600,7 @@ CAMLprim caml_condition_new(value unit)
return cond;
}
-CAMLprim caml_condition_wait(value cond, value mut)
+CAMLprim value caml_condition_wait(value cond, value mut)
{
int retcode;
HANDLE m = Mutex_val(mut);
@@ -623,7 +623,7 @@ CAMLprim caml_condition_wait(value cond, value mut)
return Val_unit;
}
-CAMLprim caml_condition_signal(value cond)
+CAMLprim value caml_condition_signal(value cond)
{
HANDLE s = Condition_val(cond)->sem;
@@ -639,7 +639,7 @@ CAMLprim caml_condition_signal(value cond)
return Val_unit;
}
-CAMLprim caml_condition_broadcast(value cond)
+CAMLprim value caml_condition_broadcast(value cond)
{
HANDLE s = Condition_val(cond)->sem;
unsigned long c = Condition_val(cond)->count;
@@ -710,6 +710,6 @@ CAMLprim value caml_wait_signal(value sigs)
static void caml_wthread_error(char * msg)
{
char errmsg[1024];
- sprintf(errmsg, "%s: error code %x\n", msg, GetLastError());
+ sprintf(errmsg, "%s: error code %lx\n", msg, GetLastError());
raise_sys_error(copy_string(errmsg));
}
diff --git a/otherlibs/unix/access.c b/otherlibs/unix/access.c
index 7a7307084..6d81c2bcd 100644
--- a/otherlibs/unix/access.c
+++ b/otherlibs/unix/access.c
@@ -31,7 +31,7 @@
# else
# define R_OK 4/* test for read permission */
# define W_OK 2/* test for write permission */
-# define X_OK 4/* test for execute (search) permission */
+# define X_OK 1/* test for execute (search) permission */
# define F_OK 0/* test for presence of file */
# endif
#endif
diff --git a/otherlibs/unix/gethost.c b/otherlibs/unix/gethost.c
index 167485088..5b3252d59 100644
--- a/otherlibs/unix/gethost.c
+++ b/otherlibs/unix/gethost.c
@@ -32,8 +32,8 @@
#define NETDB_BUFFER_SIZE 10000
#ifdef _WIN32
-#define GETHOSTBYADDR_IS_REENTRANT
-#define GETHOSTBYNAME_IS_REENTRANT
+#define GETHOSTBYADDR_IS_REENTRANT 1
+#define GETHOSTBYNAME_IS_REENTRANT 1
#endif
static int entry_h_length;
@@ -112,7 +112,7 @@ CAMLprim value unix_gethostbyname(value name)
struct hostent * hp;
char * hostname;
-#if HAS_GETHOSTBYNAME_R != 0 || GETHOSTBYNAME_IS_REENTRANT
+#if HAS_GETHOSTBYNAME_R || GETHOSTBYNAME_IS_REENTRANT
hostname = stat_alloc(string_length(name) + 1);
strcpy(hostname, String_val(name));
#else
@@ -148,7 +148,7 @@ CAMLprim value unix_gethostbyname(value name)
#endif
#endif
-#if HAS_GETHOSTBYNAME_R != 0 || GETHOSTBYNAME_IS_REENTRANT
+#if HAS_GETHOSTBYNAME_R || GETHOSTBYNAME_IS_REENTRANT
stat_free(hostname);
#endif
diff --git a/otherlibs/win32graph/Makefile.nt b/otherlibs/win32graph/Makefile.nt
index 46fc80484..6a48a8fb2 100644
--- a/otherlibs/win32graph/Makefile.nt
+++ b/otherlibs/win32graph/Makefile.nt
@@ -13,62 +13,61 @@
# $Id$
-!include ../../config/Makefile.nt
+include ../../config/Makefile
# Compilation options
CC=$(BYTECC)
-CFLAGS=-I..\..\byterun
-CAMLC=..\..\boot\ocamlrun ..\..\ocamlc -I ..\..\stdlib
-CAMLOPT=..\..\boot\ocamlrun ..\..\ocamlopt -I ..\..\stdlib
+CFLAGS=-I../../byterun
+CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../stdlib
+CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib
COMPFLAGS=-warn-error A
-COBJS=open.obj draw.obj dib.obj
+COBJS=open.$(O) draw.$(O) dib.$(O)
CAMLOBJS=graphics.cmo
-WIN32LIBS=kernel32.lib gdi32.lib user32.lib
+WIN32LIBS=$(call SYSLIB,kernel32) $(call SYSLIB,gdi32) $(call SYSLIB,user32)
-all: dllgraphics.dll libgraphics.lib graphics.cma
+all: dllgraphics.dll libgraphics.$(A) graphics.cma
-allopt: libgraphics.lib graphics.cmxa
+allopt: libgraphics.$(A) graphics.cmxa
-dllgraphics.dll: $(COBJS:.obj=.dobj)
- link /nologo /dll /out:dllgraphics.dll /implib:tmp.lib \
- $(COBJS:.obj=.dobj) ..\..\byterun\ocamlrun.lib $(WIN32LIBS)
+dllgraphics.dll: $(COBJS:.$(O)=.$(DO))
+ $(call MKDLL,dllgraphics.dll,tmp.$(A),\
+ $(COBJS:.$(O)=.$(DO)) ../../byterun/ocamlrun.$(A) $(WIN32LIBS))
rm tmp.*
-libgraphics.lib: $(COBJS:.obj=.sobj)
- rm -f libgraphics.lib
- $(MKLIB)libgraphics.lib $(COBJS:.obj=.sobj)
+libgraphics.$(A): $(COBJS:.$(O)=.$(SO))
+ $(call MKLIB,libgraphics.$(A),$(COBJS:.$(O)=.$(SO)))
graphics.cma: $(CAMLOBJS)
$(CAMLC) -a -o graphics.cma $(CAMLOBJS) \
- -dllib -lgraphics -cclib -lgraphics $(WIN32LIBS)
+ -dllib -lgraphics -cclib -lgraphics -cclib "$(WIN32LIBS)"
graphics.cmxa: $(CAMLOBJS:.cmo=.cmx)
$(CAMLOPT) -a -o graphics.cmxa $(CAMLOBJS:.cmo=.cmx) \
- -cclib -lgraphics $(WIN32LIBS)
+ -cclib -lgraphics -cclib "$(WIN32LIBS)"
partialclean:
rm -f *.cm*
clean: partialclean
- rm -f *.lib *.dll *.exp *.sobj *.dobj
+ rm -f *.$(A) *.dll *.exp *.$(O)
rm -f graphics.ml graphics.mli
rm -f io.h
install:
cp dllgraphics.dll $(LIBDIR)/dllgraphics.dll
- cp libgraphics.lib $(LIBDIR)/libgraphics.lib
+ cp libgraphics.$(A) $(LIBDIR)/libgraphics.$(A)
cp graphics.cmi graphics.cma $(LIBDIR)
installopt:
- cp graphics.cmxa graphics.cmx graphics.lib $(LIBDIR)
+ cp graphics.cmxa graphics.cmx graphics.$(A) $(LIBDIR)
-graphics.ml: ..\graph\graphics.ml
- copy ..\graph\graphics.ml graphics.ml
-graphics.mli: ..\graph\graphics.mli
- copy ..\graph\graphics.mli graphics.mli
+graphics.ml: ../graph/graphics.ml
+ cp ../graph/graphics.ml graphics.ml
+graphics.mli: ../graph/graphics.mli
+ cp ../graph/graphics.mli graphics.mli
-.SUFFIXES: .ml .mli .cmo .cmi .cmx .dobj .sobj
+.SUFFIXES: .ml .mli .cmo .cmi .cmx .$(DO) .$(SO)
.mli.cmi:
$(CAMLC) -c $(COMPFLAGS) $<
@@ -79,17 +78,17 @@ graphics.mli: ..\graph\graphics.mli
.ml.cmx:
$(CAMLOPT) -c $(COMPFLAGS) $<
-.c.dobj:
+.c.$(DO):
$(BYTECC) $(DLLCCCOMPOPTS) $(CFLAGS) -c $<
- mv $*.obj $*.dobj
+ mv $*.$(O) $*.$(DO)
-.c.sobj:
+.c.$(SO):
$(BYTECC) $(BYTECCCOMPOPTS) $(CFLAGS) -c $<
- mv $*.obj $*.sobj
+ mv $*.$(O) $*.$(SO)
depend:
graphics.cmo: graphics.cmi
graphics.cmx: graphics.cmi
-draw.sobj draw.dobj: libgraph.h
-open.sobj open.dobj: libgraph.h
+draw.$(SO) draw.$(DO): libgraph.h
+open.$(SO) open.$(DO): libgraph.h
diff --git a/otherlibs/win32unix/Makefile.nt b/otherlibs/win32unix/Makefile.nt
index 95f9e1875..edb8edc14 100644
--- a/otherlibs/win32unix/Makefile.nt
+++ b/otherlibs/win32unix/Makefile.nt
@@ -13,85 +13,85 @@
# $Id$
-!include ../../config/Makefile.nt
+include ../../config/Makefile
# Compilation options
CC=$(BYTECC)
-CFLAGS=-I..\..\byterun -I..\unix
-CAMLC=..\..\boot\ocamlrun ..\..\ocamlc -I ..\..\stdlib
-CAMLOPT=..\..\boot\ocamlrun ..\..\ocamlopt -I ..\..\stdlib
+CFLAGS=-I../../byterun -I../unix
+CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../stdlib
+CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib
COMPFLAGS=-warn-error A
# Files in this directory
-WIN_OBJS = accept.obj bind.obj channels.obj close.obj \
- close_on.obj connect.obj createprocess.obj dup.obj dup2.obj errmsg.obj \
- getpeername.obj getpid.obj getsockname.obj gettimeofday.obj \
- link.obj listen.obj lockf.obj lseek.obj \
- mkdir.obj open.obj pipe.obj read.obj rename.obj \
- select.obj sendrecv.obj \
- shutdown.obj sleep.obj socket.obj sockopt.obj startup.obj stat.obj \
- system.obj unixsupport.obj windir.obj winwait.obj write.obj
-
-# Files from the ..\unix directory
+WIN_FILES = accept.c bind.c channels.c close.c \
+ close_on.c connect.c createprocess.c dup.c dup2.c errmsg.c \
+ getpeername.c getpid.c getsockname.c gettimeofday.c \
+ link.c listen.c lockf.c lseek.c \
+ mkdir.c open.c pipe.c read.c rename.c \
+ select.c sendrecv.c \
+ shutdown.c sleep.c socket.c sockopt.c startup.c stat.c \
+ system.c unixsupport.c windir.c winwait.c write.c
+
+# Files from the ../unix directory
UNIX_FILES = access.c addrofstr.c chdir.c chmod.c cst2constr.c \
cstringv.c envir.c execv.c execve.c execvp.c \
exit.c getcwd.c gethost.c gethostname.c getproto.c \
getserv.c gmtime.c putenv.c rmdir.c \
socketaddr.c strofaddr.c time.c unlink.c utimes.c
-UNIX_OBJS = $(UNIX_FILES:.c=.obj)
+ALL_FILES=$(WIN_FILES) $(UNIX_FILES)
-C_OBJS=$(WIN_OBJS) $(UNIX_OBJS)
+DOBJS=$(ALL_FILES:.c=.$(DO))
+SOBJS=$(ALL_FILES:.c=.$(SO))
+
+LIBS=$(call SYSLIB,wsock32)
CAML_OBJS=unix.cmo unixLabels.cmo
CAMLOPT_OBJS=$(CAML_OBJS:.cmo=.cmx)
-all: dllunix.dll libunix.lib unix.cma
+all: dllunix.dll libunix.$(A) unix.cma
-allopt: libunix.lib unix.cmxa
+allopt: libunix.$(A) unix.cmxa
-dllunix.dll: copy_unix_files io.h $(C_OBJS:.obj=.dobj)
- link /nologo /dll /out:dllunix.dll /implib:tmp.lib \
- $(C_OBJS:.obj=.dobj) ..\..\byterun\ocamlrun.lib wsock32.lib
+dllunix.dll: io.h $(DOBJS)
+ $(call MKDLL,dllunix.dll,tmp.$(A),$(DOBJS) ../../byterun/ocamlrun.$(A) $(LIBS))
rm tmp.*
-libunix.lib: copy_unix_files io.h $(C_OBJS:.obj=.sobj)
- rm -f libunix.lib
- $(MKLIB)libunix.lib $(C_OBJS:.obj=.sobj)
+libunix.$(A): io.h $(SOBJS)
+ $(call MKLIB,libunix.$(A),$(SOBJS))
-copy_unix_files:
- @- cd ..\unix & cp -p -u -v $(UNIX_FILES) ../win32unix
-# This requires GNU cp
- @cp ../unix/unix.mli ../unix/unixLabels.ml* .
+#copy_unix_files:
+# @cd ../unix; cp -p -u $(UNIX_FILES) ../win32unix
+# @cp ../unix/unix.mli ../unix/unixLabels.ml* .
-io.h: "$(SYSTEM_INCLUDES)\io.h"
- copy "$(SYSTEM_INCLUDES)\io.h" io.h
+io.h: $(SYSTEM_INCLUDES)/io.h
+ cp "$(SYSTEM_INCLUDES)/io.h" io.h
-$(C_OBJS:.obj=.dobj) $(C_OBJS:.obj=.sobj): unixsupport.h
+$(DOBJS) $(SOBJS): unixsupport.h
unix.cma: $(CAML_OBJS)
$(CAMLC) -a -linkall -o unix.cma $(CAML_OBJS) \
- -dllib -lunix -cclib -lunix wsock32.lib
+ -dllib -lunix -cclib -lunix -cclib $(LIBS)
unix.cmxa: $(CAMLOPT_OBJS)
$(CAMLOPT) -a -linkall -o unix.cmxa $(CAMLOPT_OBJS) \
- -cclib -lunix wsock32.lib
+ -cclib -lunix -cclib $(LIBS)
partialclean:
rm -f *.cm*
clean: partialclean
- rm -f *.lib *.dll *.exp *.sobj *.dobj
+ rm -f *.$(A) *.dll *.$(O)
rm -f $(UNIX_FILES)
rm -f io.h
install:
cp dllunix.dll $(LIBDIR)/dllunix.dll
- cp libunix.lib $(LIBDIR)/libunix.lib
+ cp libunix.$(A) $(LIBDIR)/libunix.$(A)
cp unix.cmi unix.cma $(LIBDIR)
installopt:
- cp unix.cmxa unix.cmx unix.lib $(LIBDIR)
+ cp unix.cmxa unix.cmx unix.$(A) $(LIBDIR)
unixLabels.cmo: unixLabels.ml
$(CAMLC) -c $(COMPFLAGS) -nolabels unixLabels.ml
@@ -99,7 +99,10 @@ unixLabels.cmo: unixLabels.ml
unixLabels.cmx: unixLabels.ml
$(CAMLOPT) -c $(COMPFLAGS) -nolabels unixLabels.ml
-.SUFFIXES: .ml .mli .cmo .cmi .cmx .dobj .sobj
+$(UNIX_FILES): %.c: ../unix/%.c
+ cp ../unix/$*.c $*.c
+
+.SUFFIXES: .ml .mli .cmo .cmi .cmx .$(DO) .$(SO)
.mli.cmi:
$(CAMLC) -c $(COMPFLAGS) $<
@@ -110,14 +113,14 @@ unixLabels.cmx: unixLabels.ml
.ml.cmx:
$(CAMLOPT) -c $(COMPFLAGS) $<
-.c.dobj:
+.c.$(DO):
$(BYTECC) $(DLLCCCOMPOPTS) $(CFLAGS) -c $<
- mv $*.obj $*.dobj
+ mv $*.$(O) $*.$(DO)
-.c.sobj:
+.c.$(SO):
$(BYTECC) $(BYTECCCOMPOPTS) $(CFLAGS) -c $<
- mv $*.obj $*.sobj
+ mv $*.$(O) $*.$(SO)
depend:
-!include .depend
+include .depend
diff --git a/otherlibs/win32unix/accept.c b/otherlibs/win32unix/accept.c
index a85be024e..fdac3e5da 100644
--- a/otherlibs/win32unix/accept.c
+++ b/otherlibs/win32unix/accept.c
@@ -16,6 +16,7 @@
#include <mlvalues.h>
#include <alloc.h>
#include <memory.h>
+#include <signals.h>
#include "unixsupport.h"
#include "socketaddr.h"
diff --git a/otherlibs/win32unix/connect.c b/otherlibs/win32unix/connect.c
index 4d0f60a05..74e62252d 100644
--- a/otherlibs/win32unix/connect.c
+++ b/otherlibs/win32unix/connect.c
@@ -14,6 +14,7 @@
/* $Id$ */
#include <mlvalues.h>
+#include <signals.h>
#include "unixsupport.h"
#include "socketaddr.h"
diff --git a/otherlibs/win32unix/lockf.c b/otherlibs/win32unix/lockf.c
index 84ed2476e..c2c9c3507 100644
--- a/otherlibs/win32unix/lockf.c
+++ b/otherlibs/win32unix/lockf.c
@@ -17,6 +17,7 @@
#include <errno.h>
#include <fcntl.h>
#include <mlvalues.h>
+#include <fail.h>
#include "unixsupport.h"
#include <stdio.h>
@@ -82,12 +83,12 @@ CAMLprim value unix_lockf(value fd, value cmd, value span)
VersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
if(GetVersionEx(&VersionInfo) == 0)
{
- return invalid_argument("lockf only supported on WIN32_NT platforms: could not determine current platform.");
+ invalid_argument("lockf only supported on WIN32_NT platforms: could not determine current platform.");
}
/* file locking only exists on NT versions */
if(VersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT)
{
- return invalid_argument("lockf only supported on WIN32_NT platforms");
+ invalid_argument("lockf only supported on WIN32_NT platforms");
}
h = Handle_val(fd);
diff --git a/otherlibs/win32unix/lseek.c b/otherlibs/win32unix/lseek.c
index 06f636fe3..acc7b1004 100644
--- a/otherlibs/win32unix/lseek.c
+++ b/otherlibs/win32unix/lseek.c
@@ -14,6 +14,7 @@
/* $Id$ */
#include <mlvalues.h>
+#include <alloc.h>
#include "unixsupport.h"
#ifdef HAS_UNISTD
@@ -71,5 +72,5 @@ CAMLprim value unix_lseek_64(value fd, value ofs, value cmd)
uerror("lseek", Nothing);
}
}
- return copy_int64(ofs_high << 32 | ret);
+ return copy_int64((int64) ofs_high << 32 | ret);
}
diff --git a/otherlibs/win32unix/sendrecv.c b/otherlibs/win32unix/sendrecv.c
index 065dd84eb..57ca0fdb2 100644
--- a/otherlibs/win32unix/sendrecv.c
+++ b/otherlibs/win32unix/sendrecv.c
@@ -16,6 +16,7 @@
#include <mlvalues.h>
#include <alloc.h>
#include <memory.h>
+#include <signals.h>
#include "unixsupport.h"
#include "socketaddr.h"
diff --git a/otherlibs/win32unix/sleep.c b/otherlibs/win32unix/sleep.c
index b86bfc5e4..421e5f902 100644
--- a/otherlibs/win32unix/sleep.c
+++ b/otherlibs/win32unix/sleep.c
@@ -14,8 +14,8 @@
/* $Id$ */
#include <mlvalues.h>
+#include <signals.h>
#include "unixsupport.h"
-#include <windows.h>
CAMLprim value unix_sleep(t)
value t;
diff --git a/otherlibs/win32unix/sockopt.c b/otherlibs/win32unix/sockopt.c
index 7e428bc07..a9572de79 100644
--- a/otherlibs/win32unix/sockopt.c
+++ b/otherlibs/win32unix/sockopt.c
@@ -14,6 +14,7 @@
/* $Id$ */
#include <mlvalues.h>
+#include <alloc.h>
#include "unixsupport.h"
static int sockopt_bool[] = {
diff --git a/otherlibs/win32unix/system.c b/otherlibs/win32unix/system.c
index b326e8900..725817c37 100644
--- a/otherlibs/win32unix/system.c
+++ b/otherlibs/win32unix/system.c
@@ -16,6 +16,7 @@
#include <mlvalues.h>
#include <memory.h>
#include <alloc.h>
+#include <signals.h>
#include "unixsupport.h"
#include <process.h>
#include <stdio.h>
diff --git a/otherlibs/win32unix/unix.ml b/otherlibs/win32unix/unix.ml
index cb5bcdd70..5231507e1 100644
--- a/otherlibs/win32unix/unix.ml
+++ b/otherlibs/win32unix/unix.ml
@@ -168,6 +168,10 @@ type open_flag =
| O_CREAT
| O_TRUNC
| O_EXCL
+ | O_NOCTTY
+ | O_DSYNC
+ | O_SYNC
+ | O_RSYNC
type file_perm = int
diff --git a/otherlibs/win32unix/unixsupport.c b/otherlibs/win32unix/unixsupport.c
index 97a9a3674..50c756f60 100644
--- a/otherlibs/win32unix/unixsupport.c
+++ b/otherlibs/win32unix/unixsupport.c
@@ -13,6 +13,7 @@
/* $Id$ */
+#include <stddef.h>
#include <mlvalues.h>
#include <callback.h>
#include <alloc.h>
diff --git a/otherlibs/win32unix/windir.c b/otherlibs/win32unix/windir.c
index 8d487bf64..cdd99d8e6 100644
--- a/otherlibs/win32unix/windir.c
+++ b/otherlibs/win32unix/windir.c
@@ -17,6 +17,7 @@
#include <memory.h>
#include <errno.h>
#include <alloc.h>
+#include <fail.h>
#include "unixsupport.h"
CAMLprim value win_findfirst(name)
diff --git a/otherlibs/win32unix/winwait.c b/otherlibs/win32unix/winwait.c
index c0a643a7e..db3a62dde 100644
--- a/otherlibs/win32unix/winwait.c
+++ b/otherlibs/win32unix/winwait.c
@@ -40,7 +40,8 @@ static int wait_flag_table[] = { CAML_WNOHANG, CAML_WUNTRACED };
CAMLprim value win_waitpid(value vflags, value vpid_req)
{
- int status, flags;
+ int flags;
+ DWORD status;
HANDLE pid_req = (HANDLE) Long_val(vpid_req);
flags = convert_flag_list(vflags, wait_flag_table);
diff --git a/stdlib/Makefile.nt b/stdlib/Makefile.nt
index ad9c4821e..1666c01cc 100644
--- a/stdlib/Makefile.nt
+++ b/stdlib/Makefile.nt
@@ -13,14 +13,14 @@
# $Id$
-!include ..\config\Makefile.nt
+include ../config/Makefile
-RUNTIME=..\boot\ocamlrun
-COMPILER=..\ocamlc
+RUNTIME=../boot/ocamlrun
+COMPILER=../ocamlc
CAMLC=$(RUNTIME) $(COMPILER)
-OPTCOMPILER=..\ocamlopt
+OPTCOMPILER=../ocamlopt
CAMLOPT=$(RUNTIME) $(OPTCOMPILER)
-CAMLDEP=..\boot\ocamlrun ..\tools\ocamldep
+CAMLDEP=../boot/ocamlrun ../tools/ocamldep
BASIC=pervasives.cmo array.cmo list.cmo char.cmo string.cmo sys.cmo \
hashtbl.cmo sort.cmo marshal.cmo obj.cmo \
@@ -43,7 +43,7 @@ install:
cp stdlib.cma std_exit.cmo *.cmi *.mli *.ml camlheader camlheader_ur $(LIBDIR)
installopt:
- cp stdlib.cmxa stdlib.lib std_exit.obj *.cmx $(LIBDIR)
+ cp stdlib.cmxa stdlib.$(A) std_exit.$(O) *.cmx $(LIBDIR)
stdlib.cma: $(OBJS)
$(CAMLC) -a -o stdlib.cma $(ALLOBJS)
@@ -51,8 +51,9 @@ stdlib.cma: $(OBJS)
stdlib.cmxa: $(OBJS:.cmo=.cmx)
$(CAMLOPT) -a -o stdlib.cmxa $(ALLOBJS:.cmo=.cmx)
-camlheader camlheader_ur: headernt.c ..\config\Makefile.nt
- $(BYTECC) $(BYTECCCOMPOPTS) $(BYTECCLINKOPTS) -o camlheader. headernt.c
+camlheader camlheader_ur: headernt.c ../config/Makefile
+ $(BYTECC) $(BYTECCCOMPOPTS) $(BYTECCLINKOPTS) -o camlheader.exe headernt.c
+ mv camlheader.exe camlheader
cp camlheader camlheader_ur
clean::
@@ -100,10 +101,10 @@ $(ALLOBJS:.cmo=.cmi) std_exit.cmi: $(COMPILER)
labelled.cmo labelled.cmx: $(LABELLED) $(LABELLED:.ml=.mli)
clean::
- rm -f *.cm* *.obj *.lib
+ rm -f *.cm* *.$(O) *.$(A)
rm -f *~
-!include .depend
+include .depend
depend: beforedepend
$(CAMLDEP) *.mli *.ml > .depend
diff --git a/stdlib/headernt.c b/stdlib/headernt.c
index 4dee82282..073d1e6f6 100644
--- a/stdlib/headernt.c
+++ b/stdlib/headernt.c
@@ -20,9 +20,11 @@
#include "../byterun/mlvalues.h"
#include "../byterun/exec.h"
+#ifndef __MINGW32__
#pragma comment(linker , "/entry:headerentry")
#pragma comment(linker , "/subsystem:console")
#pragma comment(lib , "kernel32")
+#endif
char * default_runtime_name = "ocamlrun";
@@ -135,7 +137,11 @@ static __inline void __declspec(noreturn) run_runtime(char * runtime,
#endif
}
+#ifdef __MINGW32__
+int main()
+#else
void __declspec(noreturn) __cdecl headerentry()
+#endif
{
char truename[MAX_PATH];
char * cmdline = GetCommandLine();
@@ -163,4 +169,7 @@ void __declspec(noreturn) __cdecl headerentry()
#if _MSC_VER >= 1200
__assume(0); /* Not reached */
#endif
+#ifdef __MINGW__
+ return 0;
+#endif
}
diff --git a/test/Makefile b/test/Makefile
index c12c3f35e..53b8d8f64 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -75,7 +75,7 @@ clean::
rm -f Lex/*.cm[iox] Lex/*.[os]
rm -f Lex/*~
-Lex/grammar.ml Lex/grammar.mli: Lex/grammar.mly ../yacc/ocamlyacc
+Lex/grammar.ml Lex/grammar.mli: Lex/grammar.mly ../yacc/ocamlyacc$(EXE)
$(CAMLYACC) $(YACCFLAGS) Lex/grammar.mly
clean::
diff --git a/tools/Makefile.nt b/tools/Makefile.nt
index 77a6ed5b8..dc5be382a 100644
--- a/tools/Makefile.nt
+++ b/tools/Makefile.nt
@@ -12,14 +12,14 @@
# $Id$
-!include ..\config\Makefile.nt
-
-CAMLRUN=..\boot\ocamlrun
-CAMLC=$(CAMLRUN) ..\boot\ocamlc -I ..\boot
-CAMLOPT=$(CAMLRUN) ..\ocamlopt
-CAMLLEX=$(CAMLRUN) ..\boot\ocamllex
-INCLUDES=-I ..\utils -I ..\parsing -I ..\typing -I ..\bytecomp -I ..\asmcomp \
- -I ..\driver
+include ../config/Makefile
+
+CAMLRUN=../boot/ocamlrun
+CAMLC=$(CAMLRUN) ../boot/ocamlc -I ../boot
+CAMLOPT=$(CAMLRUN) ../ocamlopt
+CAMLLEX=$(CAMLRUN) ../boot/ocamllex
+INCLUDES=-I ../utils -I ../parsing -I ../typing -I ../bytecomp -I ../asmcomp \
+ -I ../driver
COMPFLAGS=$(INCLUDES)
LINKFLAGS=$(INCLUDES)
@@ -44,7 +44,7 @@ clean::
rm -f ocamldep
install::
- cp ocamldep $(BINDIR)\ocamldep.exe
+ cp ocamldep $(BINDIR)/ocamldep.exe
beforedepend:: ocamldep.ml
@@ -62,8 +62,8 @@ ocamlcp.exe: ocamlcp.cmo
$(CAMLC) $(LINKFLAGS) -o ocamlcp.exe main_args.cmo ocamlcp.cmo
install::
- cp ocamlprof $(BINDIR)\ocamlprof.exe
- cp ocamlcp.exe $(BINDIR)\ocamlcp.exe
+ cp ocamlprof $(BINDIR)/ocamlprof.exe
+ cp ocamlcp.exe $(BINDIR)/ocamlcp.exe
cp profiling.cmi profiling.cmo $(LIBDIR)
clean::
@@ -75,7 +75,7 @@ ocamlmktop.exe: ocamlmktop.cmo
$(CAMLC) $(LINKFLAGS) -o ocamlmktop.exe ocamlmktop.cmo
install::
- cp ocamlmktop.exe $(BINDIR)\ocamlmktop.exe
+ cp ocamlmktop.exe $(BINDIR)/ocamlmktop.exe
clean::
rm -f ocamlmktop.exe
@@ -110,13 +110,13 @@ dumpobj: $(DUMPOBJ)
clean::
rm -f dumpobj
-opnames.ml: ..\byterun\instruct.h
- sed -e '/\/\*/d' \
- -e 's\enum \(.*\) {/let names_of_\1 = [|/' \
+opnames.ml: ../byterun/instruct.h
+ sed -e '////*/d' \
+ -e 's/enum /(.*/) {/let names_of_/1 = [|/' \
-e 's/};$$/ |]/' \
- -e 's/\([A-Z][A-Z_0-9a-z]*\)/"\1"/g' \
+ -e 's//([A-Z][A-Z_0-9a-z]*/)/"/1"/g' \
-e 's/,/;/g' \
- ..\byterun\instruct.h > opnames.ml
+ ../byterun/instruct.h > opnames.ml
clean::
rm -f opnames.ml
@@ -164,6 +164,6 @@ clean::
rm -f *.cmo *.cmi
depend: beforedepend
- $(CAMLRUN) .\ocamldep $(INCLUDES) *.mli *.ml > .depend
+ $(CAMLRUN) ./ocamldep $(INCLUDES) *.mli *.ml > .depend
-!include .depend
+include .depend
diff --git a/utils/ccomp.ml b/utils/ccomp.ml
index 687d414c7..49833142f 100644
--- a/utils/ccomp.ml
+++ b/utils/ccomp.ml
@@ -29,8 +29,8 @@ let quote_files lst =
(List.map (fun f -> if f = "" then f else Filename.quote f) lst)
let compile_file name =
- match Sys.os_type with
- | "MacOS" ->
+ match Config.ccomp_type with
+ | "mrc" ->
let qname = Filename.quote name in
let includes = (Clflags.std_include_dir ()) @ !Clflags.include_dirs
in
@@ -40,9 +40,8 @@ let compile_file name =
(String.concat "," (List.rev_map Filename.quote includes))
qname
in
- run_command ("sc " ^ args ^ " -o " ^ qname ^ ".o");
command ("mrc " ^ args ^ " -o " ^ qname ^ ".x")
- | _ ->
+ | "cc" | "msvc" ->
command
(Printf.sprintf
"%s -c %s %s %s %s"
@@ -52,12 +51,13 @@ let compile_file name =
(List.rev_map (fun dir -> "-I" ^ dir) !Clflags.include_dirs))
(Clflags.std_include_flag "-I")
(Filename.quote name))
+ | _ -> assert false
let create_archive archive file_list =
Misc.remove_file archive;
let quoted_archive = Filename.quote archive in
- match Config.system with
- "win32" ->
+ match Config.ccomp_type with
+ "msvc" ->
command(Printf.sprintf "lib /nologo /debugtype:cv /out:%s %s"
quoted_archive (quote_files file_list))
| _ ->
diff --git a/utils/config.mli b/utils/config.mli
index 19774ab7d..79db523e3 100644
--- a/utils/config.mli
+++ b/utils/config.mli
@@ -21,6 +21,11 @@ val standard_library: string
(* The directory containing the standard libraries *)
val standard_runtime: string
(* The full path to the standard bytecode interpreter ocamlrun *)
+val ccomp_type: string
+ (* The "kind" of the C compiler: one of
+ "cc" (for Unix-style C compilers)
+ "msvc" (Microsoft Visual C++)
+ "mrc" (Macintosh MPW) *)
val bytecomp_c_compiler: string
(* The C compiler to use for compiling C files
with the bytecode compiler *)
diff --git a/utils/config.mlp b/utils/config.mlp
index 9fbbdc9d3..aeb8f88ec 100644
--- a/utils/config.mlp
+++ b/utils/config.mlp
@@ -25,6 +25,7 @@ let standard_library =
"%%LIBDIR%%"
let standard_runtime = "%%BYTERUN%%"
+let ccomp_type = "%%CCOMPTYPE%%"
let bytecomp_c_compiler = "%%BYTECC%%"
let bytecomp_c_linker = "%%BYTELINK%%"
let bytecomp_c_libraries = "%%BYTECCLIBS%%"
diff --git a/win32caml/Makefile b/win32caml/Makefile
index 91da39df0..398e4901f 100644
--- a/win32caml/Makefile
+++ b/win32caml/Makefile
@@ -13,7 +13,7 @@
# $Id$
-!include ..\config\Makefile.nt
+include ../config/Makefile
CC=cl /nologo
CFLAGS=/MT -O /Zi
diff --git a/yacc/Makefile.nt b/yacc/Makefile.nt
index 79af901dc..f9a1316a6 100644
--- a/yacc/Makefile.nt
+++ b/yacc/Makefile.nt
@@ -14,33 +14,36 @@
# Makefile for the parser generator.
-!include ..\config\Makefile.nt
+include ../config/Makefile
-CC=$(BYTECC)
-CFLAGS=-DNDEBUG -DNO_UNIX $(BYTECCCOMPOPTS)
-
-OBJS= closure.obj error.obj lalr.obj lr0.obj main.obj mkpar.obj output.obj reader.obj \
- skeleton.obj symtab.obj verbose.obj warshall.obj
+OBJS= closure.$(O) error.$(O) lalr.$(O) lr0.$(O) main.$(O) \
+ mkpar.$(O) output.$(O) reader.$(O) \
+ skeleton.$(O) symtab.$(O) verbose.$(O) warshall.$(O)
all: ocamlyacc.exe
ocamlyacc.exe: $(OBJS)
- $(CC) $(CFLAGS) $(CCLINKFLAGS) -o ocamlyacc.exe $(OBJS)
+ $(BYTECC) $(BYTECCCOMPOPTS) -o ocamlyacc.exe $(OBJS)
clean:
- rm -f *.obj ocamlyacc.exe *~
+ rm -f *.$(O) ocamlyacc.exe *~
+
+.SUFFIXES: .c .$(O)
+
+.c.$(O):
+ $(BYTECC) -DNDEBUG -DNO_UNIX $(BYTECCCOMPOPTS) -c $<
depend:
-closure.obj: defs.h
-error.obj: defs.h
-lalr.obj: defs.h
-lr0.obj: defs.h
-main.obj: defs.h
-mkpar.obj: defs.h
-output.obj: defs.h
-reader.obj: defs.h
-skeleton.obj: defs.h
-symtab.obj: defs.h
-verbose.obj: defs.h
-warshall.obj: defs.h
+closure.$(O): defs.h
+error.$(O): defs.h
+lalr.$(O): defs.h
+lr0.$(O): defs.h
+main.$(O): defs.h
+mkpar.$(O): defs.h
+output.$(O): defs.h
+reader.$(O): defs.h
+skeleton.$(O): defs.h
+symtab.$(O): defs.h
+verbose.$(O): defs.h
+warshall.$(O): defs.h