forked from AR1972/NTOSBE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.plt
621 lines (509 loc) · 11.3 KB
/
makefile.plt
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
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
#
# If not defined, specify where to get incs and libs.
#
# A couple of overrides
!ifndef _NT_TARGET_VERSION # Default to current OS version
_NT_TARGET_VERSION = 0x450
!endif
!ifndef _NT_TOOLS_VERSION # Default to current VC version
_NT_TOOLS_VERSION = 0x700
!endif
!ifndef SDK_PATH
SDK_PATH = $(NTROOT)\public\sdk
!endif
!ifndef SDK_INC_PATH
SDK_INC_PATH = $(SDK_PATH)\inc
!endif
!ifndef SDK_INC16_PATH
SDK_INC16_PATH = $(SDK_PATH)\inc16
!endif
!ifndef SDK_LIB_DEST
SDK_LIB_DEST = $(SDK_PATH)\lib
!endif
!ifndef SDK_LIB_PATH
SDK_LIB_PATH = $(SDK_LIB_DEST)\*
!endif
!ifndef SDK_LIB16_PATH
SDK_LIB16_PATH=$(SDK_PATH)\lib16
!endif
!ifndef DDK_PATH
DDK_PATH = $(NTROOT)\public\ddk
!endif
!ifndef DDK_INC_PATH
DDK_INC_PATH = $(DDK_PATH)\inc
!endif
!ifndef DDK_LIB_DEST
DDK_LIB_DEST = $(DDK_PATH)\lib
!endif
!ifndef DDK_LIB_PATH
DDK_LIB_PATH = $(DDK_LIB_DEST)\*
!endif
!ifndef IFSKIT_PATH
IFSKIT_PATH = $(NTROOT)\public\ifskit
!endif
!ifndef IFSKIT_INC_PATH
IFSKIT_INC_PATH = $(IFSKIT_PATH)\inc
!endif
!ifndef IFSKIT_LIB_DEST
IFSKIT_LIB_DEST = $(IFSKIT_PATH)\lib
!endif
!ifndef IFSKIT_LIB_PATH
IFSKIT_LIB_PATH = $(IFSKIT_LIB_DEST)\*
!endif
!ifndef HALKIT_PATH
HALKIT_PATH = $(NTROOT)\public\halkit
!endif
!ifndef HALKIT_INC_PATH
HALKIT_INC_PATH = $(HALKIT_PATH)\inc
!endif
!ifndef HALKIT_LIB_DEST
HALKIT_LIB_DEST = $(HALKIT_PATH)\lib
!endif
!ifndef HALKIT_LIB_PATH
HALKIT_LIB_PATH = $(HALKIT_LIB_DEST)\*
!endif
!ifndef PROCESSOR_PATH
PROCESSOR_PATH = $(NTROOT)\public\processorkit
!endif
!ifndef PROCESSOR_INC_PATH
PROCESSOR_INC_PATH = $(PROCESSOR_PATH)\inc
!endif
!ifndef PROCESSOR_LIB_DEST
PROCESSOR_LIB_DEST = $(PROCESSOR_PATH)\lib
!endif
!ifndef PROCESSOR_LIB_PATH
PROCESSOR_LIB_PATH = $(PROCESSOR_LIB_DEST)\*
!endif
!ifndef WDM_INC_PATH
WDM_INC_PATH = $(DDK_INC_PATH)\wdm
!endif
!ifndef CRT_INC_PATH
CRT_INC_PATH = $(SDK_INC_PATH)\crt
!endif
!ifndef IOSTREAMS_INC_PATH
IOSTREAMS_INC_PATH = $(SDK_INC_PATH)\crt\iostreams
!endif
!ifndef STL6_INC_PATH
STL6_INC_PATH = $(SDK_INC_PATH)\crt\stl60
!endif
!ifndef CRT_LIB_PATH
CRT_LIB_PATH = $(SDK_LIB_PATH)
!endif
!ifndef OAK_INC_PATH
OAK_INC_PATH = $(NTROOT)\public\oak\inc
!endif
!ifndef OAK_BIN_PATH
OAK_BIN_PATH = $(NTROOT)\public\oak\binr
!endif
!ifndef WPP_CONFIG_PATH
# If this ever changes you must change the DDK's setenv.bat
WPP_CONFIG_PATH = $(BEROOT)\WppConfig
!endif
!ifndef PUBLIC_INTERNAL_PATH
PUBLIC_INTERNAL_PATH = $(NTROOT)\public\internal
!endif
COPYRIGHT_STRING = Copyright (c) Microsoft Corporation. All rights reserved.
!ifndef PUBLISH_CMD
PUBLISH_CMD=@perl $(BEROOT)\scripts\publish.pl publish.log
!endif
!ifndef BINDROP_CMD
! ifdef NOLINK
# Only drop binaries if we are linking in this pass.
BINDROP_CMD=rem No bindrop pass during link
!else
BINDROP_CMD=perl $(BEROOT)\scripts\publish.pl $(_PROJECT_)_publish.log
!endif
!endif
!ifndef BUILD_PASS
# Old build.exe. Guess the correct pass.
!ifdef PASS0ONLY
BUILD_PASS=PASS0
!elseif defined(LINKONLY)
BUILD_PASS=PASS2
!elseif defined(NOLINK) && !defined(PASS0ONLY)
BUILD_PASS=PASS1
!else
# catch all - someone used build -z or build -2
BUILD_PASS=PASSALL
!endif
!endif
#
# Set the flag which indicates whether we should be publishing binaries
# to 0 by default. the project.mk file is responsible for parsing
# BINARY_PUBLISH_PROJECTS to determine if its value should be changed.
#
BINPUBLISH=0
#
# Define global project paths.
#
!include paths.inc
#
# Find and include the project configuration file.
#
!if exists(.\project.mk)
_PROJECT_MK_PATH=.
!elseif exists(..\project.mk)
_PROJECT_MK_PATH=..
!elseif exists(..\..\project.mk)
_PROJECT_MK_PATH=..\..
!elseif exists(..\..\..\project.mk)
_PROJECT_MK_PATH=..\..\..
!elseif exists(..\..\..\..\project.mk)
_PROJECT_MK_PATH=..\..\..\..
!elseif exists(..\..\..\..\..\project.mk)
_PROJECT_MK_PATH=..\..\..\..\..
!elseif exists(..\..\..\..\..\..\project.mk)
_PROJECT_MK_PATH=..\..\..\..\..\..
!elseif exists(..\..\..\..\..\..\..\project.mk)
_PROJECT_MK_PATH=..\..\..\..\..\..\..
!elseif exists(..\..\..\..\..\..\..\..\project.mk)
_PROJECT_MK_PATH=..\..\..\..\..\..\..\..
!elseif exists(..\..\..\..\..\..\..\..\..\project.mk)
_PROJECT_MK_PATH=..\..\..\..\..\..\..\..\..
!elseif exists(..\..\..\..\..\..\..\..\..\..\project.mk)
_PROJECT_MK_PATH=..\..\..\..\..\..\..\..\..\..
!elseif exists(..\..\..\..\..\..\..\..\..\..\..\project.mk)
_PROJECT_MK_PATH=..\..\..\..\..\..\..\..\..\..\..
!elseif exists(..\..\..\..\..\..\..\..\..\..\..\..\project.mk)
_PROJECT_MK_PATH=..\..\..\..\..\..\..\..\..\..\..\..
!elseif exists(..\..\..\..\..\..\..\..\..\..\..\..\..\project.mk)
_PROJECT_MK_PATH=..\..\..\..\..\..\..\..\..\..\..\..\..
!elseif exists(..\..\..\..\..\..\..\..\..\..\..\..\..\..\project.mk)
_PROJECT_MK_PATH=..\..\..\..\..\..\..\..\..\..\..\..\..\..
!elseif exists(..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\project.mk)
_PROJECT_MK_PATH=..\..\..\..\..\..\..\..\..\..\..\..\..\..\..
!endif
!if "$(_PROJECT_MK_PATH)" != ""
#!message "Including $(_PROJECT_MK_PATH)\project.mk"
!include $(_PROJECT_MK_PATH)\project.mk
!if exists($(_PROJECT_MK_PATH)\myproject.mk)
!include $(_PROJECT_MK_PATH)\myproject.mk
!endif
!else
#!message "Unable to find project.mk. Update makefile.plt or create project.mk."
!endif
!IFDEF _PROJECT_
PROJECT_ROOT=$(NTROOT)\$(_PROJECT_)
PROJECT_PUBLIC_PATH=$(PUBLIC_INTERNAL_PATH)\$(_PROJECT_)
PROJECT_INC_PATH=$(PROJECT_PUBLIC_PATH)\inc
PRIVATE_INC_PATH=$(PROJECT_INC_PATH)
PROJECT_LIB_DEST=$(PROJECT_PUBLIC_PATH)\lib
PROJECT_LIB_PATH=$(PROJECT_LIB_DEST)\$(TARGET_DIRECTORY)
PROJECT_INF_PATH=$(PROJECT_PUBLIC_PATH)\inf
!ELSE
#!message "ERROR: _PROJECT_ is not defined. Should be defined in project.mk."
!ENDIF
#
# If not defined, define the build message banner.
#
!IFNDEF BUILDMSG
BUILDMSG=
!ENDIF
!if ("$(NTDEBUG)" == "") || ("$(NTDEBUG)" == "ntsdnodbg")
FREEBUILD=1
! ifndef BUILD_TYPE
BUILD_TYPE=fre
! endif
!else
FREEBUILD=0
! ifndef BUILD_TYPE
BUILD_TYPE=chk
! endif
!endif
# Allow alternate object directories.
!if !defined(BUILD_ALT_DIR) && defined(CHECKED_ALT_DIR) && !$(FREEBUILD)
BUILD_ALT_DIR=d
!endif
_OBJ_DIR = obj$(BUILD_ALT_DIR)
#
# Determine which target is being built (x86 or ia64) and define
# the appropriate target variables.
#
!IFNDEF X86
X86=0
!ENDIF
!IFNDEF AMD64
AMD64=0
!ENDIF
!IFNDEF MIPS
MIPS=0
!ENDIF
!IFNDEF PPC
PPC=0
!ENDIF
!IFNDEF MPPC
MPPC=0
!ENDIF
!IFNDEF IA64
IA64=0
!ENDIF
!IFNDEF ARM
ARM=0
!ENDIF
# Disable for now.
MIPS=0
AXP64=0
ALPHA=0
#
# Default to building for the x86 target, if no target is specified.
#
!IF !$(X86)
! IF !$(AMD64)
! IF !$(MIPS)
! IF !$(MPPC)
! IF !$(IA64)
! IF !$(ARM)
X86=1
! ENDIF
! ENDIF
! ENDIF
! ENDIF
! ENDIF
!ENDIF
#
# Define the target platform specific information.
#
!if $(X86)
ASM_SUFFIX=asm
ASM_INCLUDE_SUFFIX=inc
TARGET_BRACES=
!ifdef SUBSTITUTE_X86_CC
TARGET_CPP=$(SUBSTITUTE_X86_CC)
!else
TARGET_CPP=cl
!endif
MIDL_PLATFORM_FLAG=-win32
TARGET_DEFINES=-Di386 -D_X86_
TARGET_DIRECTORY=x86
TLB_SWITCHES=/tlb
!ifndef NTTREE
! ifdef NTX86TREE
NTTREE=$(NTX86TREE)
! endif
!endif
VCCOM_SUPPORTED=1
SCP_SUPPORTED=1
WIN64=0
PLATFORM_MFC_VER=0x0600
MACHINE_TYPE=ix86
ANSI_ANNOTATION=0
LTCG_DRIVER=0
LTCG_DRIVER_LIBRARY=0
LTCG_DYNLINK=0
LTCG_EXPORT_DRIVER=0
LTCG_GDI_DRIVER=0
LTCG_HAL=0
LTCG_LIBRARY=0
LTCG_MINIPORT=0
LTCG_PROGRAM=0
LTCG_PROGLIB=0
LTCG_UMAPPL_NOLIB=0
TARGET_CSC=csc
!elseif $(AMD64)
ASM_SUFFIX=asm
ASM_INCLUDE_SUFFIX=inc
TARGET_BRACES=
TARGET_CPP=cl
TARGET_DEFINES=-D_AMD64_ -D_WIN64 -D_AMD64_WORKAROUND_
MIDL_PLATFORM_FLAG=
TARGET_DIRECTORY=amd64
TLB_SWITCHES=/tlb
!ifndef HOST_TARGETCPU
HOST_TARGETCPU=x86
!endif
!ifndef NTTREE
! ifdef NTAMD64TREE
NTTREE=$(NTAMD64TREE)
! endif
!endif
VCCOM_SUPPORTED=1
SCP_SUPPORTED=0
WIN64=1
PLATFORM_MFC_VER=0x0600
MACHINE_TYPE=amd64
ANSI_ANNOTATION=0
LTCG_DRIVER=0
LTCG_DRIVER_LIBRARY=0
LTCG_DYNLINK=0
LTCG_EXPORT_DRIVER=0
LTCG_GDI_DRIVER=0
LTCG_HAL=0
LTCG_LIBRARY=0
LTCG_MINIPORT=0
LTCG_PROGRAM=0
LTCG_PROGLIB=0
LTCG_UMAPPL_NOLIB=0
!elseif $(MIPS)
ASM_SUFFIX=s
ASM_INCLUDE_SUFFIX=h
TARGET_BRACES=-B
TARGET_CPP=cl
TARGET_DEFINES=-DMIPS -D_MIPS_
TARGET_DIRECTORY=mips
TLB_SWITCHES=/tlb
!ifndef NTTREE
! ifdef NTMIPSTREE
NTTREE=$(NTMIPSTREE)
! endif
!endif
VCCOM_SUPPORTED=0
SCP_SUPPORTED=0
WIN64=0
PLATFORM_MFC_VER=0x0600
MACHINE_TYPE=mips
ANSI_ANNOTATION=0
LTCG_DRIVER=0
LTCG_DRIVER_LIBRARY=0
LTCG_DYNLINK=0
LTCG_EXPORT_DRIVER=0
LTCG_GDI_DRIVER=0
LTCG_HAL=0
LTCG_LIBRARY=0
LTCG_MINIPORT=0
LTCG_PROGRAM=0
LTCG_PROGLIB=0
LTCG_UMAPPL_NOLIB=0
!elseif $(MPPC)
ASM_SUFFIX=s
ASM_INCLUDE_SUFFIX=h
TARGET_BRACES=-B
TARGET_CPP=cl
TARGET_DEFINES=-DMPPC -D_MPPC_
TARGET_DIRECTORY=mppc
TLB_SWITCHES=/tlb
WIN64=0
PLATFORM_MFC_VER=0x0421
MACHINE_TYPE=mppc
!ifndef NTTREE
! ifdef NTMPPCTREE
NTTREE=$(NTMPPCTREE)
! endif
!endif
ANSI_ANNOTATION=1
LTCG_DRIVER=0
LTCG_DRIVER_LIBRARY=0
LTCG_DYNLINK=0
LTCG_EXPORT_DRIVER=0
LTCG_GDI_DRIVER=0
LTCG_HAL=0
LTCG_LIBRARY=0
LTCG_MINIPORT=0
LTCG_PROGRAM=0
LTCG_PROGLIB=0
LTCG_UMAPPL_NOLIB=0
!elseif $(IA64)
ASM_SUFFIX=s
ASM_INCLUDE_SUFFIX=h
TARGET_BRACES=-B
TARGET_CPP=cl
TARGET_DEFINES=-DIA64 -D_IA64_
TARGET_DIRECTORY=ia64
MIDL_PLATFORM_FLAG=-ia64
TLB_SWITCHES=/tlb
# default to X86 for now
!ifndef HOST_TARGETCPU
HOST_TARGETCPU=x86
!endif
!ifndef NTTREE
! ifdef NTIA64TREE
NTTREE=$(NTIA64TREE)
! endif
!endif
WIN64=1
PLATFORM_MFC_VER=0x0600
SCP_SUPPORTED=0
MACHINE_TYPE=ia64
ANSI_ANNOTATION=0
LTCG_DRIVER=0
LTCG_DRIVER_LIBRARY=0
LTCG_DYNLINK=0
LTCG_EXPORT_DRIVER=0
LTCG_GDI_DRIVER=0
LTCG_HAL=0
LTCG_LIBRARY=0
LTCG_MINIPORT=0
LTCG_PROGRAM=0
LTCG_PROGLIB=0
LTCG_UMAPPL_NOLIB=0
!elseif $(ARM)
ASM_SUFFIX=s
ASM_INCLUDE_SUFFIX=inc
TARGET_BRACES=
TARGET_CPP=clarm
TARGET_DEFINES=-D_ARM_
TARGET_DIRECTORY=arm
TLB_SWITCHES=/tlb
!ifndef HOST_TARGETCPU
HOST_TARGETCPU=x86
!endif
!ifndef NTTREE
! ifdef NTARMTREE
NTTREE=$(NTARMTREE)
! endif
!endif
VCCOM_SUPPORTED=0
SCP_SUPPORTED=0
WIN64=0
PLATFORM_MFC_VER=0x0600
MACHINE_TYPE=arm
ANSI_ANNOTATION=0
LTCG_DRIVER=0
LTCG_DRIVER_LIBRARY=0
LTCG_DYNLINK=0
LTCG_EXPORT_DRIVER=0
LTCG_GDI_DRIVER=0
LTCG_HAL=0
LTCG_LIBRARY=0
LTCG_MINIPORT=0
LTCG_PROGRAM=0
LTCG_PROGLIB=0
LTCG_UMAPPL_NOLIB=0
!else
!error Must define the target as x86, mips, mppc, ia64, amd64, or arm.
!endif
#
# These flags don't depend on x86 etc. however have to be in this file.
#
# MIDL_OPTIMIZATION is the optimization flag set for the current NT.
# MIDL_OPTIMIZATION_NO_ROBUST is the current optimization without robust.
#
!ifdef MIDL_PROTOCOL
MIDL_PROTOCOL_DEFAULT=-protocol $(MIDL_PROTOCOL)
!else
# MIDL_PROTOCOL_DEFAULT=-protocol all
!endif
!IFNDEF MIDL_OPTIMIZATION
MIDL_OPTIMIZATION=-Oicf -robust -error all $(MIDL_PROTOCOL_DEFAULT) $(MIDL_PLATFORM_FLAG)
!ENDIF
!if $(WIN64)
MIDL_OPTIMIZATION_NO_ROBUST=-Oicf -error all $(MIDL_PLATFORM_FLAG)
MIDL_OPTIMIZATION_NT4=-Oicf -error all $(MIDL_PLATFORM_FLAG)
!else
MIDL_OPTIMIZATION_NO_ROBUST=-Oicf -error all -no_robust $(MIDL_PLATFORM_FLAG)
MIDL_OPTIMIZATION_NT4=-Oicf -error all -no_robust $(MIDL_PLATFORM_FLAG)
!endif
MIDL_OPTIMIZATION_NT5=-Oicf -robust -error all $(MIDL_PROTOCOL_DEFAULT) $(MIDL_PLATFORM_FLAG)
!ifdef SUBSTITUTE_MIDL_CC
MIDL_CPP=$(SUBSTITUTE_MIDL_CC)
!else
MIDL_CPP=$(TARGET_CPP)
!endif
MIDL_FLAGS=$(TARGET_DEFINES) -D_WCHAR_T_DEFINED
#
# If not defined, simply set to default
#
!IFNDEF HOST_TARGETCPU
HOST_TARGETCPU=$(TARGET_DIRECTORY)
!ENDIF
! if $(WIN64)
MIDL_ALWAYS_GENERATE_STUBS=1
! else
MIDL_ALWAYS_GENERATE_STUBS=0
! endif
CLEANSE_PUBLISHED_HDR=copy
PATH_TOOLS16=$(BEROOT)\tools\x86\tools16
# If a build path is defined, use it.
!ifdef BUILD_PATH
PATH=$(BUILD_PATH)
!endif
BINPLACE_PLACEFILE_DIR=$(BEROOT)