1
# Copyright (C) 2001-2006 Artifex Software, Inc.
4
# This software is provided AS-IS with no warranty, either express or
7
# This software is distributed under license and may not be copied, modified
8
# or distributed except as expressly authorized under the terms of that
9
# license. Refer to licensing information at http://www.artifex.com/
10
# or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
11
# San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
13
# $Id: msvccmd.mak 8824 2008-07-07 13:43:38Z ken $
14
# Command definition section for Microsoft Visual C++ 4.x/5.x,
15
# Windows NT or Windows 95 platform.
16
# Created 1997-05-22 by L. Peter Deutsch from msvc4/5 makefiles.
17
# edited 1997-06-xx by JD to factor out interpreter-specific sections
18
# edited 2000-03-30 by lpd to make /FPi87 conditional on MSVC version
19
# edited 2000-06-05 by lpd to treat empty MSINCDIR and LIBDIR specially.
21
# Set up linker differently for MSVC 4 vs. later versions
23
!if $(MSVC_VERSION) == 4
25
# MSVC version 4.x doesn't recognize the /QI0f switch, which works around
26
# an unspecified bug in the Pentium decoding of certain 0F instructions.
30
#else $(MSVC_VERSION) != 4
32
# MSVC 5.x does recognize /QI0f.
35
# Define separate CCAUX command-line switch that must be at END of line.
37
!if $(MSVC_VERSION) < 7
40
CCAUX_TAIL= /link /LIBPATH:"$(COMPBASE)\lib"
44
#endif #$(MSVC_VERSION) == 4
47
# Define the current directory prefix and shell invocations.
53
# Define switches for the compilers.
59
# Define the arguments for genconf.
64
# Define the generic compilation flags.
68
# Make sure we get the right default target for make.
73
# Define the compilation flags.
75
# MSVC 8 (2005) warns about deprecated unsafe common functions like strcpy.
76
!if ($(MSVC_VERSION) > 7) || defined(WIN64)
77
VC8WARN=/wd4996 /wd4224
82
!if ($(MSVC_VERSION) < 8)
92
!if "$(CPU_FAMILY)"=="i386"
94
!if ($(MSVC_VERSION) >= 8) || defined(WIN64)
95
# MSVC 8 (2005) attempts to produce code good for all processors.
96
# and doesn't used /G5 or /GB.
97
# MSVC 8 (2005) avoids buggy 0F instructions.
102
!else if $(CPU_TYPE)>400
109
!if $(MSVC_VERSION)<5
117
!if "$(CPU_FAMILY)"=="ppc"
121
!else if $(CPU_TYPE)>=604
131
!if "$(CPU_FAMILY)"=="alpha"
133
# *** alpha *** This needs fixing
145
# Precompiled headers
146
!if $(MSVC_VERSION) >= 8
147
CPCH=/Fp$(GLOBJDIR)\gs.pch
149
CPCH=/YX /Fp$(GLOBJDIR)\gs.pch
157
# /Fd designates the directory for the .pdb file.
158
# Note that it must be followed by a space.
159
CT=/Od /Fd$(GLOBJDIR) $(NULL) $(CDCC) $(CPCH)
160
LCT=/DEBUG /INCREMENTAL:YES
161
COMPILE_FULL_OPTIMIZED= # no optimization when debugging
162
COMPILE_WITH_FRAMES= # no optimization when debugging
163
COMPILE_WITHOUT_FRAMES= # no optimization when debugging
171
CT=/Zi /Fd$(GLOBJDIR) $(NULL)
175
!if $(MSVC_VERSION) == 5
176
# NOTE: With MSVC++ 5.0, /O2 produces a non-working executable.
177
# We believe the following list of optimizations works around this bug.
178
COMPILE_FULL_OPTIMIZED=/GF /Ot /Oi /Ob2 /Oy /Oa- /Ow-
180
COMPILE_FULL_OPTIMIZED=/GF /O2 /Ob2
183
COMPILE_WITHOUT_FRAMES=/Oy
186
!if $(MSVC_VERSION) >= 8
187
# MSVC 8 (2005) always does stack probes and checking.
190
!if $(DEBUG)!=0 || $(TDEBUG)!=0
197
!if ($(MSVC_VERSION) == 7) && defined(WIN64)
198
# Need to specify DDK include directories before .NET 2003 directories.
199
MSINCFLAGS=-I"$(INCDIR64A)" -I"$(INCDIR64B)"
204
# Specify output object name
207
# Specify function prolog type
210
COMPILE_FOR_CONSOLE_EXE=
212
# The /MT is for multi-threading. We would like to make this an option,
213
# but it's too much work right now.
214
GENOPT=$(CP) $(CD) $(CT) $(CS) $(WARNOPT) $(VC8WARN) /nologo $(CMT)
216
CCFLAGS=$(PLATOPT) $(FPFLAGS) $(CPFLAGS) $(CFLAGS) $(XCFLAGS) $(MSINCFLAGS)
217
CC=$(COMP) /c $(CCFLAGS) @$(GLGENDIR)\ccf32.tr
218
CPP=$(COMPCPP) /c $(CCFLAGS) @$(GLGENDIR)\ccf32.tr
220
WX=$(COMPILE_FOR_DLL)
222
WX=$(COMPILE_FOR_EXE)
232
# /Za disables the MS-specific extensions & enables ANSI mode.
234
CC_=$(CC_WX) $(COMPILE_FULL_OPTIMIZED) /Za $(ZM)
235
CC_D=$(CC_WX) $(COMPILE_WITH_FRAMES)
239
# Compiler for auxiliary programs
241
CCAUX=$(COMPAUX) $(VC8WARN) $(CFLAGS)
243
# Compiler for Windows programs.
244
CCWINFLAGS=$(COMPILE_FULL_OPTIMIZED)