Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

414 lines
13 KiB

  1. # =========================================================================
  2. # NTWIN32.MAK - Win32 application master NMAKE definitions file for the
  3. # Microsoft Win32 SDK for Windows NT programming samples
  4. # -------------------------------------------------------------------------
  5. # This files should be included at the top of all MAKEFILEs as follows:
  6. # !include <ntwin32.mak>
  7. # -------------------------------------------------------------------------
  8. # NMAKE Options
  9. #
  10. # Use the table below to determine the additional options for NMAKE to
  11. # generate various application debugging, profiling and performance tuning
  12. # information.
  13. #
  14. # Application Information Type Invoke NMAKE
  15. # ---------------------------- ------------
  16. # For No Debugging Info nmake nodebug=1
  17. # For Working Set Tuner Info nmake tune=1
  18. # For Call Attributed Profiling Info nmake profile=1
  19. #
  20. # Note: Working Set Tuner and Call Attributed Profiling is for available
  21. # for the Intel x86 and Pentium systems.
  22. #
  23. # Note: The three options above are mutually exclusive (you may use only
  24. # one to compile/link the application).
  25. #
  26. # Note: creating the environment variables NODEBUG, TUNE, and PROFILE is an
  27. # alternate method to setting these options via the nmake command line.
  28. #
  29. # Additional NMAKE Options Invoke NMAKE
  30. # ---------------------------- ------------
  31. # For No ANSI NULL Compliance nmake no_ansi=1
  32. # (ANSI NULL is defined as PVOID 0)
  33. #
  34. # =========================================================================
  35. # REVISIONS
  36. # RICO 1/26/95 - changed -Zi to -Z7 for use with VC++ 2.0.
  37. # RICO 6/16/97 - changed -Ox to -O1 to avoid VC++ 4.x optimizer bug.
  38. # =========================================================================
  39. # -------------------------------------------------------------------------
  40. # Get CPU Type - exit if CPU environment variable is not defined
  41. # -------------------------------------------------------------------------
  42. !IF "$(CPU)" == ""
  43. CPU = $(PROCESSOR_ARCHITECTURE)
  44. !ENDIF
  45. !IF "$(CPU)" != "i386"
  46. !IF "$(CPU)" != "MIPS"
  47. !IF "$(CPU)" != "ALPHA"
  48. !IF "$(CPU)" != "PPC"
  49. !ERROR Must specify CPU environment variable ( CPU=i386, CPU=MIPS, CPU=ALPHA, CPU=PPC)
  50. !ENDIF
  51. !ENDIF
  52. !ENDIF
  53. !ENDIF
  54. # -------------------------------------------------------------------------
  55. # Platform Dependent Binaries Declarations
  56. #
  57. # If you are using the old MIPS compiler then define the following:
  58. # cc = cc
  59. # cvtobj = mip2coff
  60. # -------------------------------------------------------------------------
  61. # binary declarations for use on Intel i386, i486, and Pentium systems
  62. !IF "$(CPU)" == "i386"
  63. cc = cl
  64. # for compatibility with older-style makefiles
  65. cvtobj = REM !!! CVTOBJ is no longer necessary - please remove !!!
  66. !ENDIF
  67. # binary declarations for use on self hosted MIPS R4x000 systems
  68. !IF "$(CPU)" == "MIPS"
  69. cc = mcl
  70. # for compatibility with older-style makefiles
  71. cvtobj = REM !!! CVTOBJ is no longer necessary - please remove !!!
  72. !ENDIF
  73. # binary declarations for use on self hosted Digital Alpha AXP systems
  74. !IF "$(CPU)" == "ALPHA"
  75. cc = cl
  76. # for compatibility with older-style makefiles
  77. cvtobj = REM !!! CVTOBJ is no longer necessary - please remove !!!
  78. !ENDIF
  79. # binary declarations common to all platforms
  80. link = link
  81. implib = lib
  82. rc = rc
  83. cvtres = cvtres
  84. hc = hc
  85. # -------------------------------------------------------------------------
  86. # Platform Dependent Compile Flags - must be specified after $(cc)
  87. #
  88. # Note: Debug switches are on by default for current release
  89. #
  90. # These switches allow for source level debugging with WinDebug for local
  91. # and global variables.
  92. #
  93. # Both compilers now use the same front end - you must still define either
  94. # _X86_, _MIPS_, or _ALPHA_. These have replaced the i386, MIPS, and ALPHA
  95. # definitions which are not ANSI compliant.
  96. #
  97. # Common compiler flags:
  98. # -c - compile without linking
  99. # -W3 - Set warning level to level 3
  100. # -Zi - generate debugging information
  101. # -Od - disable all optimizations
  102. # -O1 - optimize for minimum size
  103. # -Zd - generate only public symbols and line numbers for debugging
  104. #
  105. # i386 specific compiler flags:
  106. # -Gz - stdcall
  107. #
  108. # MS MIPS specific compiler flags:
  109. # none.
  110. #
  111. # *** OLD MIPS ONLY ***
  112. #
  113. # The following definitions are for the old MIPS compiler:
  114. #
  115. # OLD MIPS compiler flags:
  116. # -c - compile without linking
  117. # -std - produce warnings for non-ANSI standard source code
  118. # -g2 - produce a symbol table for debugging
  119. # -O - invoke the global optimizer
  120. # -EL - produce object modules targeted for
  121. # "little-endian" byte ordering
  122. #
  123. # If you are using the old MIPS compiler then define the following:
  124. #
  125. # # OLD MIPS Complile Flags
  126. # !IF 0
  127. # !IF "$(CPU)" == "MIPS"
  128. # cflags = -c -std -o $(*B).obj -EL -DMIPS=1 -D_MIPS_=1
  129. # !IF defined(NODEBUG)
  130. # cdebug =
  131. # !ELSE
  132. # cdebug = -g2
  133. # !ENDIF
  134. # !ENDIF
  135. # !ENDIF
  136. #
  137. # -------------------------------------------------------------------------
  138. # declarations common to all compiler options
  139. cinclude = -I$(WDEV)\include
  140. ccommon = $(cinclude) -c -W3 -D_CRTAPI1=__cdecl -D_CRTAPI2=__cdecl -Dtry=__try -Dleave=__leave -Dexcept=__except -Dfinally=__finally
  141. !IF "$(CPU)" == "i386"
  142. cflags = $(ccommon) -D_X86_=1
  143. scall = -Gz
  144. !ELSE
  145. !IF "$(CPU)" == "MIPS"
  146. cflags = $(ccommon) -D_MIPS_=1
  147. !ELSE
  148. !IF "$(CPU)" == "PPC"
  149. cflags = $(ccommon) -D_PPC_=1
  150. !ELSE
  151. !IF "$(CPU)" == "ALPHA"
  152. cflags = $(ccommon) -D_ALPHA_=1
  153. !ENDIF
  154. !ENDIF
  155. !ENDIF
  156. scall =
  157. !ENDIF
  158. !IF "$(CPU)" == "i386"
  159. !IF defined(NODEBUG)
  160. cdebug = -O1
  161. !ELSE
  162. !IF defined(PROFILE)
  163. cdebug = -Gh -Zd -O1
  164. !ELSE
  165. !IF defined(TUNE)
  166. cdebug = -Gh -Zd -O1
  167. !ELSE
  168. cdebug = -Z7 -Od
  169. !ENDIF
  170. !ENDIF
  171. !ENDIF
  172. !ELSE
  173. !IF defined(NODEBUG)
  174. cdebug = -O1
  175. !ELSE
  176. cdebug = -Z7 -Od
  177. !ENDIF
  178. !ENDIF
  179. # -------------------------------------------------------------------------
  180. # Target Module & Subsystem Dependent Compile Defined Variables - must be
  181. # specified after $(cc)
  182. #
  183. # The following table indicates the various acceptable combinations of
  184. # the C Run-Time libraries LIBC, LIBCMT, and CRTDLL respect to the creation
  185. # of a EXE and/or DLL target object. The appropriate compiler flag macros
  186. # that should be used for each combination are also listed.
  187. #
  188. # Link EXE Create Exe Link DLL Create DLL
  189. # with Using with Using
  190. # ----------------------------------------------------
  191. # LIBC CVARS None None *
  192. # LIBC CVARS LIBC CVARS
  193. # LIBC CVARS LIBCMT CVARSMT
  194. # LIBCMT CVARSMT None None *
  195. # LIBCMT CVARSMT LIBC CVARS
  196. # LIBCMT CVARSMT LIBCMT CVARSMT
  197. # CRTDLL CVARSDLL None None *
  198. # CRTDLL CVARSDLL LIBC CVARS
  199. # CRTDLL CVARSDLL LIBCMT CVARSMT
  200. # CRTDLL CVARSDLL CRTDLL CVARSDLL *
  201. #
  202. # * - Denotes the Recommended Configuration
  203. #
  204. # When building single-threaded applications you can link your executable
  205. # with either LIBC, LIBCMT, or CRTDLL, although LIBC will provide the best
  206. # performance.
  207. #
  208. # When building multi-threaded applications, either LIBCMT or CRTDLL can
  209. # be used as the C-Runtime library, as both are multi-thread safe.
  210. #
  211. # Note: Any executable which accesses a DLL linked with CRTDLL.LIB must
  212. # also link with CRTDLL.LIB instead of LIBC.LIB or LIBCMT.LIB.
  213. # When using DLLs, it is recommended that all of the modules be
  214. # linked with CRTDLL.LIB.
  215. #
  216. # Note: The macros of the form xDLL are used when linking the object with
  217. # the DLL version of the C Run-Time (that is, CRTDLL.LIB). They are
  218. # not used when the target object is itself a DLL.
  219. #
  220. # -------------------------------------------------------------------------
  221. !IF defined(NO_ANSI)
  222. noansi = -DNULL=0
  223. !ENDIF
  224. # for Windows applications that use the C Run-Time libraries
  225. cvars = -DWIN32 $(noansi)
  226. cvarsmt = $(cvars) -D_MT
  227. cvarsdll = $(cvarsmt) -D_DLL
  228. # for compatibility with older-style makefiles
  229. cvarsmtdll = $(cvarsmt) -D_DLL
  230. # for POSIX applications
  231. psxvars = -D_POSIX_
  232. # resource compiler
  233. rcvars = -DWIN32 $(noansi)
  234. # -------------------------------------------------------------------------
  235. # Platform Dependent Link Flags - must be specified after $(link)
  236. #
  237. # Note: $(DLLENTRY) should be appended to each -entry: flag on the link
  238. # line.
  239. #
  240. # Note: When creating a DLL that uses C Run-Time functions it is
  241. # recommended to include the entry point function of the name DllMain
  242. # in the DLL's source code. Also, the MAKEFILE should include the
  243. # -entry:_DllMainCRTStartup$(DLLENTRY) option for the creation of
  244. # this DLL. (The C Run-Time entry point _DllMainCRTStartup in turn
  245. # calls the DLL defined DllMain entry point.)
  246. #
  247. # -------------------------------------------------------------------------
  248. # declarations common to all linker options
  249. lcommon =
  250. # declarations for use on Intel i386, i486, and Pentium systems
  251. !IF "$(CPU)" == "i386"
  252. DLLENTRY = @12
  253. lflags = $(lcommon) -align:0x1000
  254. !ENDIF
  255. # declarations for use on self hosted MIPS R4x000 systems
  256. !IF "$(CPU)" == "MIPS"
  257. DLLENTRY =
  258. lflags = $(lcommon)
  259. !ENDIF
  260. # declarations for use on self hosted PowerPC systems
  261. !IF "$(CPU)" == "PPC"
  262. DLLENTRY =
  263. lflags = $(lcommon)
  264. !ENDIF
  265. # declarations for use on self hosted Digital Alpha AXP systems
  266. !IF "$(CPU)" == "ALPHA"
  267. DLLENTRY =
  268. lflags = $(lcommon)
  269. !ENDIF
  270. # -------------------------------------------------------------------------
  271. # Target Module Dependent Link Debug Flags - must be specified after $(link)
  272. #
  273. # These switches allow the inclusion of the necessary symbolic information
  274. # for source level debugging with WinDebug, profiling and/or performance
  275. # tuning.
  276. #
  277. # Note: Debug switches are on by default.
  278. # -------------------------------------------------------------------------
  279. !IF "$(CPU)" == "i386"
  280. !IF defined(NODEBUG)
  281. ldebug =
  282. !ELSE
  283. !IF defined(PROFILE)
  284. ldebug = -debug:partial -debugtype:coff
  285. !ELSE
  286. !IF defined(TUNE)
  287. ldebug = -debug:partial -debugtype:coff
  288. !ELSE
  289. ldebug = -debug:full -debugtype:both
  290. !ENDIF
  291. !ENDIF
  292. !ENDIF
  293. !ELSE
  294. !IF defined(NODEBUG)
  295. ldebug =
  296. !ELSE
  297. ldebug = -debug:full -debugtype:both
  298. !ENDIF
  299. !ENDIF
  300. # for compatibility with older-style makefiles
  301. linkdebug = $(ldebug)
  302. # -------------------------------------------------------------------------
  303. # Subsystem Dependent Link Flags - must be specified after $(link)
  304. #
  305. # These switches allow for source level debugging with WinDebug for local
  306. # and global variables. They also provide the standard application type and
  307. # entry point declarations.
  308. # -------------------------------------------------------------------------
  309. # for Windows applications that use the C Run-Time libraries
  310. conlflags = $(lflags) -subsystem:console -entry:mainCRTStartup
  311. guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup
  312. # for POSIX applications
  313. psxlflags = $(lflags) -subsystem:posix -entry:__PosixProcessStartup
  314. # for compatibility with older-style makefiles
  315. conflags = $(conlflags)
  316. guiflags = $(guilflags)
  317. psxflags = $(psxlflags)
  318. # -------------------------------------------------------------------------
  319. # C Run-Time Target Module Dependent Link Libraries
  320. #
  321. # Below is a table which describes which libraries to use depending on the
  322. # target module type, although the table specifically refers to Graphical
  323. # User Interface apps, the exact same dependencies apply to Console apps.
  324. # That is, you could replace all occurrences of 'GUI' with 'CON' in the
  325. # following:
  326. #
  327. # Desired CRT Libraries Desired CRT Libraries
  328. # Library to link Library to link
  329. # for EXE with EXE for DLL with DLL
  330. # ----------------------------------------------------
  331. # LIBC GUILIBS None None *
  332. # LIBC GUILIBS LIBC GUILIBS
  333. # LIBC GUILIBS LIBCMT GUILIBSMT
  334. # LIBCMT GUILIBSMT None None *
  335. # LIBCMT GUILIBSMT LIBC GUILIBS
  336. # LIBCMT GUILIBSMT LIBCMT GUILIBSMT
  337. # CRTDLL GUILIBSDLL None None *
  338. # CRTDLL GUILIBSDLL LIBC GUILIBS
  339. # CRTDLL GUILIBSDLL LIBCMT GUILIBSMT
  340. # CRTDLL GUILIBSDLL CRTDLL GUILIBSDLL *
  341. #
  342. # * - Recommended Configurations.
  343. #
  344. # Note: Any executable which accesses a DLL linked with CRTDLL.LIB must
  345. # also link with CRTDLL.LIB instead of LIBC.LIB or LIBCMT.LIB.
  346. #
  347. # Note: For POSIX applications, link with $(psxlibs).
  348. #
  349. # -------------------------------------------------------------------------
  350. # optional profiling and tuning libraries
  351. !IF "$(CPU)" == "i386"
  352. !IF defined(PROFILE)
  353. optlibs = cap.lib
  354. !ELSE
  355. !IF defined(TUNE)
  356. optlibs = wst.lib
  357. !ELSE
  358. optlibs =
  359. !ENDIF
  360. !ENDIF
  361. !ELSE
  362. optlibs =
  363. !ENDIF
  364. # basic subsystem specific libraries, less the C Run-Time
  365. baselibs = kernel32.lib $(optlibs)
  366. winlibs = $(baselibs) user32.lib gdi32.lib comdlg32.lib winspool.lib
  367. # for Windows applications that use the C Run-Time libraries
  368. conlibs = libc.lib $(baselibs)
  369. conlibsmt = libcmt.lib $(baselibs)
  370. conlibsdll = CRTDLL.lib $(baselibs)
  371. guilibs = libc.lib $(winlibs)
  372. guilibsmt = libcmt.lib $(winlibs)
  373. guilibsdll = CRTDLL.lib $(winlibs)
  374. # for POSIX applications
  375. psxlibs = libcpsx.lib psxdll.lib psxrtl.lib
  376. srcdir = ..