12
12
#########################################################################
14
# $Id: Makefile.msvc64,v 1.6.2.1 2007/10/25 09:31:54 xleroy Exp $
14
# $Id: Makefile.msvc64,v 1.13 2008/07/29 08:31:41 xleroy Exp $
16
16
# Configuration for Windows, Visual C++ compiler
77
77
BYTECC=cl /nologo -D_CRT_SECURE_NO_DEPRECATE
79
79
### Additional compile-time options for $(BYTECC). (For static linking.)
80
BYTECCCOMPOPTS=/Ox /MT
80
BYTECCCOMPOPTS=/Ox /MD
82
82
### Additional compile-time options for $(BYTECC). (For debug version.)
83
83
BYTECCDBGCOMPOPTS=-DDEBUG /Zi /W3 /Wp64
85
85
### Additional link-time options for $(BYTECC). (For static linking.)
86
BYTECCLINKOPTS=/MT /F33554432
86
BYTECCLINKOPTS=/MD /F33554432
88
88
### Additional compile-time options for $(BYTECC). (For building a DLL.)
89
DLLCCCOMPOPTS=/Ox /MD -DCAML_DLL
91
91
### Libraries needed
92
92
EXTRALIBS=bufferoverflowu.lib
93
BYTECCLIBS=advapi32.lib $(EXTRALIBS)
94
NATIVECCLIBS=advapi32.lib $(EXTRALIBS)
93
BYTECCLIBS=advapi32.lib ws2_32.lib $(EXTRALIBS)
94
NATIVECCLIBS=advapi32.lib ws2_32.lib $(EXTRALIBS)
96
96
### How to invoke the C preprocessor
99
### How to merge a .manifest (if any) in a .exe or .dll
100
MERGEMANIFEST=test ! -f $(1).manifest || mt -nologo -outputresource:$(1) -manifest $(1).manifest && rm -f $(1).manifest
101
#ml let mergemanifest out = Printf.sprintf "test ! -f %s.manifest || mt -nologo -outputresource:%s -manifest %s.manifest && rm -f %s.manifest" out out out out;;
103
### How to build an EXE
104
MKEXE=$(BYTECC) /Fe$(1) $(2) && ($(MERGEMANIFEST))
105
#ml let mkexe out files opts = Printf.sprintf "%s /Fe%s %s %s && (%s)" bytecc out opts files (mergemanifest out);;
107
### How to build a DLL
108
MKDLL=link /nologo /dll /machine:AMD64 /out:$(1) /implib:$(2) $(3) $(EXTRALIBS) && ($(MERGEMANIFEST))
109
#ml let mkdll out implib files opts = Printf.sprintf "link /nologo /dll /machine:AMD64 /out:%s /implib:%s %s %s && (%s)" out implib opts files (mergemanifest out);;
100
FLEXLINK=flexlink -x64 -merge-manifest
101
FLEXDIR=$(shell $(FLEXLINK) -where)
102
IFLEXDIR=-I"$(FLEXDIR)"
104
MKEXE=$(FLEXLINK) -exe
105
MKMAINDLL=$(FLEXLINK) -maindll
111
107
### How to build a static library
112
108
MKLIB=link /lib /nologo /machine:AMD64 /out:$(1) $(2)
136
132
NATIVECC=cl /nologo
138
134
### Additional compile-time options for $(NATIVECC).
139
NATIVECCCOMPOPTS=/Ox /MT
135
NATIVECCCOMPOPTS=/Ox /MD
141
137
### Additional link-time options for $(NATIVECC)
142
NATIVECCLINKOPTS=/MT /F33554432
138
NATIVECCLINKOPTS=/MD /F33554432
144
140
### Build partially-linked object file
145
PARTIALLD=link /lib /nologo /machine:AMD64
146
141
PACKLD=link /lib /nologo /machine:AMD64 /out:# there must be no space after this '/out:'
148
143
############# Configuration for the contributed libraries