diff options
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/Makefile.nt | 21 | ||||
-rw-r--r-- | stdlib/headernt.c | 9 |
2 files changed, 20 insertions, 10 deletions
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 } |