Skip to content
This repository
tag: v252
Fetching contributors…

Cannot retrieve contributors at this time

file 73 lines (63 sloc) 2.431 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
From baeaece8c79885ac19040a04f8453f34fa36aae9 Mon Sep 17 00:00:00 2001
From: Louis Gesbert <louis.gesbert@mlstate.com>
Date: Thu, 16 Jun 2011 16:18:09 +0200
Subject: [PATCH] win32 Makefile

---
 Makefile.win32 | 21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/Makefile.win32 b/Makefile.win32
index 21ff2b3..1733882 100644
--- a/Makefile.win32
+++ b/Makefile.win32
@@ -1,20 +1,25 @@
 ### Configuration section
-
-# Where to install the library. By default: OCaml's standard library directory.
-INSTALLDIR=$(OCAMLSTDLIB)
+# This is the original but choose msvc toolchain
+# and accept external compilers (do not understand how it can call directly windows compiler, maybe because there is no path
+# dll construction is failing becasue of a missing file
 
 # Which Win32 port of OCaml is used?
-#TOOLCHAIN=msvc # Native Win32 port with Microsoft compilers
-TOOLCHAIN=mingw # Native Win32 port with Mingw compilers
+TOOLCHAIN=msvc # Native Win32 port with Microsoft compilers
+#TOOLCHAIN=mingw # Native Win32 port with Mingw compilers
 
 ### End of configuration section
 
+# define from external call
 OCAMLRUN=ocamlrun
 OCAMLC=ocamlc -g
 OCAMLOPT=ocamlopt
 OCAMLDEP=ocamldep
 OCAMLSTDLIB="$(shell $(OCAMLC) -where)"
 
+# Where to install the library. By default: OCaml's standard library directory.
+INSTALLDIR=$(OCAMLSTDLIB)
+
+
 ifeq ($(strip $(TOOLCHAIN)),mingw)
 
 O=o
@@ -38,7 +43,7 @@ DO=d.obj
 CC=cl /nologo
 STATICOPTS=/Ox /MT
 DLLOPTS=/Ox /MD -DCAML_DLL
-MKDLL=link /nologo /dll /out:$(1) /implib:$(2) $(3)
+MKDLL=flexlink -o $(1) -implib $(3)
 MKLIB=lib /nologo /debugtype:CV /out:$(1) $(2)
 LIBS=advapi32.lib
 endif
@@ -67,7 +72,7 @@ all: dllcryptokit.dll libcryptokit.$(A) cryptokit.cmi cryptokit.cma
 allopt: dllcryptokit.dll libcryptokit.$(A) cryptokit.cmi cryptokit.cmxa
 
 dllcryptokit.dll: $(DC_OBJS)
- $(call MKDLL,$@,tmp.$(A),$(DC_OBJS) $(OCAMLSTDLIB)/ocamlrun.$(A) $(LIBS))
+ -$(call MKDLL,$@,tmp.$(A),$(DC_OBJS) $(OCAMLSTDLIB)/libcamlrun.$(A) $(LIBS))
 
 libcryptokit.$(A): $(SC_OBJS)
  $(call MKLIB,$@,$(SC_OBJS))
@@ -99,7 +104,7 @@ clean::
 install:
  cp cryptokit.cmi cryptokit.cma cryptokit.mli $(INSTALLDIR)
  cp libcryptokit.$(A) $(INSTALLDIR)
- cp dllcryptokit.dll $(INSTALLDIR)
+ -cp dllcryptokit.dll $(INSTALLDIR)
  cp cryptokit.cmxa cryptokit.cmx cryptokit.$(A) $(INSTALLDIR)
 
 .SUFFIXES: .ml .mli .cmo .cmi .cmx .c .$(DO) .$(SO)
--
1.7.1
Something went wrong with that request. Please try again.