Leaked source code of windows server 2003
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.

502 lines
16 KiB

  1. # ============================================================================
  2. # File: MAKELIB
  3. #
  4. # NMAKE description file to build STATIC version of OLE2.0 User Interface LIB
  5. #
  6. # Copyright (C) Microsoft Corporation, 1992-1993. All Rights Reserved.
  7. # ============================================================================
  8. #
  9. # Usage Notes:
  10. # -----------
  11. #
  12. # This makefile is designed to be used in one step. This makefile does
  13. # NOT use the file called UIMAKE.INI. This makefile builds the following
  14. # libraries (depending on the value of "LIBFORDLL" and "DEBUG"):
  15. # OLE2UIX.LIB -- static RETAIL library to be used with EXE's
  16. # OLE2UIXD.LIB -- static DEBUG library to be used with EXE's
  17. #
  18. # OLE2UID.LIB -- static RETAIL library to be used with DLL's
  19. # OLE2UIDD.LIB -- static DEBUG library to be used with DLL's
  20. #
  21. # It is NOT necessary to build custom versions of the static
  22. # library version of OLE2UI. Everyone can use the same static OLE2UI
  23. # libraries as built by this makefile.
  24. #
  25. # NMAKE -F MAKELIB
  26. # NMAKE -F MAKELIB DEBUG=0
  27. # NMAKE -F MAKELIB LIBFORDLL=1
  28. # NMAKE -F MAKELIB LIBFORDLL=1 DEBUG=0
  29. #
  30. #
  31. # The following lists a few of the settings in this makefile file which
  32. # you might change, and what effect those changes might have. For a
  33. # complete listing of all the available options and how they are used,
  34. # see the makefile below.
  35. #
  36. # MODEL=[M|L] -- The memory model. (Default: M)
  37. # DEBUG=[0|1] -- Enable DEBUG or RETAIL version (Default: 1)
  38. # LIBFORDLL=[0|1] -- Enable DEBUG or RETAIL version (Default: 0)
  39. # SAMPLIB_DIR -- Directory to install built .LIB file
  40. # (Default: \ole2\samp\bin)
  41. # SAMPINC_DIR -- Directory to install public header files
  42. # (Default: \ole2\samp\include)
  43. # OLELIB_DIR -- Directory for OLE2 libraries
  44. # (Default: \ole2\bin)
  45. # OLEINC_DIR -- Directory for OLE2 public header files
  46. # (Default: \ole2\include)
  47. #
  48. # Comments:
  49. # --------
  50. #
  51. # In order to use the static library form of the OLE2UI library then you must
  52. # include "ole2ui.rc" resource file in your applications resource file. Also
  53. # "OleUIInitialize" must be called before calling any library functions.
  54. # This is called typically before entering the main message loop in an EXE
  55. # and called from LibMain for an in-proc server (DLL). Two unique strings
  56. # should be passed as paramters to OleUIInitialize. These strings are used
  57. # as class names for two custom controls used in the OLE2UI dialogs.
  58. # Before shutting down "OleUIUninitialize" must be called in order to clean up
  59. # resources used by the OLE2UI library. In an EXE, this is typically called
  60. # after leaving the main message loop; in an DLL, this is typically called
  61. # from the DLL's WEP function.
  62. # If the OLE2UI library is used in DLL form then explicitly including the
  63. # "ole2ui.rc" resource file and calling OleUIInitialize/OleUIUninitialize
  64. # is NOT necessary.
  65. # ============================================================================
  66. DEBUG=1
  67. MODEL=M
  68. LIBFORDLL=0
  69. NOASSERT=1
  70. OLE201=1
  71. DOS=1
  72. !if "$(OPSYS)"=="DOS"
  73. OBJDIR=objidd
  74. !else
  75. OBJDIR=obji1d
  76. !endif
  77. !ifndef SAMPINC_DIR
  78. SAMPINC_DIR=..\include
  79. !endif
  80. !ifndef SAMPLIB_DIR
  81. SAMPLIB_DIR=..\lib
  82. !endif
  83. !ifndef OLEINC_DIR
  84. !if "$(OPSYS)"=="DOS"
  85. OLEINC_DIR=..\..\include;$(CAIROLE)\h\export;$(IMPORT)\CHICAGO\h;\
  86. $(IMPORT)\CHICAGO\h\crt;$(COMMON)\ih;$(COMMON)\types
  87. !else
  88. OLEINC_DIR=..\..\include;$(CAIROLE)\h\export;$(IMPORT)\$(OPSYS)\h\sdk;\
  89. $(IMPORT)\$(OPSYS)\h\sdk\crt;$(COMMON)\ih;$(COMMON)\types
  90. !endif
  91. !endif
  92. !ifndef OLELIB_DIR
  93. !if "$(OPSYS)"=="DOS"
  94. OLELIB_DIR=..\..\lib;$(CAIROLE)\ilib\$(OBJDIR);$(IMPORT)\chicago\lib
  95. !else
  96. OLELIB_DIR=..\..\lib;$(CAIROLE)\ilib\$(OBJDIR)
  97. !endif
  98. !endif
  99. !if ("$(OLE201)"=="1")
  100. MISCFLAGS=/DOLE201
  101. !endif
  102. !if ("$(NOASSERT)"=="1")
  103. MISCFLAGS=$(MISCFLAGS) /DNOASSERT
  104. !endif
  105. !if ("$(DEBUG)"=="1")
  106. MSG=DEBUG Static LIB Version
  107. #CFLAGS=-c -Od -GA2s -W3 -Zpei -A$(MODEL) -D_DEBUG
  108. !ifdef WIN16
  109. LFLAGS=/MAP:FULL /CO /LINE /NOD /NOE /SE:300 /NOPACKCODE
  110. !else
  111. LFLAGS=/MAP:$(O)$(LIBNAME).map /DEBUGTYPE:CV /NOD /NOPACK
  112. !endif
  113. CC=$(IMPORT)\n386\bin\cl
  114. AS=$(IMPORT)\n386\bin\masm
  115. RS=$(IMPORT)\n386\bin\rc
  116. LINK=$(COMMON)\bin\link $(LFLAGS)
  117. LIB=lib
  118. !if ("$(LIBFORDLL)"=="1")
  119. #
  120. # Build DEBUG OLE2UI library for use with DLL's (eg. in-proc server objects)
  121. #
  122. MSG=DEBUG Static LIB Version (for use with DLL's)
  123. LIBNAME=OLE2UIDD
  124. OBJ=OLE2UIDD
  125. CFLAGS=-c -Od -W3 -Zpei -D_DEBUG -DDLL_VER -D_WINDLL -DLIBNAME=\"$$(LIBNAME)\"
  126. !ifdef WIN16
  127. CFLAGS=$(CFLAGS) -GD -GEd -AMw
  128. UILIBS=ldllcew libw ole2 storage shell
  129. !else
  130. CFLAGS=$(CFLAGS) -Gd -DWIN32 -DUNICODE -D_UNICODE -D_INC_OLE -D_X86_ $(MISCFLAGS)
  131. UILIBS=libw32.lib storag32.lib shell32.lib
  132. !if "$(OLE201)"=="1"
  133. UILIBS=$(UILIBS) ole2w32.lib
  134. !else
  135. UILIBS=$(UILIBS) ole232.lib
  136. !endif
  137. !endif
  138. LIBOBJS = $(UI_COBJS:D^\=OLE2UIDD^\) $(UI_NOPCOBJS:D^\=OLE2UIDD\NOPC^\)
  139. !else
  140. #
  141. # Build DEBUG OLE2UI library for use with EXE's
  142. #
  143. MSG=DEBUG Static LIB Version (for use with EXE's)
  144. LIBNAME=OLE2UIXD
  145. OBJ=OLE2UIXD
  146. CFLAGS=-c -Od -W3 -Zpei #-D_DEBUG
  147. !ifdef WIN16
  148. CFLAGS=$(CFLAGS) -GA2s -A$(MODEL)
  149. UILIBS=mlibcew libw ole2 storage shell
  150. !else
  151. CFLAGS=$(CFLAGS) -Gs -DWIN32 -DUNICODE -D_UNICODE -D_INC_OLE -D_X86_ $(MISCFLAGS)
  152. !if "$(OPSYS)"=="DOS"
  153. UILIBS= $(IMPORT)\CHICAGO\lib\advapi32.lib \
  154. $(IMPORT)\CHICAGO\lib\comdlg32.lib \
  155. $(IMPORT)\CHICAGO\lib\crtdll.lib \
  156. $(IMPORT)\CHICAGO\lib\gdi32.lib \
  157. $(IMPORT)\CHICAGO\lib\kernel32.lib \
  158. $(IMPORT)\CHICAGO\lib\libcmt.lib \
  159. $(IMPORT)\CHICAGO\lib\shell32.lib \
  160. $(IMPORT)\CHICAGO\lib\user32.lib \
  161. $(IMPORT)\CHICAGO\lib\wsock32.lib
  162. !else
  163. UILIBS= $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\advapi32.lib \
  164. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\comdlg32.lib \
  165. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\crtdll.lib \
  166. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\gdi32.lib \
  167. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\kernel32.lib \
  168. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\libcmt.lib \
  169. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\shell32.lib \
  170. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\user32.lib
  171. !endif
  172. UILIBS= $(UILIBS) \
  173. $(CAIROLE)\ilib\$(OBJDIR)\ole2w32.lib \
  174. $(CAIROLE)\ilib\$(OBJDIR)\storag32.lib \
  175. $(CAIROLE)\ilib\$(OBJDIR)\compob32.lib
  176. !endif
  177. LIBOBJS = $(UI_COBJS:D^\=OLE2UIXD^\) $(UI_NOPCOBJS:D^\=OLE2UIXD\NOPC^\)
  178. !endif
  179. !else
  180. #CFLAGS=-c -Os -GA2s -W3 -Zpe -A$(MODEL)
  181. !ifdef WIN16
  182. LFLAGS=/MAP:FULL /LINE /NOD /NOE /SE:300 /NOPACKCODE
  183. !else
  184. LFLAGS=/MAP:$(O)$(LIBNAME).map /NOD /NOPACK
  185. !endif
  186. CC=$(IMPORT)\n386\bin\cl
  187. AS=$(IMPORT)\n386\bin\masm
  188. RS=$(IMPORT)\n386\bin\rc
  189. LINK=$(COMMON)\bin\link $(LFLAGS)
  190. LIB=lib
  191. !if ("$(LIBFORDLL)"=="1")
  192. #
  193. # Build RETAIL OLE2UI library for use with DLL's (eg. in-proc server objects)
  194. #
  195. MSG=RETAIL Static LIB Version (for use with DLL's)
  196. LIBNAME=OLE2UID
  197. OBJ=OLE2UID
  198. CFLAGS=-c -Os -D_WINDLL -W3 -Zpe
  199. !ifdef WIN16
  200. CFLAGS=$(CFLAGS) -GD -GEd -A$(MODEL)
  201. UILIBS=ldllcew libw ole2 storage shell
  202. !else
  203. CFLAGS=$(CFLAGS) -Gd -DWIN32 -DUNICODE -D_UNICODE -D_INC_OLE -D_X86_ $(MISCFLAGS)
  204. !if "$(OPSYS)"=="DOS"
  205. UILIBS= $(IMPORT)\CHICAGO\lib\advapi32.lib \
  206. $(IMPORT)\CHICAGO\lib\comdlg32.lib \
  207. $(IMPORT)\CHICAGO\lib\crtdll.lib \
  208. $(IMPORT)\CHICAGO\lib\gdi32.lib \
  209. $(IMPORT)\CHICAGO\lib\kernel32.lib \
  210. $(IMPORT)\CHICAGO\lib\libcmt.lib \
  211. $(IMPORT)\CHICAGO\lib\shell32.lib \
  212. $(IMPORT)\CHICAGO\lib\user32.lib
  213. !else
  214. UILIBS= $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\advapi32.lib \
  215. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\comdlg32.lib \
  216. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\crtdll.lib \
  217. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\gdi32.lib \
  218. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\kernel32.lib \
  219. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\libcmt.lib \
  220. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\shell32.lib \
  221. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\user32.lib
  222. !endif
  223. UILIBS= $(UILIBS) \
  224. $(CAIROLE)\ilib\$(OBJDIR)\ole2w32.lib \
  225. $(CAIROLE)\ilib\$(OBJDIR)\storag32.lib \
  226. $(CAIROLE)\ilib\$(OBJDIR)\compob32.lib
  227. !endif
  228. LIBOBJS = $(UI_COBJS:D^\=OLE2UID^\) $(UI_NOPCOBJS:D^\=OLE2UID\NOPC^\)
  229. !else
  230. #
  231. # Build RETAIL OLE2UI library for use with EXE's
  232. #
  233. MSG=RETAIL Static LIB Version (for use with EXE's)
  234. LIBNAME=OLE2UIX
  235. OBJ=OLE2UIX
  236. CFLAGS=-c -Os -W3 -Zpe
  237. !ifdef WIN16
  238. CFLAGS=$(CFLAGS) -GA2s -GEs -A$(MODEL)
  239. UILIBS=mlibcew libw ole2 storage shell
  240. !else
  241. CFLAGS=$(CFLAGS) -Gs -DWIN32 -DUNICODE -D_UNICODE -D_INC_OLE -D_X86_ $(MISCFLAGS)
  242. !if "$(OPSYS)"=="DOS"
  243. UILIBS= $(IMPORT)\CHICAGO\lib\advapi32.lib \
  244. $(IMPORT)\CHICAGO\lib\comdlg32.lib \
  245. $(IMPORT)\CHICAGO\lib\crtdll.lib \
  246. $(IMPORT)\CHICAGO\lib\gdi32.lib \
  247. $(IMPORT)\CHICAGO\lib\kernel32.lib \
  248. $(IMPORT)\CHICAGO\lib\libcmt.lib \
  249. $(IMPORT)\CHICAGO\lib\shell32.lib \
  250. $(IMPORT)\CHICAGO\lib\user32.lib
  251. !else
  252. UILIBS= $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\advapi32.lib \
  253. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\comdlg32.lib \
  254. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\crtdll.lib \
  255. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\gdi32.lib \
  256. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\kernel32.lib \
  257. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\libcmt.lib \
  258. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\shell32.lib \
  259. $(IMPORT)\$(OPSYS)\lib\$(OBJDIR)\user32.lib
  260. !endif
  261. UILIBS= $(UILIBS) \
  262. $(CAIROLE)\ilib\$(OBJDIR)\ole2w32.lib \
  263. $(CAIROLE)\ilib\$(OBJDIR)\storag32.lib \
  264. $(CAIROLE)\ilib\$(OBJDIR)\compob32.lib
  265. !endif
  266. LIBOBJS = $(UI_COBJS:D^\=OLE2UIX^\) $(UI_NOPCOBJS:D^\=OLE2UIX\NOPC^\)
  267. !endif
  268. !endif
  269. GOAL: PRELUDE $(LIBNAME).LIB
  270. # ----------------------------------------------------------------------------
  271. # O B J E C T F I L E L I S T
  272. # ----------------------------------------------------------------------------
  273. UI_COBJS = \
  274. D^\busy.obj\
  275. D^\common.obj\
  276. D^\convert.obj\
  277. D^\dbgutil.obj\
  278. D^\drawicon.obj\
  279. D^\hatch.obj\
  280. D^\icon.obj\
  281. D^\iconbox.obj\
  282. D^\insobj.obj\
  283. D^\links.obj\
  284. D^\msgfiltr.obj\
  285. D^\enumfetc.obj\
  286. D^\enumstat.obj\
  287. D^\objfdbk.obj\
  288. D^\ole2ui.obj\
  289. D^\olestd.obj\
  290. D^\targtdev.obj\
  291. D^\oleutl.obj\
  292. D^\pastespl.obj\
  293. D^\regdb.obj\
  294. D^\resimage.obj\
  295. D^\utility.obj\
  296. UI_NOPCOBJS = \
  297. D^\geticon.obj\
  298. D^\dballoc.obj\
  299. D^\suminfo.obj\
  300. D^\stdpal.obj\
  301. PRECOMPOBJ= $(O)precomp.obj
  302. PRECOMP=$(O)precomp.pch
  303. # ----------------------------------------------------------------------------
  304. # R E S O U R C E L I S T
  305. # ----------------------------------------------------------------------------
  306. RES = \
  307. busy.h \
  308. common.h \
  309. convert.h \
  310. edlinks.h \
  311. geticon.h \
  312. icon.h \
  313. iconbox.h \
  314. insobj.h \
  315. msgfiltr.h \
  316. enumfetc.h \
  317. ole2ui.h \
  318. pastespl.h \
  319. resimage.h \
  320. dballoc.h \
  321. suminfo.h \
  322. stdpal.h \
  323. .SUFFIXES: .c .cpp .obj
  324. O=.\$(OBJ)^\
  325. !if [if not exist $(OBJ)\*. md $(OBJ) >nul]
  326. !error Object subdirectory $(OBJ)\ could not be created
  327. !endif
  328. !if [if not exist $(OBJ)\NOPC\*. md $(OBJ)\NOPC > nul]
  329. !error non-precompiled header object subdirectory $(OBJ)\NOPC\ could not be created
  330. !endif
  331. # ----------------------------------------------------------------------------
  332. # I N F E R E N C E R U L E S
  333. # ----------------------------------------------------------------------------
  334. # compile C file without precompiled headers into object directory\NOPC
  335. # dont compile c files etc for lcoalized builds.
  336. {}.c{$(O)NOPC\}.obj:
  337. @echo Are you compiling with OLE 2.01 ??????
  338. @echo ������������������������� Compiling $(@B).c �������������������������
  339. !ifdef DOS
  340. SET CL=$(CFLAGS)
  341. $(CC) -Fo$(O)NOPC\$(@B) $(@B).c
  342. !else
  343. $(CC) $(CFLAGS) -D_FILE_=\"$(*B).c\" -Fo$(O)NOPC\$(@B) $(@B).c
  344. !endif
  345. # compile C file into object directory
  346. {}.c{$(O)}.obj:
  347. @echo ������������������������� Compiling $(@B).c �������������������������
  348. !ifdef DOS
  349. SET CL=$(CFLAGS) -Yuole2ui.h -Fp$(O)precomp.pch
  350. $(CC) -Fo$(O)$(@B) $(@B).c
  351. !else
  352. $(CC) $(CFLAGS) -Yuole2ui.h -Fp$(O)precomp.pch -D_FILE_=\"$(*B).c\" -Fo$(O)$(@B) $(@B).c
  353. !endif
  354. # compile CPP file without precompiled headers into object directory\NOPC
  355. # dont compile cpp files etc for lcoalized builds.
  356. {}.cpp{$(O)NOPC\}.obj:
  357. @echo ������������������������� Compiling $(@B).cpp �������������������������
  358. !ifdef DOS
  359. SET CL=$(CFLAGS)
  360. $(CC) -Fo$(O)NOPC\$(@B) $(@B).cpp
  361. !else
  362. $(CC) $(CFLAGS) -D_FILE_=\"$(*B).cpp\" -Fo$(O)NOPC\$(@B) $(@B).cpp
  363. !endif
  364. # compile CPP file into object directory
  365. {}.cpp{$(O)}.obj:
  366. @echo ������������������������� Compiling $(@B).cpp �������������������������
  367. !ifdef DOS
  368. SET CL=$(CFLAGS) -Yuole2ui.h -Fp$(O)precomp.pch
  369. $(CC) -Fo$(O)$(@B) $(@B).cpp
  370. !else
  371. $(CC) $(CFLAGS) -Yuole2ui.h -Fp$(O)precomp.pch -D_FILE_=\"$(*B).cpp\" -Fo$(O)$(@B) $(@B).cpp
  372. !endif
  373. # ----------------------------------------------------------------------------
  374. # D E P E N D F I L E C R E A T I O N
  375. # ----------------------------------------------------------------------------
  376. UI_CFILE = $(UI_COBJS:.obj=.c) $(UI_DLLOBJS:.obj=.c)
  377. UI_NOPCFILE = $(UI_NOPCOBJS:.obj=.c)
  378. DEPEND: nul
  379. @echo Making a NEW dependancy file.
  380. mkdep -p $$(O) -s .obj $(UI_CFILE:D^\=) > tmp.tmp
  381. sed "s/:/: $$(PRECOMP)/g" < tmp.tmp > depend
  382. -del tmp.tmp
  383. mkdep -p $$(O)NOPC\ -s .obj $(UI_NOPCFILE:D^\=) >> depend
  384. mkdep -p $$(O) -s .pch precomp.c >> depend
  385. # ----------------------------------------------------------------------------
  386. # W E L C O M E B A N N E R
  387. # ----------------------------------------------------------------------------
  388. PRELUDE:
  389. @echo ������������������������ͻ
  390. @echo � Makefile for UILibrary �
  391. @echo ������������������������ͼ
  392. @echo $(MSG)
  393. !ifndef SRCTOK
  394. set INCLUDE=$(OLEINC_DIR);$(INCLUDE)
  395. set LIB=$(OLELIB_DIR);$(LIB)
  396. !endif
  397. # ----------------------------------------------------------------------------
  398. # G O A L T A R G E T S
  399. # ----------------------------------------------------------------------------
  400. !include "depend"
  401. CLEAN: CleanUp
  402. CleanUp:
  403. -echo y|del .\$(OBJ)\*.*
  404. -echo y|del .\$(OBJ)\NOPC\*.*
  405. -del $(LIBNAME).lib
  406. $(O)precomp.pch: precomp.c
  407. !ifdef DOS
  408. SET CL=$(CFLAGS) -Fp$(O)precomp.pch -Ycole2ui.h
  409. $(CC) -Fo$(O)$(@B) precomp.c
  410. !else
  411. $(CC) $(CFLAGS) -Fp$(O)precomp.pch -Ycole2ui.h -D_FILE_=\"precomp.c\" -Fo$(O)$(@B) precomp.c
  412. !endif
  413. #
  414. # Build .LIB static library
  415. #
  416. $(LIBNAME).lib: $(LIBOBJS) $(PRECOMPOBJ)
  417. -del $(O)$(LIBNAME).lib
  418. !ifdef WIN16
  419. lib @<<
  420. $(O)$(LIBNAME).lib
  421. y
  422. $(PRECOMPOBJ: = +) $(LIBOBJS: = +)
  423. <<
  424. !else
  425. $(LINK) @<<
  426. /OUT:$(O)$(LIBNAME).lib
  427. /MACHINE:i386
  428. $(PRECOMPOBJ: = ) $(LIBOBJS: = ) $(UILIBS)
  429. <<
  430. !endif
  431. copy $(O)$(LIBNAME).lib $(LIBNAME).lib
  432. # install built library and public header files to release directories
  433. install:
  434. copy $(LIBNAME).lib $(SAMPLIB_DIR)
  435. copy ole2ui.h $(SAMPINC_DIR)
  436. copy olestd.h $(SAMPINC_DIR)
  437. copy msgfiltr.h $(SAMPINC_DIR)
  438. copy enumfetc.h $(SAMPINC_DIR)
  439. # EOF ========================================================================
  440.