-
Notifications
You must be signed in to change notification settings - Fork 36
/
x86mk.inc
512 lines (433 loc) · 12.3 KB
/
x86mk.inc
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
!IF 0
Copyright (c) 1994-1996 Microsoft Corporation
Module Name:
x86mk.inc
Abstract:
This module contains the x86 specific build controls. It is included
by makefile.def.
Revision History:
!ENDIF
DELAYLOAD_SUPPORTED=1
!ifndef DELAYLOAD_VERSION
! if $(_NT_TOOLS_VERSION) >= 0x700
DELAYLOAD_VERSION=0x0200
! elseif $(_NT_TOOLS_VERSION) == 0x600
DELAYLOAD_VERSION=0x0100
! else
DELAYLOAD_SUPPORTED=0
! endif
!endif
#
# x86 option control
#
UMBASE=$(UMBASE:*=x86)
UMLIBS=$(UMLIBS:*=x86)
NTRES=$(NTRES:*=x86)
UMRES=$(UMRES:*=x86)
UMOBJS=$(UMOBJS:*=x86)
LINKLIBS=$(LINKLIBS:*=x86)
GDI_DRIVER_LIBS=$(GDI_DRIVER_LIBS:*=x86)
DLLBASE=$(DLLBASE:*=x86)
DLLDEF=$(DLLDEF:*=x86)
MACHINE_TARGETLIBS=$(MACHINE_TARGETLIBS:*=x86)
!ifdef USE_MSHTML_PDB_RULES
MACHINE_TARGETLIBS=$(MACHINE_TARGETLIBS:????????=*)
!endif
TARGET=$(TARGET:*=x86)
DYNLINK_LIB=$(DYNLINK_LIB:*=x86)
TARGETEXEFILES=$(TARGETEXEFILES:*=x86)
TARGETLIBFILES=$(TARGETLIBFILES:*=x86)
TARGETOBJFILES=$(TARGETOBJFILES:*=x86)
UMOBJFILES=$(UMOBJFILES:*=x86)
UMEXEFILES=$(UMEXEFILES:*=x86)
HEADERFILE=$(HEADERFILE:*=x86)
HEADEROBJNAME=$(HEADEROBJNAME:*=x86)
HEADEROBJ=$(HEADEROBJ:*=x86)
PRECOMPILED=$(PRECOMPILED:*=x86)
PRECOMPILED_CXX=$(PRECOMPILED_CXX:*=x86)
PRECOMPILED_TARGET=$(PRECOMPILED_TARGET:*=x86)
MFC_STATIC_LIB=$(MFC_STATIC_LIB:*=x86)
CRT_LIB_PATH=$(CRT_LIB_PATH:*=x86)
SDK_LIB_PATH=$(SDK_LIB_PATH:*=x86)
DDK_LIB_PATH=$(DDK_LIB_PATH:*=x86)
IFSKIT_LIB_PATH=$(IFSKIT_LIB_PATH:*=x86)
HALKIT_LIB_PATH=$(HALKIT_LIB_PATH:*=x86)
PROCESSOR_LIB_PATH=$(PROCESSOR_LIB_PATH:*=x86)
ORDER=$(ORDER:*=x86)
OBJLIBFILES=$(OBJLIBFILES:*=x86)
MISCFILES=$(MISCFILES) $(X86_MISCFILES)
SOURCES=$(SOURCES) $(X86_SOURCES)
ADDITIONAL_ATL_LIBS = $(ADDITIONAL_ATL_LIBS) $(ATL_LIB_PATH)\atlthunk.lib
!ifdef CHICAGO_PRODUCT
USE_MAPSYM=1
!endif
# "$(TARGETTYPE)"=="DRIVER" ||
# "$(TARGETTYPE)" == "HAL" ||
# "$(TARGETTYPE)" == "EXPORT_DRIVER" ||
!IF "$(TARGETTYPE)"=="GDI_DRIVER" || \
"$(TARGETTYPE)"=="MINIPORT"
#
#Drivers don't link with link libs.
#
MACHINE_TARGETLIBS=$(SDK_LIB_PATH)\int64.lib $(MACHINE_TARGETLIBS)
!ELSE
!IF defined(USE_NTDLL) || defined (USE_NOLIBS)
MACHINE_TARGETLIBS=$(SDK_LIB_PATH)\int64.lib $(MACHINE_TARGETLIBS)
!ENDIF
!ENDIF
!ifdef NTTARGETFILES
NTTARGETFILES=$(NTTARGETFILES:*=x86)
!endif
!ifdef NTTARGETFILE0
NTTARGETFILE0=$(NTTARGETFILE0:*=x86)
!endif
!ifdef NTTARGETFILE1
NTTARGETFILE1=$(NTTARGETFILE1:*=x86)
!endif
!ifdef PROJECT_LIB_PATH
PROJECT_LIB_PATH=$(PROJECT_LIB_PATH:*=x86)
!endif
!IF "$(DLLENTRY)" != "-noentry"
! IF "$(DLLENTRY:@12=)" == "$(DLLENTRY)"
DLLENTRY=$(DLLENTRY)@12
! ENDIF
!ENDIF
!IFDEF STD_CALL_ENTRY
UMENTRY=$(UMENTRY)@4
!ENDIF
ENTRY_SUFFIX=@8
GDI_ENTRY_SUFFIX=@12
DEFAULT_STACKRESERVE=0x40000
DEFAULT_STACKCOMMIT=0x2000
!IFDEF X86_WARNING_LEVEL
MSC_WARNING_LEVEL=$(X86_WARNING_LEVEL)
!ENDIF
MSC_WARNING_LEVEL=$(MSC_WARNING_LEVEL) $(COMPILER_WX_SWITCH)
!ifdef X86_PERFFLAGS
PERFFLAGS = $(X86_PERFFLAGS)
!endif
# Set MSC_OPTIMIZATION.
# Order of precedence:
# Platform specific override
# Environment variable
# System Default
!if defined(X86_OPTIMIZATION)
MSC_OPTIMIZATION=$(X86_OPTIMIZATION)
!elseif !defined(MSC_OPTIMIZATION)
MSC_OPTIMIZATION=$(DEFAULT_MSC_OPT)
!endif
LINK_TIME_CODE_GENERATION_MSC_FLAG=
!if defined(LINK_TIME_CODE_GENERATION) && !defined(FORCENATIVEOBJECT)
# Some objects must be built native, so turn off GL for those
LINK_TIME_CODE_GENERATION_MSC_FLAG=/GL
!endif
DBGFLAGS=$(DBGFLAGS) $(MSC_OPTIMIZATION) $(LINK_TIME_CODE_GENERATION_MSC_FLAG)
!IFDEF X86_CPPFLAGS
MSC_CPPFLAGS=$(X86_CPPFLAGS)
!ENDIF
!ifdef NO_STRING_POOLING
STRING_POOLING =
!else
!ifdef NO_READONLY_STRINGS
STRING_POOLING = /Gf
!else
STRING_POOLING = /GF
!endif
!endif
!ifdef USE_NATIVE_EH
! if "$(USE_NATIVE_EH)" == "ASYNC"
EH_FLAGS=/EHa
! else
! if "$(USE_NATIVE_EH)" == "CTHROW"
EH_FLAGS=/EHsc-
! else
EH_FLAGS=/EHsc
! endif
! endif
!else
! ifdef LKG6COMPILER
EH_FLAGS=/EHs-c-
! else
EH_FLAGS=/GX-
! endif
!endif
!ifdef USE_RTTI
RTTI_FLAGS=/GR
!else
RTTI_FLAGS=/GR-
!endif
!if "$(BUFFER_OVERFLOW_CHECKS)" == "" || \
"$(BUFFER_OVERFLOW_CHECKS)" == "NO_NTDLL"
BUFFER_OVERFLOW_CHECKS=1
!endif
!if "$(BUFFER_OVERFLOW_CHECKS)" == "1" || \
("$(BUFFER_OVERFLOW_CHECKS)" == "CHK" && !$(FREEBUILD))
! if "$(TARGETTYPE)" == "DRIVER" || \
"$(TARGETTYPE)" == "EXPORT_DRIVER" || \
"$(TARGETTYPE)" == "DRIVER_LIBRARY"
! if "$(DRIVERTYPE)" != "VXD"
BO_FLAGS=/GS
BO_LIB=$(SDK_LIB_PATH)\BufferOverflowK.lib
DRIVER_ENTRY=GsDriverEntry
! endif
! else
! if "$(TARGETTYPE)" == "GDI_DRIVER"
BO_FLAGS=/GS
BO_LIB=$(SDK_LIB_PATH)\BufferOverflowGDI.lib
GDI_DRIVER_ENTRY=GsDrvEnableDriver
! else
! if "$(TARGETTYPE)" == "MINIPORT"
! if defined(_NT_TARGET_VERSION)
! if $(_NT_TARGET_VERSION) >= 0x502
BO_FLAGS=/GS
BO_LIB=$(SDK_LIB_PATH)\BufferOverflowK.lib
DRIVER_ENTRY=GsDriverEntry
! endif
! endif
! else
! if "$(TARGETTYPE)" == "DYNLINK"
! if !defined(RESOURCE_ONLY_DLL)
! if !(("$(UMTYPE)"== "nt") || ("$(UMTYPE)"=="ntss"))
BO_FLAGS=/GS
BO_LIB=$(SDK_LIB_PATH)\BufferOverflowU.lib
! if "$(DLLENTRY)" == "-noentry"
! if defined(USE_MSVCRT) || defined(USE_LIBCMT)
DLLENTRY=-entry:_DllMainCRTStartup@12
! else
DLLENTRY=-entry:_DllMainCRTStartupForGS@12
! endif
! endif
! endif
! endif
! else
! if ("$(UMTYPE)"== "nt") || ("$(UMTYPE)"=="ntss")
BO_FLAGS=/GS
! IF "$(NTTEST)" != ""
BO_LIB=$(SDK_LIB_PATH)\BufferOverflowK.lib
! else
UMENTRY=-entry:NtProcessStartupForGS@4
BO_LIB=$(SDK_LIB_PATH)\BufferOverflow.lib
! endif
! else
BO_FLAGS=/GS
BO_LIB=$(SDK_LIB_PATH)\BufferOverflowU.lib
! endif
! endif
! endif
! endif
! endif
!else
! if "$(BUFFER_OVERFLOW_CHECKS)" == "NTDLL"
# Needed for EXEs that can't link to kernel32.dll (smss.exe, sprestrt.exe, etc)
BO_FLAGS=/GS
! if ("$(UMTYPE)"== "nt") || ("$(UMTYPE)"=="ntss")
UMENTRY=-entry:NtProcessStartupForGS@4
! endif
! if "$(TARGETTYPE)" == "DYNLINK" && !defined(RESOURCE_ONLY_DLL) && "$(DLLENTRY)" == "-noentry"
! if "$(TARGETNAME)" != "ntdll"
DLLENTRY=-entry:_DllMainCRTStartupForGS@12
! endif
! endif
BO_LIB=$(SDK_LIB_PATH)\BufferOverflow.lib
! else
! if "$(BUFFER_OVERFLOW_CHECKS)" == "GDI"
# Needed for LIBs linked into drivers of type GDI_DRIVER
BO_FLAGS=/GS
BO_LIB=$(SDK_LIB_PATH)\BufferOverflowGDI.lib
! else
! if "$(BUFFER_OVERFLOW_CHECKS)" == "COMPILE_ONLY"
BO_FLAGS=/GS
! endif
! endif
! endif
!endif # Overflow checks
!ifndef X86_CPU_OPTIMIZATION
X86_CPU_OPTIMIZATION=/G6
!endif
# Undocumented switch definitions
# /QIfdiv- : Don't emit code to test for bad pentiums
ERATTA_FLAGS=/QIfdiv-
# Hotpatch support
ERATTA_FLAGS=$(ERATTA_FLAGS) /hotpatch
LINKER_FLAGS=$(LINKER_FLAGS) /functionpadmin:5
!ifndef NO_SAFESEH
LINKER_FLAGS=$(LINKER_FLAGS) /safeseh
!endif
!if defined(X86_STRUCT_PACKING)
MSC_STRUCT_PACKING=$(X86_STRUCT_PACKING)
!elseif !defined(MSC_STRUCT_PACKING)
MSC_STRUCT_PACKING=/Zp8
!endif
STDFLAGS= /c /Zl $(MSC_STRUCT_PACKING) /Gy /Gm- $(CBSTRING) $(MSC_WARNING_LEVEL) $(MSC_CALL_TYPE) \
$(EH_FLAGS) \
$(RTTI_FLAGS) $(STRING_POOLING) $(BO_FLAGS)
!ifndef LKG6COMPILER
STDFLAGS= $(STDFLAGS) $(X86_CPU_OPTIMIZATION) /Ze /Gi- $(ERATTA_FLAGS)
!endif
!IF "$(X86_STDCALL)" == "0"
MSC_CALL_TYPE=/Gd
MSC_CALL_DEFINE=
!ELSE
! IF "$(X86_STDCALL)" == "2"
MSC_CALL_TYPE=/Gr
MSC_CALL_DEFINE=
! ELSE
MSC_CALL_TYPE=/Gz
MSC_CALL_DEFINE=-DSTD_CALL
! ENDIF
!ENDIF
!IF $(FREEBUILD)
ASM_DBG_DEFINES=-DDBG=0
!ENDIF
TARGET_DBG_DEFINES= $(TARGET_DBG_DEFINES) -DFPO=0
DBGFLAGS=$(DBGFLAGS) /Oy-
!ifndef USE_PDB_TO_COMPILE
DBGFLAGS=$(DBGFLAGS:/Zi=-Z7)
DBGFLAGS=$(DBGFLAGS:-Zi=-Z7)
!else
! ifndef USE_MSHTML_PDB_RULES
! if "$(TARGETTYPE)" == "LIBRARY"
DBGFLAGS=$(DBGFLAGS) /Fd$(TARGETPATH)\$(TARGET_DIRECTORY)\$(TARGETNAME).pdb
! else
DBGFLAGS=$(DBGFLAGS) /Fd$(MAKEDIR)\$(_OBJ_DIR)\x86^\
! endif
! else
! ifndef TARGETPDB
TARGETPDB=$(TARGETNAME)
! endif
! ifndef ROOT
ROOT=$(MAKEDIR)
! endif
DBGFLAGS=$(DBGFLAGS) /Fd$(ROOT)\$(_OBJ_DIR)\x86\$(TARGETPDB).pdb
! endif
!endif
!ifndef NO_BROWSER_INFO
! ifdef BROWSER_INFO
DBGFLAGS=$(DBGFLAGS) /FR$(MAKEDIR)\$(_OBJ_DIR)\x86^\
! endif
!endif
#
# x86 option control
#
!IF "$(HALTYPE)" == ""
HALDEF=
!ELSE
HALDEF=-D$(HALTYPE)=1
!ENDIF
STD_DEFINES= -D_X86_=1 -Di386=1 $(HALDEF) $(MSC_CALL_DEFINE) $(STD_DEFINES)
CDEFINES=$(STD_DEFINES) $(TARGET_DBG_DEFINES) \
$(LIBC_DEFINES) $(C_DEFINES) $(NET_C_DEFINES) $(MFC_DEFINES)
CFLAGS=$(X86_FLAGS) $(NTX86FLAGS) $(STDFLAGS) $(DBGFLAGS) $(PERFFLAGS) $(USER_C_FLAGS)
!ifdef MANAGED_CXX
CFLAGS=/clr $(CFLAGS)
!endif
X86_ASMFLAGS=$(X86_ADBGFLAGS) $(STD_DEFINES) $(ASM_DBG_DEFINES)\
$(TARGET_DBG_DEFINES) $(ASM_DEFINES)
X86_CDEFINES=$(CDEFINES)
X86_CFLAGS=$(CFLAGS)
!if "$(SUBSTITUTE_X86_CC)" != ""
CC_NAME = $(SUBSTITUTE_X86_CC) -nologo
!else
! if defined(RAZZLETOOLPATH) && !defined( PREFAST_ADD_PATH )
CC_NAME = $(RAZZLETOOLPATH)\x86\cl -nologo
! else
CC_NAME=cl -nologo
! endif
CC_NAME=cl -nologo
!endif
C_COMPILER_NAME = $(CC_NAME)
CXX_COMPILER_NAME = $(CC_NAME)
C_PREPROCESSOR_NAME = $(CC_NAME)
CS_COMPILER_NAME = csc.exe -nologo
VB_NET_COMPILER_NAME = vbc.exe -nologo
!if "$(UNSAFE_CODE_SWITCH)" == ""
! if defined(MANAGED_VB)
UNSAFE_CODE_SWITCH=
! else
! if "$(UNSAFE_CODE)" == "1"
UNSAFE_CODE_SWITCH=/unsafe+
! else
UNSAFE_CODE_SWITCH=/unsafe-
! endif
! endif
!endif
MANAGED_STD_FLAGS = $(MANAGED_DBG_FLAGS) /warnaserror+ $(UNSAFE_CODE_SWITCH)
!if defined(MANAGED_VB)
MANAGED_STD_FLAGS = $(MANAGED_STD_FLAGS) $(USER_VB_NET_FLAGS)
!else
MANAGED_STD_FLAGS = $(MANAGED_STD_FLAGS) $(USER_CS_FLAGS)
!endif
!if defined(PERF_INSTRUMENTATION)
MANAGED_STD_FLAGS=$(MANAGED_STD_FLAGS) /define:PROFILE
!endif
!ifndef X86_ASSEMBLER_NAME
X86_ASSEMBLER_NAME = ml.exe /safeseh
!endif
GLOBAL_C_FLAGS = -Ix86\ -I. $(INCPATH1) $(CDEFINES) $(CFLAGS)
!ifdef LKG6COMPILER
GLOBAL_C_FLAGS=$(CRT_BUILD_FLAGS) $(GLOBAL_C_FLAGS)
!endif
NP_COMPILER_FLAGS = $(GLOBAL_C_FLAGS) $(COMPILER_WARNINGS)
C_COMPILER_FLAGS = $(NP_COMPILER_FLAGS) $(PRECOMPILED)
CXX_COMPILER_FLAGS = $(NP_COMPILER_FLAGS) $(PRECOMPILED_CXX) $(MSC_CPPFLAGS) $(NTCPPFLAGS)
C_PREPROCESSOR_FLAGS = $(GLOBAL_C_FLAGS) -EP -Tc
C_PREPROCESSOR = $(C_PREPROCESSOR_NAME) $(C_PREPROCESSOR_FLAGS)
C_COMPILER = $(C_COMPILER_NAME) $(C_COMPILER_FLAGS)
NP_C_COMPILER = $(C_COMPILER_NAME) $(NP_COMPILER_FLAGS)
CXX_COMPILER = $(CXX_COMPILER_NAME) $(CXX_COMPILER_FLAGS)
!if defined(NOMASMCOMPATIBILITY)
X86_ASSEMBLER=$(X86_ASSEMBLER_NAME) -c -coff -Cx -nologo -Ix86\ -I. $(INCPATH1) $(X86_ASMFLAGS)
!else
X86_ASSEMBLER=$(X86_ASSEMBLER_NAME) -c -coff -Cx -nologo -Ix86\ -I. $(INCPATH1) -Zm $(X86_ASMFLAGS)
!endif
ECHO_MSG=$(C_COMPILER) $<
ECHO_MSG_P=$(NP_C_COMPILER) $**
ECHO_CXX_MSG=$(CXX_COMPILER) $<
ECHO_PRECOMPILED_MSG1=$(C_COMPILER_NAME) $(C_COMPILER_FLAGS) /Yl$(TARGETNAME) /Yc$(?F) $(HEADERFILE) \
$(HEADEROBJ) $(PRECOMPILED_FLAG) $(PRECOMPILED_SOURCEFILE)
ECHO_PRECOMPILED_MSG2=$(C_COMPILER_NAME) $(C_COMPILER_FLAGS) /Yl$(TARGETNAME) /Yc$(?F) $(HEADERFILE) \
$(HEADEROBJ) $(PRECOMPILED_FLAG)
{}.c{}.asm:
$(C_COMPILER_NAME) @<< /Fa $(MAKEDIR)\$(<F)
$(C_COMPILER_FLAGS: =
)
$(C_COMPILER_FLAGS:##= )
<<NOKEEP
{..\x86\}.asm{}.lst:
$(X86_ASSEMBLER) /Fl$@ /Fo$(_OBJ_DIR)\x86\$(@B).obj $(MAKEDIR)\$<
{x86\}.asm{}.lst:
$(X86_ASSEMBLER) /Fl$@ /Fo$(MAKEDIR)\$(_OBJ_DIR)\x86\$(@B).obj $(MAKEDIR)\$<
{..\x86\}.asm{$(_OBJ_DIR)\x86\}.obj:
$(X86_ASSEMBLER) -Fo$(MAKEDIR)\$@ $(MAKEDIR)\$<
{$(_OBJ_DIR)\x86\}.asm{$(_OBJ_DIR)\x86\}.obj:
$(X86_ASSEMBLER) -Fo$(MAKEDIR)\$@ $(MAKEDIR)\$<
{x86\}.asm{$(_OBJ_DIR)\x86\}.obj:
$(X86_ASSEMBLER) -Fo$(MAKEDIR)\$@ $(MAKEDIR)\$<
!IFDEF _NTX86LIBS
_NTLIBS=$(_NTX86LIBS)
!ENDIF
COPYDST=$(X86COPYDST)
LIB_COPY=ntx86cp.cmd
!IF "$(NTDEBUGTYPE)" == "windbg" || "$(NTDEBUGTYPE)" == "both"
NTTEST_LINK_OPTIONS=-entry:KiSystemStartup@4
!ELSE
NTTEST_LINK_OPTIONS=-base:0x80100000 -entry:KiSystemStartup@4
!ENDIF
!if "$(TARGETTYPE)" != "DRIVER" && \
"$(TARGETTYPE)" != "DRIVER_LIBRARY" && \
"$(TARGETTYPE)" != "EXPORT_DRIVER" && \
"$(TARGETTYPE)" != "HAL" && \
"$(TARGETTYPE)" != "GDI_DRIVER" && \
"$(TARGETTYPE)" != "MINIPORT"
! if defined(LINKER_WIN98OPT) || defined (CHICAGO_PRODUCT)
LINKER_FLAGS=$(LINKER_FLAGS) /opt:win98
! else
LINKER_FLAGS=$(LINKER_FLAGS) /opt:nowin98
! endif
!endif
# SEH support for libs built with an older compiler
!if defined(_NT_TARGET_VERSION)
! if $(_NT_TARGET_VERSION) < 0x502 && $(_NT_TOOLS_VERSION) >= 0x700
TARGETLIBS=$(TARGETLIBS) $(DDK_LIB_PATH)\sehupd.lib
! endif
!endif