home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / dbmsg / mapi / common / win16.mak < prev    next >
Encoding:
Text File  |  1996-03-27  |  10.4 KB  |  276 lines

  1. #
  2. # WIN16.MAK -- common Win16 macros and rules for MAPI SDK
  3. # derived from (NT)WIN32.MAK in the Win32 SDK
  4. #
  5. #
  6.  
  7. # =========================================================================
  8. # NTWIN32.MAK - Win32 application master NMAKE definitions file for the
  9. #               Microsoft Win32 SDK for Windows NT programming samples
  10. # -------------------------------------------------------------------------
  11. # This files should be included at the top of all MAKEFILEs as follows:
  12. #  !include <ntwin32.mak>
  13. # -------------------------------------------------------------------------
  14. # NMAKE Options
  15. #
  16. # Use the table below to determine the additional options for NMAKE to
  17. # generate various application debugging, profiling and performance tuning
  18. # information.
  19. #
  20. # Application Information Type         Invoke NMAKE
  21. # ----------------------------         ------------
  22. # For No Debugging Info                nmake nodebug=1
  23. # For Working Set Tuner Info           nmake tune=1
  24. # For Call Attributed Profiling Info   nmake profile=1
  25. #
  26. # Note: Working Set Tuner and Call Attributed Profiling is for available
  27. #       for the Intel x86 and Pentium systems.
  28. #
  29. # Note: The three options above are mutually exclusive (you may use only
  30. #       one to compile/link the application).
  31. #
  32. # Note: creating the environment variables NODEBUG, TUNE, and PROFILE is an
  33. #       alternate method to setting these options via the nmake command line.
  34. #
  35. # Additional NMAKE Options             Invoke NMAKE
  36. # ----------------------------         ------------
  37. # For No ANSI NULL Compliance          nmake no_ansi=1
  38. # (ANSI NULL is defined as PVOID 0)
  39. #
  40. # =========================================================================
  41.  
  42. !IFNDEF _WIN16_MAK_
  43. _WIN16_MAK_ = 1
  44.  
  45. # -------------------------------------------------------------------------
  46. # Get CPU Type - exit if CPU environment variable is not defined
  47. # -------------------------------------------------------------------------
  48.  
  49. # Intel i386, i486, and Pentium systems
  50. CPU = i386
  51. CPUTYPE = 1
  52.  
  53. # -------------------------------------------------------------------------
  54. # Get Target Operating System - Default to both
  55. # -------------------------------------------------------------------------
  56.  
  57. TARGETOS = WIN16
  58.  
  59. # -------------------------------------------------------------------------
  60. # Set Default WINVER - depends on TARGETOS
  61. #
  62. # Defaults to 4.0 for all applications except NT specific.
  63. # -------------------------------------------------------------------------
  64.  
  65. APPVER = 3.10
  66.     
  67. # binary declarations common to all platforms
  68. cc     = cl
  69. rc     = rc
  70. link   = link
  71. implib = lib
  72.  
  73. # -------------------------------------------------------------------------
  74. # Platform Dependent Compile Flags - must be specified after $(cc)
  75. #
  76. # Note: Debug switches are on by default for current release
  77. #
  78. # These switches allow for source level debugging with WinDebug for local
  79. # and global variables.
  80. #
  81. # Both compilers now use the same front end - you must still define either
  82. # _X86_, _MIPS_, _PPC_ or _ALPHA_.  These have replaced the i386, MIPS, and ALPHA
  83. # definitions which are not ANSI compliant.
  84. #
  85. # Common compiler flags:
  86. #   -c   - compile without linking
  87. #   -W3  - Set warning level to level 3
  88. #   -Zi  - generate debugging information
  89. #   -Od  - disable all optimizations
  90. #   -Ox  - use maximum optimizations
  91. #   -Zd  - generate only public symbols and line numbers for debugging
  92. #
  93. # i386 specific compiler flags:
  94. #   -Gz  - stdcall
  95. #
  96. # MS MIPS specific compiler flags:
  97. #   none.
  98. #
  99. # -------------------------------------------------------------------------
  100.  
  101. # declarations common to all compiler options
  102. ccommon = -c -nologo -W3
  103.  
  104. cflags = $(ccommon) -D_X86_=1 -Zp2 -Gsfy -Gc -Gx- -J
  105. scall  = -Gz
  106.  
  107. # Generate 286 code -- 386 codegen is too broken
  108. cflags = $(cflags) -G2
  109.  
  110. INCLUDE = $(MSTOOLS)\h;$(INCLUDE)
  111. LIB = $(MSTOOLS)\lib;$(LIB)
  112. cflags = $(cflags) -DWIN16 # -D_WIN16
  113.  
  114. !IF "$(WINVERSION)" != ""
  115. cflags = $(cflags) -DWINVER=$(WINVERSION)
  116. !ELSE
  117. cflags = $(cflags) -DWINVER=0x030A
  118. !ENDIF
  119.  
  120. !IFDEF NODEBUG
  121. cdebug = -Ox
  122. !ELSE
  123. cdebug = -Z7 -Od -Ob1    # use -Zi for MSVC
  124. !ENDIF
  125.  
  126. # -------------------------------------------------------------------------
  127. # Target Module & Subsystem Dependent Compile Defined Variables - must be
  128. #   specified after $(cc)
  129. #
  130. # The following table indicates the various acceptable combinations of
  131. # the C Run-Time libraries LIBC, LIBCMT, and CRTDLL respect to the creation
  132. # of a EXE and/or DLL target object.  The appropriate compiler flag macros
  133. # that should be used for each combination are also listed.
  134. #
  135. #  Link EXE    Create Exe    Link DLL    Create DLL
  136. #    with        Using         with         Using
  137. # ----------------------------------------------------
  138. #  LIBC        CVARS          None        None      *
  139. #  LIBC        CVARS          LIBC        CVARS
  140. #  LIBC        CVARS          LIBCMT      CVARSMT
  141. #  LIBCMT      CVARSMT        None        None      *
  142. #  LIBCMT      CVARSMT        LIBC        CVARS
  143. #  LIBCMT      CVARSMT        LIBCMT      CVARSMT
  144. #  CRTDLL      CVARSDLL       None        None      *
  145. #  CRTDLL      CVARSDLL       LIBC        CVARS
  146. #  CRTDLL      CVARSDLL       LIBCMT      CVARSMT
  147. #  CRTDLL      CVARSDLL       CRTDLL      CVARSDLL  *
  148. #
  149. # * - Denotes the Recommended Configuration
  150. #
  151. # When building single-threaded applications you can link your executable
  152. # with either LIBC, LIBCMT, or CRTDLL, although LIBC will provide the best
  153. # performance.
  154. #
  155. # When building multi-threaded applications, either LIBCMT or CRTDLL can
  156. # be used as the C-Runtime library, as both are multi-thread safe.
  157. #
  158. # Note: Any executable which accesses a DLL linked with CRTDLL.LIB must
  159. #       also link with CRTDLL.LIB instead of LIBC.LIB or LIBCMT.LIB.
  160. #       When using DLLs, it is recommended that all of the modules be
  161. #       linked with CRTDLL.LIB.
  162. #
  163. # Note: The macros of the form xDLL are used when linking the object with
  164. #       the DLL version of the C Run-Time (that is, CRTDLL.LIB).  They are
  165. #       not used when the target object is itself a DLL.
  166. #
  167. # -------------------------------------------------------------------------
  168.  
  169. # for Windows applications that use the C Run-Time libraries
  170. cvars      = -AL -GA -GEs
  171. cvarsdll   = -Al -Alfu -Gd -D_WINDLL -D_DLL
  172.  
  173. # resource compiler
  174. rcflags = /r
  175. rcvars = -DWIN16 -D_WIN16 $(noansi)
  176.  
  177. rcvars = $(rcvars) -DWINVER=0x030A
  178.  
  179. # -------------------------------------------------------------------------
  180. # Platform Dependent Link Flags - must be specified after $(link)
  181. #
  182. # Note: $(DLLENTRY) should be appended to each -entry: flag on the link
  183. #       line.
  184. #
  185. # Note: When creating a DLL that uses C Run-Time functions it is
  186. #       recommended to include the entry point function of the name DllMain
  187. #       in the DLL's source code.  Also, the MAKEFILE should include the
  188. #       -entry:_DllMainCRTStartup$(DLLENTRY) option for the creation of
  189. #       this DLL.  (The C Run-Time entry point _DllMainCRTStartup in turn
  190. #       calls the DLL defined DllMain entry point.)
  191. #
  192. # -------------------------------------------------------------------------
  193.  
  194. # declarations common to all linker options
  195. lcommon = /NOD /NOE /MAP /ONERROR:NOEXE /NOLOGO
  196.  
  197. # declarations for use on Intel i386, i486, and Pentium systems
  198. lflags   = $(lcommon)
  199.  
  200. # -------------------------------------------------------------------------
  201. # Target Module Dependent Link Debug Flags - must be specified after $(link)
  202. #
  203. # These switches allow the inclusion of the necessary symbolic information
  204. # for source level debugging with WinDebug, profiling and/or performance
  205. # tuning.
  206. #
  207. # Note: Debug switches are on by default.
  208. # -------------------------------------------------------------------------
  209.  
  210. !IFDEF NODEBUG
  211. ldebug = 
  212. !ELSE
  213. ldebug = /CO
  214. !ENDIF
  215.  
  216. # -------------------------------------------------------------------------
  217. # Subsystem Dependent Link Flags - must be specified after $(link)
  218. #
  219. # These switches allow for source level debugging with WinDebug for local
  220. # and global variables.  They also provide the standard application type and
  221. # entry point declarations.
  222. # -------------------------------------------------------------------------
  223.  
  224. # for Windows applications that use the C Run-Time libraries
  225. conlflags = $(lflags) 
  226. guilflags = $(lflags) 
  227. dlllflags = $(lflags) # -dll
  228.  
  229. # -------------------------------------------------------------------------
  230. # C Run-Time Target Module Dependent Link Libraries
  231. #
  232. # Below is a table which describes which libraries to use depending on the
  233. # target module type, although the table specifically refers to Graphical
  234. # User Interface apps, the exact same dependencies apply to Console apps.
  235. # That is, you could replace all occurrences of 'GUI' with 'CON' in the
  236. # following:
  237. #
  238. # Desired CRT  Libraries   Desired CRT  Libraries
  239. #   Library     to link      Library     to link
  240. #   for EXE     with EXE     for DLL     with DLL
  241. # ----------------------------------------------------
  242. #   LIBC       GUILIBS       None       None       *
  243. #   LIBC       GUILIBS       LIBC       GUILIBS
  244. #   LIBC       GUILIBS       LIBCMT     GUILIBSMT
  245. #   LIBCMT     GUILIBSMT     None       None       *
  246. #   LIBCMT     GUILIBSMT     LIBC       GUILIBS
  247. #   LIBCMT     GUILIBSMT     LIBCMT     GUILIBSMT
  248. #   CRTDLL     GUILIBSDLL    None       None       *
  249. #   CRTDLL     GUILIBSDLL    LIBC       GUILIBS
  250. #   CRTDLL     GUILIBSDLL    LIBCMT     GUILIBSMT
  251. #   CRTDLL     GUILIBSDLL    CRTDLL     GUILIBSDLL *
  252. #
  253. # * - Recommended Configurations.
  254. #
  255. # Note: Any executable which accesses a DLL linked with CRTDLL.LIB must
  256. #       also link with CRTDLL.LIB instead of LIBC.LIB or LIBCMT.LIB.
  257. #
  258. # -------------------------------------------------------------------------
  259.  
  260. # These CRT Libraries assume the use of Microsoft Visual C++ 1.5
  261. # If you are using another Compiler product, change the libc* 
  262. # variable to correspond to your import library names.
  263.  
  264. # for Windows applications that use the C Run-Time libraries
  265. conlibs    = oldnames.lib llibce.lib
  266. guilibs    = commdlg.lib oldnames.lib libw.lib llibcew.lib
  267. guilibsdll = commdlg.lib oldnames.lib libw.lib ldllcew.lib
  268.  
  269. # for OLE applications
  270. olelibs      = compobj.lib ole2.lib ole2disp.lib $(guilibs)
  271. olelibsmt    = compobj.lib ole2.lib ole2disp.lib $(guilibsmt)
  272. olelibsdll   = compobj.lib ole2.lib ole2disp.lib $(guilibsdll)
  273.  
  274. #ENDIF _WIN16_MAK_
  275. !ENDIF 
  276.