1 #########################################################################
5 # Xavier Leroy, projet Cristal, INRIA Rocquencourt #
7 # Copyright 1999 Institut National de Recherche en Informatique et #
8 # en Automatique. All rights reserved. This file is distributed #
9 # under the terms of the GNU Library General Public License, with #
10 # the special exception on linking described in file ../LICENSE. #
12 #########################################################################
16 # Configuration for Windows, Visual C++ compiler
18 ######### General configuration
22 ### Where to install the binaries.
25 ### Where to install the standard library
28 ### Where to install the stub DLLs
29 STUBLIBDIR=$(LIBDIR)/stublibs
31 ### Where to install the info files
34 ### Where to install the man pages
37 ########## Toolchain and OS dependencies
52 SHARPBANGSCRIPTS=false
59 SUPPORTS_SHARED_LIBRARIES=true
71 SYSTHREAD_SUPPORT=true
74 ########## Configuration for the bytecode compiler
76 ### Which C compiler to use for the bytecode interpreter.
77 BYTECC=cl /nologo -D_CRT_SECURE_NO_DEPRECATE
79 ### Additional compile-time options for $(BYTECC). (For static linking.)
80 BYTECCCOMPOPTS=/Ox /MT
82 ### Additional link-time options for $(BYTECC). (For static linking.)
83 BYTECCLINKOPTS=/MT /F16777216
85 ### Additional compile-time options for $(BYTECC). (For building a DLL.)
86 DLLCCCOMPOPTS=/Ox /MD -DCAML_DLL
89 BYTECCLIBS=advapi32.lib
90 NATIVECCLIBS=advapi32.lib
92 ### How to invoke the C preprocessor
95 ### How to merge a .manifest (if any) in a .exe
96 MERGEMANIFESTEXE=test ! -f $(1).manifest || mt -nologo -outputresource:$(1) -manifest $(1).manifest && rm -f $(1).manifest
97 #ml let mergemanifestexe out = Printf.sprintf "test ! -f %s.manifest || mt -nologo -outputresource:%s -manifest %s.manifest && rm -f %s.manifest" out out out out;;
99 ### How to build an EXE
100 MKEXE=$(BYTECC) /Fe$(1) $(2) && ($(MERGEMANIFESTEXE))
101 #ml let mkexe out files opts = Printf.sprintf "%s /Fe%s %s %s && (%s)" bytecc out opts files (mergemanifestexe out);;
103 ### How to merge a .manifest (if any) in a .dll
104 MERGEMANIFESTDLL=test ! -f $(1).manifest || mt -nologo -outputresource:"$(1);\#2" -manifest $(1).manifest && rm -f $(1).manifest
105 #ml let mergemanifestdll out = Printf.sprintf "test ! -f %s.manifest || mt -nologo -outputresource:\"%s;\\#2\" -manifest %s.manifest && rm -f %s.manifest" out out out out;;
107 ### How to build a DLL
108 MKDLL=link /nologo /dll /out:$(1) /implib:$(2) $(3) && ($(MERGEMANIFESTDLL))
109 #ml let mkdll out implib files opts = Printf.sprintf "link /nologo /dll /out:%s /implib:%s %s %s && (%s)" out implib opts files (mergemanifestdll out);;
111 ### How to build a static library
112 MKLIB=link /lib /nologo /out:$(1) $(2)
113 #ml let mklib out files opts = Printf.sprintf "link /lib /nologo /out:%s %s %s" out opts files;;
116 ### Canonicalize the name of a system library
118 #ml let syslib x = x ^ ".lib";;
120 ### The ranlib command
124 ############# Configuration for the native-code compiler
126 ### Name of architecture for the native-code compiler
129 ### Name of architecture model for the native-code compiler.
132 ### Name of operating system family for the native-code compiler.
135 ### Which C compiler to use for the native-code compiler.
136 NATIVECC=cl /nologo -D_CRT_SECURE_NO_DEPRECATE
138 ### Additional compile-time options for $(NATIVECC).
139 NATIVECCCOMPOPTS=/Ox /MT
141 ### Additional link-time options for $(NATIVECC)
142 NATIVECCLINKOPTS=/MT /F16777216
144 ### Build partially-linked object file
145 PARTIALLD=link /lib /nologo
146 PACKLD=link /lib /nologo /out:# there must be no space after this '/out:'
148 ############# Configuration for the contributed libraries
150 OTHERLIBRARIES=win32unix systhreads str num win32graph dynlink bigarray labltk
152 ### Name of the target architecture for the "num" library
156 ### Configuration for LablTk
157 # Set TK_ROOT to the directory where you installed TCL/TK 8.3
159 TK_DEFS=-I$(TK_ROOT)/include
160 # The following definition avoids hard-wiring $(TK_ROOT) in the libraries
161 # produced by OCaml, and is therefore required for binary distribution
162 # of these libraries. However, $(TK_ROOT) must be added to the LIB
163 # environment variable, as described in README.win32.
164 TK_LINK=tk84.lib tcl84.lib
165 # An alternative definition that avoids mucking with the LIB variable,
166 # but hard-wires the Tcl/Tk location in the binaries
167 # TK_LINK=$(TK_ROOT)/tk83.lib $(TK_ROOT)/tcl83.lib
169 ############# Aliases for common commands
171 MAKEREC=$(MAKE) -f Makefile.nt