arves100

Win32.Mak | (C) Microsoft

Apr 26th, 2017
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 20.25 KB | None | 0 0
  1. # Win32.Mak - Win32 application master NMAKE definitions file for the
  2. #     Microsoft Windows SDK programming samples
  3. #           Copyright (C) Microsoft Corporation
  4. # -------------------------------------------------------------------------
  5. # This files should be included at the top of all MAKEFILEs as follows:
  6. #  !include <Win32.Mak>
  7. # -------------------------------------------------------------------------
  8. #
  9. # Define APPVER = [ 4.0 | 5.0 | 5.01 | 5.02 | 6.0 | 6.1] prior to including win32.mak to get
  10. #  build time checking for version dependencies and to mark the executable
  11. #  with version information.
  12. #
  13. # Define TARGETOS = [ WIN95 | WINNT | BOTH ] prior to including win32.mak
  14. #  to get some build time checking for platform dependencies.
  15. #
  16. # Define TARGETLANG = [ LANG_JAPANESE | LANG_CHINESE | LANG_KOREAN ] prior
  17. #  to including win32.mak to getcompile & link flags for building
  18. #  applications to run on Far-East Windows. (This is an optional parameter.
  19. #  The system locale is the default.)
  20. #
  21. # Define _WIN32_IE = [ 0x0300 | 0x0400 | 0x0500 | 0x0600 | 0x0700 | 0x0800] prior to including win32.mak to
  22. #  get compile and link flags for building applications and components to
  23. #  run on Internet Explorer. (This is an optional parameter.  IE 4.0 is
  24. #  the default.)
  25. #
  26. # -------------------------------------------------------------------------
  27. # NMAKE Options
  28. #
  29. # Use the table below to determine the additional options for NMAKE to
  30. # generate various application debugging, profiling and performance tuning
  31. # information.
  32. #
  33. # Application Information Type         Invoke NMAKE
  34. # ----------------------------         ------------
  35. # For No Debugging Info                nmake nodebug=1
  36. # For Working Set Tuner Info           nmake tune=1
  37. # For Call Attributed Profiling Info   nmake profile=1
  38. #
  39. # Note: The three options above are mutually exclusive (you may use only
  40. #       one to compile/link the application).
  41. #
  42. # Note: creating the environment variables NODEBUG, TUNE, and PROFILE is an
  43. #       alternate method to setting these options via the nmake command line.
  44. #
  45. # Note: TUNE and PROFILE do nothing for 64bit compilation
  46. #
  47. # Additional NMAKE Options             Invoke NMAKE
  48. # ----------------------------         ------------
  49. # For No ANSI NULL Compliance          nmake no_ansi=1
  50. # (ANSI NULL is defined as PVOID 0)
  51. #
  52. # =========================================================================
  53. # Build Rules Quick Start
  54. #
  55. # To build one of the following types of executables, use the specified
  56. # compiler and linker command-line options.
  57. #
  58. #  ---------------------------------------------------------------------------
  59. #   To build:         |  Compiler Options      | Linker options (pick one
  60. #                     |                        | line. con = console,
  61. #                     |                        | gui = GUI, ole = GUI OLE)
  62. #  ---------------------------------------------------------------------------
  63. #  Single threaded    | cdebug cflags cvars    | ldebug guilflags guilibs
  64. #  app with static    |                        | ldebug conlflags conlibs
  65. #  CRT                |                        | ldebug guilflags olelibs
  66. #  ---------------------------------------------------------------------------
  67. #  Multithreaded app  | cdebug cflags cvarsmt  | ldebug guilflags guilibsmt
  68. #  with static CRT    |                        | ldebug conlflags conlibsmt
  69. #                     |                        | ldebug guilflags olelibsmt
  70. #  ---------------------------------------------------------------------------
  71. #  Single or multi-   | cdebug cflags cvarsdll | ldebug guilflags guilibsdll
  72. #  threaded app with  |                        | ldebug conlflags conlibsdll
  73. #  DLL version of CRT |                        | ldebug guilflags olelibsdll
  74. #  (MSVCRT.DLL)       |                        |
  75. #  ---------------------------------------------------------------------------
  76. #  DLL with static    | cdebug cflags cvarsmt  | ldebug dlllflags guilibsmt
  77. #  CRT*               |                        | ldebug dlllflags conlibsmt
  78. #                     |                        | ldebug dlllflags olelibsmt
  79. #  ---------------------------------------------------------------------------
  80. #  DLL with DLL       | cdebug cflags cvarsdll | ldebug dlllflags guilibsdll
  81. #  version of CRT     |                        | ldebug dlllflags conlibsdll
  82. #  (MSVCRT.DLL)       |                        | ldebug dlllflags olelibsdll
  83. #  ---------------------------------------------------------------------------
  84. #
  85. #  * Always make DLLs multithreaded because a DLL has no way to know whether
  86. #    the calling application has multiple threads, and has no way to prevent
  87. #    multithreaded apps from loading it.
  88. #
  89. #  To specify an Intel x86 build that defaults to stdcall, add scall to the
  90. #  list of compiler options.
  91. #
  92. # =========================================================================
  93.  
  94. !IFNDEF _WIN32_MAK_
  95. _WIN32_MAK_ = 1
  96.  
  97. # -------------------------------------------------------------------------
  98. # Get CPU Type - exit if CPU environment variable is not defined
  99. # -------------------------------------------------------------------------
  100.  
  101. # Win95 does not define PROCESSOR_ARCHITECTURE - default to i386
  102.  
  103. !IF "$(PROCESSOR_ARCHITECTURE)" == ""
  104. CPU=i386
  105. PROCESSOR_ARCHITECTURE=x86
  106. !endif
  107.  
  108. !IF !DEFINED(CPU) || "$(CPU)" == ""
  109. CPU = $(PROCESSOR_ARCHITECTURE)
  110. !ENDIF # CPU
  111.  
  112. # if PROCESSOR_ARCHITECTURE was x86 or X86 change CPU to i386
  113.  
  114. !IF ( "$(CPU)" == "X86" ) || ( "$(CPU)" == "x86" )
  115. CPU = i386
  116. !ENDIF # CPU == X86
  117.  
  118. !IF "$(CPU)" != "i386"
  119. !IF "$(CPU)" != "IA64"
  120. !IF "$(CPU)" != "AMD64"
  121. !ERROR  Must specify CPU environment variable ( CPU=i386, CPU=IA64, CPU=AMD64)
  122. !ENDIF
  123. !ENDIF
  124. !ENDIF
  125.  
  126.  
  127. # -------------------------------------------------------------------------
  128. # Get Target Operating System - Default to WINNT
  129. # -------------------------------------------------------------------------
  130. !IFNDEF TARGETOS
  131. TARGETOS = WINNT
  132. !ENDIF
  133.  
  134. !IF "$(TARGETOS)" != "WINNT"
  135. !IF "$(TARGETOS)" != "WIN95"
  136. !IF "$(TARGETOS)" != "BOTH"
  137. !ERROR Must specify TARGETOS environment variable (BOTH, WIN95, WINNT)
  138. !ENDIF
  139. !ENDIF
  140. !ENDIF
  141.  
  142. # default to APPVER of 5.0
  143.  
  144. !IFNDEF APPVER
  145. APPVER = 5.0
  146. !ENDIF
  147.  
  148. !IF "$(APPVER)" != "6.1"
  149. !IF "$(APPVER)" != "6.0"
  150. !IF "$(APPVER)" != "5.02"
  151. !IF "$(APPVER)" != "5.01"
  152. !IF "$(APPVER)" != "5.0"
  153. !IF "$(APPVER)" != "4.0"
  154. !ERROR Must specify APPVER environment variable (4.0, 5.0, 5.01, 5.02, 6.0, 6.1)
  155. !ENDIF
  156. !ENDIF
  157. !ENDIF
  158. !ENDIF
  159. !ENDIF
  160. !ENDIF
  161.  
  162. !IF "$(APPVER)" =="6.1"
  163. !IFNDEF _WIN32_IE
  164. _WIN32_IE = 0x0800
  165. !ENDIF # _WIN32_IE
  166. !ENDIF # APPVER == 6.1
  167.  
  168. !IF "$(APPVER)" =="6.0"
  169. !IFNDEF _WIN32_IE
  170. _WIN32_IE = 0x0700
  171. !ENDIF # _WIN32_IE
  172. !ENDIF # APPVER == 6.0
  173.  
  174. !IF "$(APPVER)" =="5.0"
  175. !IFNDEF _WIN32_IE
  176. _WIN32_IE = 0x0500
  177. !ENDIF # _WIN32_IE
  178. !ENDIF # APPVER == 5.0
  179.  
  180. !IF "$(APPVER)" =="5.01"
  181. !IFNDEF _WIN32_IE
  182. _WIN32_IE = 0x0600
  183. !ENDIF # _WIN32_IE
  184. !ENDIF # APPVER == 5.01
  185.  
  186. !IF "$(APPVER)" =="5.02"
  187. !IFNDEF _WIN32_IE
  188. _WIN32_IE = 0x0600
  189. !ENDIF # _WIN32_IE
  190. !ENDIF # APPVER == 5.02
  191.  
  192. !IFNDEF _WIN32_IE
  193. _WIN32_IE = 0x0400
  194. !ENDIF
  195.  
  196. # -------------------------------------------------------------------------
  197. # Build tool declarations common to all platforms
  198. #    Check to see if Cole Porter is used, otherwise use C/C++ compiler
  199. # -------------------------------------------------------------------------
  200.  
  201. cc     = cl
  202. link   = link
  203. implib = lib
  204.  
  205. midl   = midl
  206. rc     = Rc
  207. hc     = Start /Wait Hcrtf
  208. mc     = Mc
  209.  
  210. hcvars = -xn
  211.  
  212. # -------------------------------------------------------------------------
  213. # Platform Dependent Compile Flags - must be specified after $(cc)
  214. #
  215. # Note: Debug switches are on by default for current release
  216. #
  217. # These switches set code generation and debugging options for the compiler.
  218. # They also set macros used for conditional compilation.
  219. #
  220. # The debugging switches allow for source level debugging with WinDebug or
  221. # Microsoft Visual C++.
  222. #
  223. # Common compiler flags:
  224. #   -c   - compile without linking
  225. #   -W3  - Set warning level to level 3    (-W4 for 64-bit compilations)
  226. #   -Zi  - generate debugging information
  227. #   -Od  - disable all optimizations
  228. #   -Ox  - use maximum optimizations
  229. #   -Zd  - generate only public symbols and line numbers for debugging
  230. #   -GS  - enable security checks
  231. #
  232. # i386 specific compiler flags:
  233. #   -Gz  - stdcall   (only if scall is added to makefile's compiler build rules)
  234. #
  235. # -------------------------------------------------------------------------
  236.  
  237. # declarations common to all compiler options
  238. ccommon = -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS
  239.  
  240. # for compatibility with old source code, map {try, except, leave, finally}
  241. # to their proper names (i.e. prefaced by "__")
  242. !IFDEF SEHMAP
  243. ccommon = $(ccommon) -FIsehmap.h
  244. !ENDIF
  245.  
  246. !IF "$(TARGETLANG)" == "LANG_JAPANESE"
  247. ccommon = $(ccommon) -DJAPAN -DDBCS -DFE_IME
  248. !ENDIF
  249.  
  250. !IF "$(TARGETLANG)" == "LANG_CHINESE"
  251. ccommon = $(ccommon) -DDBCS -DFE_IME
  252. !ENDIF
  253.  
  254. !IF "$(TARGETLANG)" == "LANG_KOREAN"
  255. ccommon = $(ccommon) -DDBCS -DFE_IME
  256. !ENDIF
  257.  
  258. !IF "$(CPU)" == "i386"
  259. cflags = $(ccommon) -D_X86_=1  -DWIN32 -D_WIN32 -W3
  260. scall  = -Gz
  261.  
  262. !ELSEIF "$(CPU)" == "IA64"
  263. cflags = $(ccommon) -D_IA64_=1 -DWIN64 -D_WIN64  -DWIN32 -D_WIN32
  264. cflags = $(cflags) -W4
  265. scall  =
  266.  
  267. !ELSEIF "$(CPU)" == "AMD64"
  268. cflags = $(ccommon) -D_AMD64_=1 -DWIN64 -D_WIN64  -DWIN32 -D_WIN32
  269. cflags = $(cflags) -W4
  270. scall  =
  271.  
  272. !ENDIF
  273.  
  274.  
  275. !IF "$(APPVER)" == "4.0"
  276. NMAKE_WINVER = 0x0400
  277. !ELSEIF "$(APPVER)" == "5.0"
  278. NMAKE_WINVER = 0x0500
  279. !ELSEIF "$(APPVER)" == "5.01"
  280. NMAKE_WINVER = 0x0501
  281. !ELSEIF "$(APPVER)" == "5.02"
  282. NMAKE_WINVER = 0x0502
  283. !ELSEIF "$(APPVER)" == "6.0"
  284. NMAKE_WINVER = 0x0600
  285. !ELSEIF "$(APPVER)" == "6.1"
  286. NMAKE_WINVER = 0x0601
  287. !ENDIF
  288.  
  289. !IF "$(TARGETOS)" == "WINNT"
  290. cflags = $(cflags) -D_WINNT -D_WIN32_WINNT=$(NMAKE_WINVER) -DNTDDI_VERSION=$(NMAKE_WINVER)0000
  291. !ENDIF
  292.  
  293. !IF "$(TARGETOS)" == "WIN95"
  294. cflags = $(cflags) -D_WIN95 -D_WIN32_WINDOWS=$(NMAKE_WINVER) /D_WIN32_DCOM
  295. !ENDIF
  296.  
  297. # regardless of the TARGET OS, define compile time WINVER to match APPVER macro
  298. cflags = $(cflags) -D_WIN32_IE=$(_WIN32_IE) -DWINVER=$(NMAKE_WINVER)
  299.  
  300.  
  301. # Set debugging options
  302.  
  303. !IF "$(CPU)" != "IA64"
  304. !IFDEF NODEBUG
  305. cdebug = -Ox -DNDEBUG
  306. !ELSE IFDEF PROFILE
  307. cdebug = -Gh -Ox -DNDEBUG
  308. !ELSE IFDEF TUNE
  309. cdebug = -Gh -Ox -DNDEBUG
  310. !ELSE
  311. cdebug = -Zi -Od -DDEBUG
  312. !ENDIF
  313.  
  314. !ELSE
  315.  
  316. !IFDEF NODEBUG
  317. cdebug = -Ox -DNDEBUG
  318. !ELSE
  319. cdebug = -Zi -Od -DDEBUG
  320. !ENDIF
  321.  
  322. !ENDIF
  323.  
  324. # -------------------------------------------------------------------------
  325. # Target Module & Subsystem Dependent Compile Defined Variables - must be
  326. #   specified after $(cc)
  327. #
  328. # The following table indicates the various acceptable combinations of
  329. # the C Run-Time libraries LIBC, LIBCMT, and MSVCRT respect to the creation
  330. # of a EXE and/or DLL target object.  The appropriate compiler flag macros
  331. # that should be used for each combination are also listed.
  332. #
  333. # Executable Type          C Runtime Lib        Compiler switch
  334. # -------------------------------------------------------------
  335. # Single threaded app      static CRT           CVARS       *
  336. # Single-threaded app      DLL CRT              CVARSDLL
  337. # Multi-threaded app       static CRT           CVARSMT     *
  338. # Multi-threaded app       DLL CRT              CVARSDLL    *
  339. #
  340. # Single threaded DLL      static CRT           CVARS
  341. # Single-threaded DLL      DLL CRT              CVARSDLL
  342. # Multi-threaded DLL       static CRT           CVARSMT     *
  343. # Multi-threaded DLL       DLL CRT              CVARSDLL    *
  344. #
  345. # * - Denotes the Recommended Configuration
  346. #
  347. # When building single-threaded applications you can link your executable
  348. # with either LIBC, LIBCMT, or MSVCRT, although LIBC will provide the best
  349. # performance.
  350. #
  351. # When building multi-threaded applications, either LIBCMT or MSVCRT can
  352. # be used as the C-Runtime library, as both are multi-thread safe.
  353. #
  354. # Note: Any executable which accesses a DLL linked with MSVCRT.LIB must
  355. #       also link with MSVCRT.LIB instead of LIBC.LIB or LIBCMT.LIB.
  356. #       When using DLLs, it is recommended that all of the modules be
  357. #       linked with MSVCRT.LIB.
  358. #
  359. # Note: The macros of the form xDLL are used when linking the object with
  360. #       the DLL version of the C Run-Time (that is, MSVCRT.LIB).  They are
  361. #       not used when the target object is itself a DLL.
  362. #
  363. # -------------------------------------------------------------------------
  364.  
  365. !IFDEF NO_ANSI
  366. noansi = -DNULL=0
  367. !ENDIF
  368.  
  369. #!DEFINE NODEBUG
  370.  
  371. # for Windows applications that use the C Run-Time libraries
  372. !IFDEF NODEBUG
  373. cvarsmt    = $(noansi) -D_MT -MT
  374. cvars      = $(cvarsmt)
  375. cvarsdll   = $(noansi) -D_MT -D_DLL -MD
  376. !ELSE
  377. cvarsmt    = $(noansi) -D_MT -MTd
  378. cvars      = $(cvarsmt)
  379. cvarsdll   = $(noansi) -D_MT -D_DLL -MDd
  380. !ENDIF
  381.  
  382.  
  383. # for compatibility with older-style makefiles
  384. cvarsmtdll = $(cvarsdll)
  385.  
  386. # for POSIX applications
  387. psxvars    = -D_POSIX_
  388.  
  389. # resource compiler
  390. rcflags = /r
  391. !ifdef NODEBUG
  392. rcvars = -DWIN32 -D_WIN32 -DWINVER=$(NMAKE_WINVER) $(noansi)
  393. !else
  394. rcvars = -DWIN32 -D_WIN32 -DWINVER=$(NMAKE_WINVER) -DDEBUG -D_DEBUG $(noansi)
  395. !endif
  396.  
  397.  
  398. !IF "$(TARGETLANG)" == "LANG_JAPANESE"
  399. rcflags = $(rcflags) /c932
  400. rcvars = $(rcvars) -DJAPAN -DDBCS -DFE_IME
  401. !ENDIF
  402.  
  403. !IF "$(TARGETLANG)" == "LANG_CHINESE"
  404. rcvars = $(rcvars) -DDBCS -DFE_IME
  405. !ENDIF
  406.  
  407. !IF "$(TARGETLANG)" == "LANG_KOREAN"
  408. rcvars = $(rcvars) -DDBCS -DFE_IME
  409. !ENDIF
  410.  
  411.  
  412. # -------------------------------------------------------------------------
  413. # Platform Dependent MIDL Flags - must be specified after midl
  414. #
  415. #
  416. # -------------------------------------------------------------------------
  417. !IF "$(TARGETOS)" == "WIN95"
  418. MIDL_OPTIMIZATION=-target NT40
  419. !ELSEIF "$(TARGETOS)" == "WINNT"
  420. !IF "$(APPVER)" == "5.0"
  421. MIDL_OPTIMIZATION=-target NT50
  422. !ELSEIF "$(APPVER)" == "6.0"
  423. MIDL_OPTIMIZATION=-target NT60
  424. !ELSEIF "$(APPVER)" == "6.1"
  425. MIDL_OPTIMIZATION=-target NT61
  426. !ELSEIF "$(APPVER)" == "5.01"
  427. MIDL_OPTIMIZATION=-target NT51
  428. !ELSEIF "$(APPVER)" == "5.02"
  429. MIDL_OPTIMIZATION=-target NT51
  430. !ELSEIF "$(APPVER)" == "4.0"
  431. MIDL_OPTIMIZATION=-target NT40
  432. !ENDIF
  433. !ENDIF
  434.  
  435. !IF "$(CPU)" == "IA64"
  436. MIDL_OPTIMIZATION = $(MIDL_OPTIMIZATION) /ia64
  437. !ELSEIF "$(CPU)" == "AMD64"
  438. MIDL_OPTIMIZATION = $(MIDL_OPTIMIZATION) /x64
  439. !ELSE
  440. MIDL_OPTIMIZATION = $(MIDL_OPTIMIZATION) /win32
  441. !ENDIF
  442.  
  443. !IF ("$(TARGETOS)" == "WINNT" ) && ("$(APPVER)" != "4.0")
  444. MIDL_OPTIMIZATION = $(MIDL_OPTIMIZATION) /robust
  445. !ENDIF
  446.  
  447.  
  448.  
  449. # -------------------------------------------------------------------------
  450. # Platform Dependent Link Flags - must be specified after $(link)
  451. #
  452. # Note: $(DLLENTRY) should be appended to each -entry: flag on the link
  453. #       line.
  454. #
  455. # Note: When creating a DLL that uses C Run-Time functions it is
  456. #       recommended to include the entry point function of the name DllMain
  457. #       in the DLL's source code.  Also, the MAKEFILE should include the
  458. #       -entry:_DllMainCRTStartup$(DLLENTRY) option for the creation of
  459. #       this DLL.  (The C Run-Time entry point _DllMainCRTStartup in turn
  460. #       calls the DLL defined DllMain entry point.)
  461. #
  462. # -------------------------------------------------------------------------
  463.  
  464. # declarations common to all linker options
  465. lflags  = $(lflags) /INCREMENTAL:NO /NOLOGO
  466.  
  467. # declarations for use on Intel x86 systems
  468. !IF "$(CPU)" == "i386"
  469. DLLENTRY = @12
  470. !ENDIF
  471.  
  472. # declarations for use on Intel Architecture 64-bit systems
  473. !IF "$(CPU)" == "IA64"
  474. DLLENTRY =
  475. !ENDIF
  476.  
  477. # declarations for use on AMD64 systems
  478. !IF "$(CPU)" == "AMD64"
  479. DLLENTRY =
  480. !ENDIF
  481.  
  482.  
  483. # -------------------------------------------------------------------------
  484. # Target Module Dependent Link Debug Flags - must be specified after $(link)
  485. #
  486. # These switches allow the inclusion of the necessary symbolic information
  487. # for source level debugging with WinDebug, profiling and/or performance
  488. # tuning.
  489. #
  490. # Note: Debug switches are on by default.
  491. # -------------------------------------------------------------------------
  492.  
  493. !IF "$(CPU)" == "i386"
  494.  
  495. !IFDEF NODEBUG
  496. ldebug = /RELEASE
  497. !ELSE
  498. ldebug = /DEBUG /DEBUGTYPE:cv
  499. !ENDIF
  500.  
  501. !ELSE
  502.  
  503. !IFDEF NODEBUG
  504. ldebug = /RELEASE
  505. !ELSE IFDEF PROFILE
  506. ldebug = /DEBUG:mapped,partial /DEBUGTYPE:coff
  507. !ELSE IFDEF TUNE
  508. ldebug = /DEBUG:mapped,partial /DEBUGTYPE:coff
  509. !ELSE
  510. ldebug = /DEBUG /DEBUGTYPE:cv
  511. !ENDIF
  512.  
  513. !ENDIF
  514.  
  515. # for compatibility with older-style makefiles
  516. linkdebug = $(ldebug)
  517.  
  518.  
  519. # -------------------------------------------------------------------------
  520. # Subsystem Dependent Link Flags - must be specified after $(link)
  521. #
  522. # These switches allow for source level debugging with WinDebug for local
  523. # and global variables.  They also provide the standard application type and
  524. # entry point declarations.
  525. #
  526. # Note that on x86 screensavers have a WinMain entrypoint, but on RISC
  527. # platforms it is main.  This is a Win95 compatibility issue.
  528. #
  529. # -------------------------------------------------------------------------
  530.  
  531. # Windows 98 needs subsystem version set to 4.10 for version 5.0 features.
  532. !IF ("$(APPVER)" == "5.0") && (("$(TARGETOS)" == "BOTH") || ("$(TARGETOS)" == "WIN95"))
  533. EXEVER = 4.10
  534. !ELSE
  535. EXEVER = $(APPVER)
  536. !ENDIF
  537.  
  538.  
  539. # ---------------------------------------------
  540.  
  541. # for Windows applications
  542. conlflags = $(lflags) -subsystem:console,$(EXEVER)
  543. guilflags = $(lflags) -subsystem:windows,$(EXEVER)
  544. dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
  545.  
  546. # For screen savers
  547. !IF "$(CPU)" == "i386"
  548. savlflags = $(lflags) -subsystem:windows,$(EXEVER) -entry:WinMainCRTStartup
  549. !ELSE
  550. savlflags = $(lflags) -subsystem:windows,$(EXEVER) -entry:mainCRTStartup
  551. !ENDIF
  552.  
  553. # for POSIX applications
  554. psxlflags = $(lflags) -subsystem:posix -entry:__PosixProcessStartup
  555.  
  556. # for compatibility with older-style makefiles
  557. conflags  = $(conlflags)
  558. guiflags  = $(guilflags)
  559. psxflags  = $(psxlflags)
  560.  
  561. # -------------------------------------------------------------------------
  562. # C Run-Time Target Module Dependent Link Libraries
  563. #
  564. # Note: For POSIX applications, link with $(psxlibs).
  565. # -------------------------------------------------------------------------
  566.  
  567. # for POSIX applications
  568. psxlibs    = libcpsx.lib psxdll.lib psxrtl.lib oldnames.lib
  569.  
  570.  
  571. # optional profiling and tuning libraries
  572. !IF "$(CPU)" != "IA64"
  573.  
  574. !IFDEF PROFILE
  575. optlibs =  cap.lib
  576. !ELSE IFDEF TUNE
  577. optlibs = wst.lib
  578. !ELSE
  579. optlibs =
  580. !ENDIF
  581.  
  582. !ELSE
  583. optlibs =
  584. !ENDIF
  585.  
  586. # if building for basic Windows 95, use WinSock1, else use WinSock2
  587. !IF "$(TARGETOS)" == "WIN95"
  588. !IF "$(APPVER)" == "4.0"
  589. winsocklibs = wsock32.lib
  590. !ELSE
  591. winsocklibs = ws2_32.lib mswsock.lib
  592. !ENDIF
  593. !ELSE
  594. winsocklibs = ws2_32.lib mswsock.lib
  595. !ENDIF
  596.  
  597.  
  598. # basic subsystem specific libraries, less the C Run-Time
  599. baselibs    = kernel32.lib $(optlibs) $(winsocklibs) advapi32.lib
  600. winlibs     = $(baselibs) user32.lib gdi32.lib comdlg32.lib winspool.lib
  601.  
  602. # for Windows applications that use the C Run-Time libraries
  603. conlibs     = $(baselibs)
  604. guilibs     = $(winlibs)
  605.  
  606. # for OLE applications
  607. olelibs     = ole32.lib uuid.lib oleaut32.lib $(guilibs)
  608.  
  609. #for backwards compatibility
  610. conlibsmt   = $(conlibs)
  611. conlibsdll  = $(conlibs)
  612. guilibsmt   = $(guilibs)
  613. guilibsdll  = $(guilibs)
  614. olelibsmt   = $(olelibs)
  615. olelibsdll  = $(olelibs)
  616.  
  617. # for backward compatibility
  618. ole2libs    = $(olelibs)
  619. ole2libsmt  = $(olelibsmt)
  620. ole2libsdll = $(olelibsdll)
  621.  
  622. # Visual Basic
  623. bc     = vb6
  624. bc_exe = /Make
  625. bc_dll = /Makedll
  626.  
  627. # Set the Output Directory
  628. !IF ("$(APPVER)" == "6.1")
  629. OUTDIR=WIN7
  630. !ELSEIF ("$(APPVER)" == "6.0")
  631. OUTDIR=Vista
  632. !ELSEIF "$(APPVER)" == "5.0"
  633. OUTDIR=WIN2000
  634. !ELSEIF "$(APPVER)" == "5.01"
  635. OUTDIR=XP32
  636. !ELSEIF "$(APPVER)" == "5.02"
  637. OUTDIR=SRV2003
  638. !ELSEIF "$(APPVER)" == "4.0"
  639. OUTDIR=NT4
  640. !ENDIF
  641.  
  642. !IF "$(CPU)" == "AMD64"
  643. OUTDIR=$(OUTDIR)_X64
  644. !ELSEIF "$(CPU)" == "IA64"
  645. OUTDIR=$(OUTDIR)_64
  646. !ENDIF
  647.  
  648. #set Prerelease Out directories
  649. !IF "$(SDKPRERELEASE)" == "1"
  650. OUTDIR=PRE_$(OUTDIR)
  651. !ENDIF
  652.  
  653. #Set DEBUG
  654. !IF "$(NODEBUG)" == ""
  655. OUTDIR=$(OUTDIR)_DEBUG
  656. !ELSE
  657. OUTDIR=$(OUTDIR)_RETAIL
  658. !ENDIF
  659.  
  660. !IF "$(OS)" == "Windows_NT"
  661. CLEANUP=if exist $(OUTDIR)/$(NULL) rd /s /q $(OUTDIR)
  662. !ELSE
  663. CLEANUP=deltree /y $(OUTDIR)
  664. !ENDIF
  665.  
  666. VC6MSG=This sample only compiles with Microsoft Visual C++ 6.0. \
  667.        To compile this run vcvars32.bat for Visual C++ 6.0, and setenv.bat in $(MSSDK).
  668.  
  669. WIN64MSG=This sample is currently not supported on the 64 bit platform.
  670.  
  671. #ENDIF _WIN32_MAK_
  672. !ENDIF
Advertisement
Add Comment
Please, Sign In to add comment