common.inc
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 9k
Category:

Windows Kernel

Development Platform:

Visual C++

  1. ##########################################################################
  2. #
  3. #   Microsoft Confidential
  4. #   Copyright (C) Microsoft Corporation 1991-1998
  5. #   All Rights Reserved.
  6. #
  7. ##########################################################################
  8. #
  9. # Common include file 'sources' files in the shell project.
  10. #
  11. #
  12. # These definitions are required in your sources file:
  13. #
  14. #     CCSHELL_DIR
  15. #        Path to ccshell root.
  16. #
  17. #     FREEBUILD
  18. #        Set by makefile.def file for you.  One of the following:
  19. #          0      - build debug
  20. #          1      - build retail
  21. #
  22. #
  23. # Definitions used if defined:
  24. #
  25. #     TARGET_WIN95
  26. #        Build component explicitly for the Win95 platform.  If this is
  27. #        not defined, default is NT or both.
  28. #
  29. #     TARGET_BOTH
  30. #        Build component to run on both platforms.
  31. #
  32. #     NO_PRIVATE_HEADERS
  33. #        If set to 1, this is defined as a manifest constant, so the
  34. #        stub headers in shellincstubs do not include the private
  35. #        companion headers.
  36. #
  37. #     BUILD_PRIVLIB
  38. #        Build a private import library too.  See the comments in 
  39. #        makefile.inc.
  40. #
  41. #     USE_NT_PRODUCT_VER
  42. #        If defined, this will use the NT team's product version
  43. #        numbers, as opposed to the IE team's numbers.
  44. #
  45. #
  46. # Environment Variables and their meanings
  47. #
  48. #     ATL_DEBUG_QI
  49. #        When set to 1, debug builds will also have _ATL_DEBUG_QI
  50. #        defined.  ATL code spews a bunch of debug stuff during QueryInterface.
  51. #
  52. #     ATL_DEBUG_REFCOUNT
  53. #        When set to 1, debug builds will also have _ATL_DEBUG_REFCOUNT
  54. #        defined.  ATL code spews a bunch of debug stuff during AddRef
  55. #        and Release.
  56. #
  57. #     FULL_DEBUG
  58. #        If set to 1, then debug builds will also have FULL_DEBUG defined.
  59. #        Retail builds unaffected.  This is highly encouraged for regular
  60. #        development purposes.  Not to be set or used by the build labs.
  61. #
  62. #     MEASURE_PERF
  63. #        If set to 1, enables performance timing code for both debug and
  64. #        retail builds.  This code squirts the timings for interesting
  65. #        events to the debug terminal.
  66. #
  67. #     USE_LEGO
  68. #        Define lego macros
  69. #
  70. !if !defined(CCSHELL_DIR)
  71. !error  CCSHELL_DIR must be defined in sources file
  72. !endif
  73. #
  74. # Set private paths
  75. #
  76. INCLUDES        = 
  77.     ..;
  78.     $(CCSHELL_DIR)inc;
  79.     $(CCSHELL_DIR)incstubs;
  80.     $(BASEDIR)privatewindowsinc;
  81.     $(SDK_INC_PATH);
  82.     $(BASEDIR)privateinc;
  83.     $(INCLUDES)
  84. #
  85. # Skip these files when determining dependencies
  86. #
  87. CONDITIONAL_INCLUDES = $(CONDITIONAL_INCLUDES) 
  88.                   atlbase.h  
  89.                   atlcom.h   
  90.                   atlconv.h  
  91.                   atlctl.h   
  92.                   atlctl.cpp 
  93.                   atliface.h 
  94.                   atlimpl.cpp 
  95.                   atlwin.h   
  96.                   atlwin.cpp 
  97.                   ia64inst.h 
  98.                   macapi.h   
  99.                   macname1.h 
  100.                   macname2.h 
  101.                   macocidl.h 
  102.                   macpub.h   
  103.                   macwin32.h 
  104.                   mainwin.h  
  105.                   mwversion.h 
  106.                   penwin.h 
  107.                   pshpck16.h 
  108.                   rpcerr.h   
  109.                   rpcmac.h   
  110.                   setupx.h   
  111.                   skbapi.h   
  112.                   statreg.h  
  113.                   statreg.cpp 
  114.                   unixstuff.h 
  115.                   version.h  
  116.                   winwlm.h   
  117.                   ..inc16shellapi.h 
  118.                   vobsuserxuserxpublicsdkincwinbase.h    
  119.                   vobsuserxuserxpublicsdkincwingdi.h     
  120.                   vobsuserxuserxpublicsdkincwinuser.h    
  121.                   vobsuserxuserxpublicsdkincshellapi.h   
  122.                   vobsuserxuserxpublicsdkincwinspool.h   
  123.                   vobsuserxuserxpublicsdkincprsht.h      
  124.                   vobsuserxuserxpublicsdkinccommdlg.h    
  125.                   vobsuserxuserxpublicsdkincshlobj.h     
  126.                   vobsuserxuserxpublicsdkinccommctrl.h   
  127.                   vobsuserxuserxpublicsdkincshlguid.h    
  128.                   vobsuserxuserxpublicsdkincshlwapi.h    
  129.                   vobsuserxuserxpublicsdkincintshcut.h   
  130. !if !defined(TARGET_WIN95)
  131. LIBRARY_PLATFORM_PATH   = $(BASEDIR)publicsdklib
  132. !else
  133. # (use 'chicago' since that is already used in the NT tree)
  134. INCLUDES                = $(INCLUDES);$(CCSHELL_DIR)incwin95;
  135. LIBRARY_PLATFORM_PATH   = $(BASEDIR)publicsdklibchicago
  136. ALT_PROJECT_TARGET      = chicago
  137. !endif
  138. #
  139. # Set common options
  140. #
  141. # Do this to assure that we run on NT 4.0 and Win95, even with
  142. # NT5/Memphis headers.
  143. !if !defined(WIN32_WINNT_VERSION)
  144. WIN32_WINNT_VERSION=0x0400
  145. !endif
  146. !if !defined(WIN32_WIN95_VERSION)
  147. WIN32_WIN95_VERSION=0x0400
  148. !endif
  149. !if !defined(WIN32_IE_VERSION)
  150. #   WARNING!  If you increment WIN32_IE_VERSION, make sure to tell the
  151. #   Wx86 people or their build will break!
  152. WIN32_IE_VERSION=0x0501
  153. !endif
  154. # Override NT5 settings
  155. SUBSYSTEM_VERSION=4.00
  156. # Defining this allows windows.h to include other headers
  157. NOT_LEAN_AND_MEAN= 1
  158. # Don't link to the runtime libs
  159. USE_NOLIBS      = 1
  160. # Don't link to NTDLL if this runs on both platforms
  161. !ifdef TARGET_BOTH
  162. NO_NTDLL=1
  163. !endif
  164. !if defined(TARGET_WIN95)
  165. #  Don't define WINNT
  166. CHICAGO_PRODUCT = 1
  167. !endif
  168. UMTYPE          = windows
  169. # Ignore the following linker warnings
  170. #    4049:locally defined symbol "Xxx" imported
  171. LINKER_FLAGS = $(LINKER_FLAGS) -ignore:4049
  172. #
  173. # Lego options
  174. #
  175. !if defined(USE_LEGO)
  176. NTBBT           = 1
  177. NTPROFILEINPUT  = 1
  178. !endif
  179. #
  180. # Additional compiler flags
  181. #
  182. C_DEFINES       = $(C_DEFINES) -DWIN32 -D_WIN32 -DPOSTSPLIT -DUSE_MIRRORING
  183. C_DEFINES       = $(C_DEFINES) -DUNICODE_SHDOCVW
  184. !if defined(TARGET_DEMO)
  185. C_DEFINES       = $(C_DEFINES) -DWINNT_6DEMO
  186. !endif
  187. !ifdef USE_ICECAP
  188. C_DEFINES = $(C_DEFINES) -DPRODUCT_PROF
  189. !endif
  190. !if !defined(TARGET_WIN95)
  191. C_DEFINES       = $(C_DEFINES) -DNT
  192. !  if !defined(NOT_UNICODE)
  193. C_DEFINES       = $(C_DEFINES) -DUNICODE -D_UNICODE
  194. !  endif
  195. !endif
  196. # ------ Debug Only Defines --------
  197. !if "$(FREEBUILD)" == "0"
  198. C_DEFINES       = $(C_DEFINES) -DDEBUG
  199. LINKER_NOICF      = 1           # ICF is s-l-o-w
  200. # Check for missing PURE directives in interface decls (debug only)
  201. C_DEFINES       = $(C_DEFINES) -DNO_NOVTABLE
  202. # Define FULL_DEBUG for asserts to break by default
  203. !  if "$(FULL_DEBUG)" == "1"
  204. C_DEFINES       = $(C_DEFINES) -DFULL_DEBUG 
  205. !  endif
  206. # Allow someone to have ATL_DEBUG_REFCOUNT and ATL_DEBUG_QI set 
  207. # in their environment to turn this on
  208. !  if "$(ATL_DEBUG_REFCOUNT)" == "1"
  209. C_DEFINES       = $(C_DEFINES) -D_ATL_DEBUG_REFCOUNT
  210. !  endif
  211. !  if "$(ATL_DEBUG_QI)" == "1"
  212. C_DEFINES       = $(C_DEFINES) -D_ATL_DEBUG_QI
  213. !  endif
  214. !endif
  215. # ------ End Debug Only Defines --------
  216. !if "$(MEASURE_PERF)" == "1"
  217. C_DEFINES       = $(C_DEFINES) -DMEASURE_PERF
  218. !endif
  219. !if "$(NO_PRIVATE_HEADERS)" == "1"
  220. C_DEFINES       = $(C_DEFINES) -DNO_PRIVATE_HEADERS
  221. !endif
  222. !ifdef USE_NT_PRODUCT_VER
  223. # Use the NT product version numbers
  224. C_DEFINES       = $(C_DEFINES) -UNASHVILLE
  225. !else
  226. # Use the IE product version numbers.  (The ntverp.h file checks
  227. # for NASHVILLE.)
  228. C_DEFINES       = $(C_DEFINES) -DNASHVILLE
  229. !endif
  230. # This define helps us distinguish our development environment
  231. # BUGBUG (scotth): I think we can get rid of this now
  232. C_DEFINES       = $(C_DEFINES) -DWINNT_ENV
  233. # IE40-only features
  234. FEATURE_IE40    = 1
  235. !ifdef FEATURE_IE40
  236. C_DEFINES       = $(C_DEFINES) -DFEATURE_IE40 -DNASH
  237. !endif
  238. # Make warnings equivalent to errors
  239. !if !defined(MSC_WARNING_LEVEL)
  240. MSC_WARNING_LEVEL= /W3
  241. !endif
  242. MSC_WARNING_LEVEL= $(MSC_WARNING_LEVEL) /WX
  243. !if defined(TARGET_WIN95) || defined(TARGET_BOTH)
  244. USE_MAPSYM      = 1
  245. !endif
  246. !if !defined(CLEANINF_FLAGS)
  247. # Cleaninf flags
  248. CLEANINF_FLAGS  = -w
  249. !endif
  250. # Cleaninf utility
  251. CLEANINF        = cleaninf.exe $(CLEANINF_FLAGS)
  252. !ifdef BUILD_PRIVLIB
  253. NTTARGETFILE1   = $(NTTARGETFILE1) $(TARGETPATHLIB)*$(PRIVLIB)
  254. !endif
  255. # Short: if you're a shell dev, you should have SHELLDEV=1 set in your 
  256. # environment.
  257. # Long: Components like BROWSEUI.DLL build standard and alternate DLLs depending
  258. # on the BUILD_PRODUCT environment variable.  (See browseuisources.inc for
  259. # more details.)  Because of other expectations in iedevlib that we (the
  260. # shell team) need, we must have our razzle environment set BUILD_PRODUCT=IE.
  261. # However, in the scope of the shell project, we need to change this to 
  262. # BUILD_PRODUCT=NT so we mimic the NT build lab's settings.  But the IE team 
  263. # needs the BUILD_PRODUCT to remain "IE".  We key off of SHELLDEV to know
  264. # whether to switch.
  265. !if "$(SHELLDEV)" == "1"
  266. BUILD_PRODUCT = NT
  267. !endif
  268. #
  269. # Linker flags
  270. #
  271. !if "$(BUILD_PRODUCT)" == "IE"
  272. USE_WIN98OPT=1
  273. !endif