home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / pcmag / vol12n07.zip / WINAPP.ZIP / WINAP.ZIP / NTWIN32.MAK next >
Text File  |  1993-03-07  |  11KB  |  339 lines

  1. # =========================================================================
  2. # NTWIN32.MAK - Win32 application master NMAKE definitions file for the
  3. #               Microsoft Win32 SDK for Windows NT programming samples
  4. # -------------------------------------------------------------------------
  5. # NMAKE Options
  6. #
  7. # Use the table below to determine the extra options for NMAKE to
  8. # generate various application debugging, profiling and performance tuning
  9. # information.
  10. #
  11. # Application Information Type         Invoke NMAKE
  12. # ----------------------------         ------------
  13. # For No Debugging Info                nmake nodebug=1
  14. # For Working Set Tuner Info           nmake tune=1
  15. # For Call Attributed Profiling Info   nmake profile=1
  16. #
  17. # Note: Working Set Tuner and Call Attributed Profiling is for Intel
  18. #       x86 systems only.
  19. #
  20. # Note: The three options above are mutually exclusive (you may use only
  21. #       one at complile/link the application).
  22. #
  23. # Note: using the environment variables NODEBUG, TUNE, and PROFILE is an
  24. #       alternate method for setting these options.
  25. #
  26. # Additional NMAKE Options             Invoke NMAKE
  27. # ----------------------------         ------------
  28. # For No ANSI NULL Compliance          nmake no_nansi=1
  29. # (ANSI NULL is defined as PVOID 0)
  30. #
  31. # =========================================================================
  32.  
  33. # -------------------------------------------------------------------------
  34. # Get CPU Type - exit if CPU environment variable is not defined
  35. # -------------------------------------------------------------------------
  36.  
  37. # Intel i386 and i486 systems.
  38. !IF "$(CPU)" == "i386"
  39. CPUTYPE = 1
  40. !ENDIF
  41.  
  42. # MIPS R4000 systems.
  43. !IF "$(CPU)" == "MIPS"
  44. CPUTYPE = 2
  45. !ENDIF
  46.  
  47. !IFNDEF CPUTYPE
  48. !ERROR  Must specify CPU environment variable ( CPU=i386 or CPU=MIPS )
  49. !ENDIF
  50.  
  51. # -------------------------------------------------------------------------
  52. # Platform Dependent Binaries Declarations
  53. #
  54. # If you are using the old Mips compiler then
  55. # cc     = cc
  56. # cvtobj = mip2coff
  57. # -------------------------------------------------------------------------
  58.  
  59. # binary declarations for use on Intel i386 and i486 systems.
  60. !IF "$(CPU)" == "i386"
  61. cc     = cl386
  62. cvtobj = REM !!! CVTOBJ is no longer necessary - please remove !!!
  63. !ENDIF
  64.  
  65. # binary declarations for use on self hosted MIPS R4000 systems.
  66. !IF "$(CPU)" == "MIPS"
  67. cc     = mcl
  68. cvtobj = REM !!! CVTOBJ is no longer necessary - please remove !!!
  69. !ENDIF
  70.  
  71. # binary declarations common to all platforms.
  72. link   = link32
  73. implib = lib32
  74. rc     = rc
  75. cvtres = cvtres
  76. hc     = hc
  77.  
  78. # -------------------------------------------------------------------------
  79. # Platform Dependent Compile Flags - must be specified after $(cc)
  80. #
  81. # Note: Debug switches are on by default for current release
  82. #
  83. # These switches allow for source level debugging with WinDebug for local
  84. # and global variables.
  85. #
  86. # Both compilers now use the same front end - you must still define either
  87. # _X86_ or _MIPS_.  These have replaced the i386 and MIPS definitions which
  88. # are not ANSI compliant.
  89. #
  90. # i386 specific compiler flags:
  91. #   -G3  - generate 80386 instructions
  92. #   -Gz  - stdcall
  93. #
  94. # MS MIPS specific compiler flags:
  95. #
  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. #   -Ox  - use maximum optimizations
  103. #   -Zd  - generate only public symbols and line numbers for debugging
  104. #
  105. # *** OLD MIPS ONLY ***
  106. #
  107. # The following definitions are for the old Mips compiler.
  108. #
  109. # OLD MIPS compiler flags:
  110. #   -c   - compile without linking
  111. #   -std - produce warnings for non-ANSI standard source code.
  112. #   -g2  - produce a symbol table for debugging
  113. #   -O   - invoke the global optimizer
  114. #   -EL  - produce object modules targeted for
  115. #          "little-endian" byte ordering
  116. # -------------------------------------------------------------------------
  117.  
  118. # declarations common to all compilers.
  119. ccommon = -c -W3
  120.  
  121. !IF "$(CPU)" == "i386"
  122. cflags = $(ccommon) -G3 -D_X86_=1
  123. scall  = -Gz
  124. !ELSE
  125. cflags = $(ccommon) -D_MIPS_=1
  126. scall  =
  127. !ENDIF
  128.  
  129. !IF "$(CPU)" == "i386"
  130. !IFDEF NODEBUG
  131. cdebug = -Ox
  132. !ELSE
  133. !IFDEF PROFILE
  134. cdebug = -Gh -Zd -Ox
  135. !ELSE
  136. !IFDEF TUNE
  137. cdebug = -Gh -Zd -Ox
  138. !ELSE
  139. cdebug = -Zi -Od
  140. !ENDIF
  141. !ENDIF
  142. !ENDIF
  143. !ELSE
  144. !IFDEF NODEBUG
  145. cdebug = -Ox
  146. !ELSE
  147. cdebug = -Zi -Od
  148. !ENDIF
  149. !ENDIF
  150.  
  151. # OLD MIPS Complile Flags
  152. !IF 0
  153. !IF "$(CPU)" == "MIPS"
  154. cflags = -c -std -o $(*B).obj -EL -DMIPS=1 -D_MIPS_=1
  155. !IFDEF NODEBUG
  156. cdebug =
  157. !ELSE
  158. cdebug = -g2
  159. !ENDIF
  160. !ENDIF
  161. !ENDIF
  162.  
  163. # -------------------------------------------------------------------------
  164. # Target Module & Subsystem Dependant Compile Defined Variables - must be
  165. #   specified after $(cc)
  166. #
  167. # The following is a table which indicates the various
  168. # acceptable combinations of CRTDLL and LIBC(MT) with
  169. # respect to DLLs and EXEs, along with the appropriate
  170. # compiler flags for each.
  171. #
  172. # Link EXE    Create Exe    Link DLL    Create DLL
  173. #   with        Using         with         Using
  174. # ----------------------------------------------------
  175. #  LIBC        CVARS          None        None      *
  176. #  LIBC        CVARS          LIBC        CVARS
  177. #  LIBC        CVARS          LIBCMT      CVARSMT
  178. #  LIBCMT      CVARSMT        None        None      *
  179. #  LIBCMT      CVARSMT        LIBC        CVARS
  180. #  LIBCMT      CVARSMT        LIBCMT      CVARSMT
  181. #  CRTDLL      CVARSDLL       None        None      *
  182. #  CRTDLL      CVARSDLL       LIBC        CVARS
  183. #  CRTDLL      CVARSDLL       LIBCMT      CVARSMT
  184. #  CRTDLL      CVARSDLL       CRTDLL      CVARSDLL  *
  185. #
  186. # Note: Any executable which accesses a DLL linked with CRTDLL.LIB must
  187. #       also link with CRTDLL.LIB instead of LIBC.LIB or LIBCMT.LIB.
  188. #       When using DLLs, it is recommended that all of the modules be
  189. #       linked with CRTDLL.LIB.
  190. #
  191. # * - Recommended Configurations
  192. #
  193. # -------------------------------------------------------------------------
  194.  
  195. !IFDEF NO_ANSI
  196. noansi = -DNULL=0
  197. !ENDIF
  198. cvars      = -DWIN32 $(noansi)
  199. cvarsmt    = $(cvars) -D_MT
  200. cvarsdll   = $(cvarsmt) -D_DLL
  201. cvarsmtdll = $(cvarsmt) -D_DLL
  202.  
  203. # For POSIX applications
  204. psxvars    = -D_POSIX_
  205.  
  206. # resource compiler
  207. rcvars = -DWIN32 $(noansi)
  208.  
  209. # -------------------------------------------------------------------------
  210. # Platform Dependent Link Flags - must be specified after $(link)
  211. #
  212. # Note: $(DLLENTRY) should be appended to each -entry: flag on the link line.
  213. # -------------------------------------------------------------------------
  214.  
  215. # declarations for use on Intel i386 and i486 systems.
  216. !IF "$(CPU)" == "i386"
  217. DLLENTRY = @12
  218. !ENDIF
  219.  
  220. # declarations for use on self hosted MIPS R4000 systems.
  221. !IF "$(CPU)" == "MIPS"
  222. DLLENTRY =
  223. !ENDIF
  224.  
  225. # -------------------------------------------------------------------------
  226. # Target Module Dependent Link Debug Flags - must be specified after $(link)
  227. #
  228. # These switches allow for source level debugging with WinDebug, profiling
  229. # or performance tuning.
  230. #
  231. # Note: Debug switches are on by default.
  232. # -------------------------------------------------------------------------
  233.  
  234. !IF "$(CPU)" == "i386"
  235. !IFDEF NODEBUG
  236. ldebug =
  237. !ELSE
  238. !IFDEF PROFILE
  239. ldebug = -debug:partial -debugtype:coff
  240. !ELSE
  241. !IFDEF TUNE
  242. ldebug = -debug:partial -debugtype:coff
  243. !ELSE
  244. ldebug = -debug:full -debugtype:cv
  245. !ENDIF
  246. !ENDIF
  247. !ENDIF
  248. !ELSE
  249. !IFDEF NODEBUG
  250. ldebug =
  251. !ELSE
  252. ldebug = -debug:full -debugtype:cv
  253. !ENDIF
  254. !ENDIF
  255.  
  256. # for compatibility with older style makefiles
  257. linkdebug = $(ldebug)
  258.  
  259. # -------------------------------------------------------------------------
  260. # Subsystem Dependent Link Flags - must be specified after $(link)
  261. #
  262. # These switches allow for source level debugging with WinDebug for local
  263. # and global variables.
  264. # -------------------------------------------------------------------------
  265.  
  266. # For applications that use the C-Runtime libraries
  267. conlflags = -subsystem:console -entry:mainCRTStartup
  268. guilflags = -subsystem:windows -entry:WinMainCRTStartup
  269.  
  270. # For POSIX applications
  271. psxlflags = -subsystem:posix -entry:__PosixProcessStartup
  272.  
  273. # for compatibility with older style makefiles
  274. conflags  = $(conlflags)
  275. guiflags  = $(guilflags)
  276. psxflags  = $(psxlflags)
  277.  
  278. # -------------------------------------------------------------------------
  279. # C-Runtime Target Module Dependent Link Libraries
  280. #
  281. # Below is a table which describes which libraries to use depending on the
  282. # target module type, although the table specifically refers to Graphical
  283. # User Interface apps, the exact same dependancies apply to Console apps.
  284. # I.E. you could replace all occurences of GUI with CON in the following:
  285. #
  286. # Desired CRT  Libraries   Desired CRT  Libraries
  287. #   Library     to link      Library     to link
  288. #   for EXE     with EXE     for DLL     with DLL
  289. # ----------------------------------------------------
  290. #   LIBC       GUILIBS       None       None       *
  291. #   LIBC       GUILIBS       LIBC       GUILIBS
  292. #   LIBC       GUILIBS       LIBCMT     GUILIBSMT
  293. #   LIBCMT     GUILIBSMT     None       None       *
  294. #   LIBCMT     GUILIBSMT     LIBC       GUILIBS
  295. #   LIBCMT     GUILIBSMT     LIBCMT     GUILIBSMT
  296. #   CRTDLL     GUILIBSDLL    None       None       *
  297. #   CRTDLL     GUILIBSDLL    LIBC       GUILIBS
  298. #   CRTDLL     GUILIBSDLL    LIBCMT     GUILIBSMT
  299. #   CRTDLL     GUILIBSDLL    CRTDLL     GUILIBSDLL *
  300. #
  301. # * - Recommended Configurations.
  302. #
  303. # Note: Any executable which accesses a DLL linked with CRTDLL.LIB must
  304. #       also link with CRTDLL.LIB instead of LIBC.LIB or LIBCMT.LIB.
  305. #
  306. # Note: For POSIX applications, link with $(psxlibs)
  307. #
  308. # -------------------------------------------------------------------------
  309.  
  310. # optional profiling and tuning libraries
  311. !IF "$(CPU)" == "i386"
  312. !IFDEF PROFILE
  313. optlibs = cap.lib
  314. !ELSE
  315. !IFDEF TUNE
  316. optlibs = wst.lib
  317. !ELSE
  318. optlibs =
  319. !ENDIF
  320. !ENDIF
  321. !ELSE
  322. optlibs =
  323. !ENDIF
  324.  
  325. # basic subsystem specific libraries less the C-RunTime
  326. baselibs   = kernel32.lib ntdll.lib $(optlibs) 
  327. winlibs    = kernel32.lib ntdll.lib user32.lib gdi32.lib winspool.lib comdlg32.lib $(optlibs)
  328.  
  329. # For applications that use the C-Runtime libraries
  330. conlibs    = libc.lib $(baselibs)
  331. conlibsmt  = libcmt.lib $(baselibs)
  332. conlibsdll = crtdll.lib $(baselibs)
  333. guilibs    = libc.lib $(winlibs)
  334. guilibsmt  = libcmt.lib $(winlibs)
  335. guilibsdll = crtdll.lib $(winlibs)
  336.  
  337. # For POSIX applications
  338. psxlibs    = libcpsx.lib psxdll.lib psxrtl.lib $(baselibs)
  339.