BkOffice.Mak 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731
  1. #----------------------------------------------------------------------------
  2. #
  3. # Description:
  4. # Make File Header for BackOffice Software Development Kit
  5. #
  6. # Copyright:
  7. # Copyright (C) Microsoft Corp. 1986-1999. All Rights Reserved.
  8. #
  9. #----------------------------------------------------------------------------
  10. !ifndef BASEMAKE_INCLUDED # Prevent multiple inclusions
  11. BASEMAKE_INCLUDED = 1
  12. #*********************************************
  13. #
  14. # Parameter Checking and Defaults
  15. #
  16. #*********************************************
  17. !ifndef Proj
  18. ! ERROR Component name (Proj) has not been defined.
  19. !endif
  20. !ifndef INCLUDE
  21. ! ERROR INCLUDE variable is empty; must include at least system include directory
  22. !endif
  23. !ifndef LIB
  24. ! ERROR LIB variable is empty; must include at least system lib directory
  25. !endif
  26. !if defined(clean)
  27. $(Proj): Clean
  28. !else
  29. $(Proj): All
  30. !endif
  31. !if defined(nodebug)
  32. BLDTYPE=Retail
  33. !endif
  34. !if "$(BLDTYPE)" == "Retail" | "$(BLDTYPE)" == "RETAIL" | "$(BLDTYPE)" == "retail" | "$(BLDTYPE)" == "RTL" | "$(BLDTYPE)" == "rtl"
  35. BLDTYPE1=Retail
  36. !else if "$(BLDTYPE)" == "Profile" | "$(BLDTYPE)" == "PROFILE" | "$(BLDTYPE)" == "profile"
  37. BLDTYPE1=Profile
  38. !else if "$(BLDTYPE)" == "Debug" | "$(BLDTYPE)" == "DEBUG" | "$(BLDTYPE)" == "debug" | "$(BLDTYPE)" == "DBG" | "$(BLDTYPE)" == "dbg"
  39. BLDTYPE1=Debug
  40. !else ifndef BLDTYPE
  41. BLDTYPE1=Debug
  42. !else
  43. ! ERROR BLDTYPE must be either Retail, Profile or Debug.
  44. !endif
  45. !if "$(BLDTYPE1)" == "Retail"
  46. nodebug=1
  47. !endif
  48. !ifndef PLATFORM
  49. PLATFORM=Win32
  50. !endif
  51. !ifndef CALL
  52. CALL=C
  53. !endif
  54. !ifndef PACK
  55. PACK=YES
  56. !endif
  57. # Default to logging to stdout.
  58. !ifndef LOG
  59. LOG=NO
  60. !endif
  61. !ifndef WARNING_LEVEL
  62. WARNING_LEVEL=3
  63. !endif
  64. !ifndef CPU
  65. CPU=i386
  66. !ifndef PROCESSOR_ARCHITECTURE
  67. #!ERROR CPU and PROCESSOR_ARCHITECTURE variables are empty; at least one must be defined
  68. !endif
  69. CPU=$(PROCESSOR_ARCHITECTURE)
  70. !if "$(CPU)"=="x86" | "$(CPU)"=="X86"
  71. CPU = i386
  72. !endif
  73. !endif
  74. !ifndef APPVER
  75. APPVER=5.0
  76. !endif
  77. !ifndef USE_EXCHANGE
  78. !include <Win32.Mak>
  79. !endif
  80. # Save build args for any recursive nmakes
  81. BLDARGS= BLDTYPE=$(BLDTYPE) PLATFORM=$(PLATFORM) LOG=$(LOG) CPU=$(CPU)
  82. #*********************************************
  83. #
  84. # Paths
  85. #
  86. #*********************************************
  87. !ifndef BKOFFICE
  88. !ifdef PROJROOT
  89. BKOFFICE=$(PROJROOT)\ # must add trailing backslash
  90. !else
  91. BKOFFICE=\BkOffice\ # assume a reasonable default
  92. !endif
  93. !endif
  94. !ifdef MAKEDIRS
  95. MkDest=
  96. !include $(MAKEDIRS)
  97. !else
  98. ResDir=.
  99. ObjDir=.\$(PLATFORM)\$(BLDTYPE1)
  100. IncDir=$(BKOFFICE)Include
  101. LibDir=$(BKOFFICE)Lib
  102. !if "$(APPVER)" == "5.01"
  103. INCLUDE=$(INCLUDE);$(ObjDir);$(IncDir);
  104. !ELSE
  105. INCLUDE=$(ObjDir);$(IncDir);$(INCLUDE);
  106. !ENDIF
  107. LIB=$(LibDir);$(LIB);
  108. # Win95 doesn't support "&" on command line
  109. MkDest=@for %d in ("$(PLATFORM)" "$(ObjDir)") do $(COMSPEC) /c if not exist %d md %d
  110. !endif
  111. #*********************************************
  112. #
  113. # Tools
  114. #
  115. #*********************************************
  116. # Check to see if Cole Porter is used
  117. !ifndef SUBSTITUTE_CC
  118. !ifdef COLE_64
  119. SUBSTITUTE_CC = Port64
  120. !endif
  121. !endif
  122. !ifndef CC_NAME
  123. !if "$(SUBSTITUTE_CC)" != ""
  124. CC_NAME = "$(SUBSTITUTE_CC)"
  125. LINK_NAME = Rem no Link under Cole
  126. !else
  127. CC_NAME = Cl
  128. LINK_NAME = Link
  129. !endif
  130. !endif
  131. MAKEEXE = NMake
  132. IMPLIB = Lib
  133. CC = $(CC_NAME)
  134. LIBU = Lib
  135. LINK = $(LINK_NAME)
  136. RC = Rc
  137. MC = Mc
  138. MIDL = Midl
  139. HC = Start /Wait Hcrtf
  140. #*********************************************
  141. #
  142. # Flags
  143. #
  144. #*********************************************
  145. # CL is for all C and C++ files
  146. # -WX Warnings as errors
  147. # -J char becomes unsigned char
  148. #
  149. CL=$(cflags) -c -w -J -Fo$@ /nologo $(CL)
  150. # LFLAGS is for all links
  151. LFLAGS=-NOLOGO /NODEFAULTLIB:LIBC -machine:$(CPU) -out:$@ -INCREMENTAL:NO $(LFLAGS)
  152. # DLLFLAGS is for linking DLLs
  153. DLLFLAGS=-DLL -map:"$(ObjDir)\$(@B).Map" $(DLLFLAGS)
  154. # LIBFLAGS is for making libraries
  155. LIBFLAGS=-NOLOGO -MACHINE:$(CPU) -out:"$@" $(LIBFLAGS)
  156. # RFLAGS is for Windows resources
  157. RFLAGS= -I$(ResDir) -fo$@ -DWIN32 $(noansi) -r -D_WIN32 $(RFLAGS)
  158. # MFLAGS is for the message compiler
  159. MFLAGS=-v -c -s -h "$(ObjDir)" -r "$(ObjDir)" -x "$(ObjDir)" $(MFLAGS)
  160. # MRFLAGS is for the resource compiler when used after the message compiler
  161. MRFLAGS=-l 409 -r -x -i"$(ObjDir)" $(MRFLAGS)
  162. # HFLAGS is for the help compiler
  163. HFLAGS=-xn
  164. #---------------------------------------------
  165. # Calling convention Flag
  166. #---------------------------------------------
  167. !if "$(CALL)"=="PASCAL"
  168. CL=-Gc $(CL)
  169. !endif
  170. #---------------------------------------------
  171. # Function Packaging Flag
  172. #---------------------------------------------
  173. !if "$(PACK)" == "YES"
  174. CL=-Gy $(CL)
  175. cDefines=-Gy $(cDefines)
  176. !endif
  177. #---------------------------------------------
  178. # Output Redirection
  179. #---------------------------------------------
  180. !if "$(LOG)" == "NO"
  181. LogCmd=
  182. !else
  183. LogCmd= >> "$(ObjDir)\$(Proj).Out"
  184. !endif
  185. #---------------------------------------------
  186. # select specific library based on target type
  187. #---------------------------------------------
  188. !if "$(BLDTYPE1)"=="Retail"
  189. DbgLibFlag =
  190. !else
  191. DbgLibFlag = d
  192. !endif
  193. !if defined(unicode)
  194. UnicodeLibFlag = u
  195. !else
  196. UnicodeLibFlag =
  197. !endif
  198. #---------------------------------------------
  199. # Optimization Flags
  200. #---------------------------------------------
  201. !if "$(BLDTYPE1)" == "Retail"
  202. CL=-O2 $(CL)
  203. !else if "$(BLDTYPE1)" == "Profile"
  204. CL=-Od -Z7 -Gh $(CL)
  205. !else
  206. CL=-Od -Z7 $(CL)
  207. !endif
  208. #---------------------------------------------
  209. # PLATFORM specific Flags
  210. #---------------------------------------------
  211. !if "$(CPU)" == "I386"
  212. CL = $(CL) -D_X86_=1
  213. scall = -Gz
  214. lflags = $(lflags) -align:0x1000
  215. !endif
  216. !if "$(CPU)" == "ALPHA"
  217. CL = $(CL) -D_ALPHA_=1
  218. scall =
  219. !endif
  220. #---------------------------------------------
  221. # Windows version
  222. #---------------------------------------------
  223. !if "$(APPVER)" == "4.0"
  224. CL = $(CL) -DWINVER=0x0400
  225. rflags=$(rflags) -DWINVER=0x0400
  226. !endif
  227. #---------------------------------------------
  228. # Additional MFC Flags
  229. #---------------------------------------------
  230. !ifdef Use_MFC
  231. CL= $(CL) /GX /DSTRICT /DWIN32 /D_WINDOWS /D_MBCS /D_WINDLL
  232. CL= $(CL) /D_USRDLL -D_AFX_NO_BSTR_SUPPORT /D_AFXDLL
  233. RFLAGS = $(RFLAGS) /DSTRICT /DWIN32 /D_WINDOWS /D_MBCS /D_WINDLL /D_USRDLL -D_AFX_NO_BSTR_SUPPORT /D_AFXDLL
  234. !if "$(BLDTYPE1)"=="Debug"
  235. CL= $(CL) /D_DEBUG
  236. RFLAGS = $(RFLAGS) /D_DEBUG
  237. !endif # BLDTYPE == Debug
  238. !ifdef crtdll # Use DLL CRT? (which is multithreaded)
  239. crtflags = -MD$(DbgLibFlag) $(crtflags)
  240. !elseif defined(crtst) && !defined(crtflags) # use Single Threaded CRT?
  241. crtflags = -ML$(DbgLibFlag) $(crtflags)
  242. !elseif defined(crtmt) # use Multithreaded CRT?
  243. crtflags = -MT$(DbgLibFlag) $(crtflags)
  244. !else # default to crtdll
  245. crtflags = -MD$(DbgLibFlag) $(crtflags)
  246. !endif # ifdef crtdll/else crtst/crtmt/else
  247. !endif
  248. #---------------------------------------------
  249. # Build Type Flags (Retail/Debug)
  250. #---------------------------------------------
  251. !if "$(BLDTYPE1)"=="Retail"
  252. CL=-DSHIP $(CL)
  253. LFLAGS = $(LFLAGS) -RELEASE
  254. !else if "$(BLDTYPE1)"=="Profile"
  255. CL=-DDEBUG -DTEST -DPROFILE $(CL)
  256. LFLAGS = $(LFLAGS) -DEBUG:mapped,partial -DEBUGTYPE:coff -PROFILE
  257. libs = $(libs) CAP.Lib
  258. !else
  259. CL=-DDEBUG -DTEST $(CL)
  260. LFLAGS = $(LFLAGS) -debug:full -debugtype:cv
  261. !endif
  262. #---------------------------------------------
  263. # Determine CRT Flags
  264. #---------------------------------------------
  265. !ifdef crtdll # Use DLL CRT? (which is multithreaded)
  266. crtflags = -MD$(DbgLibFlag) $(crtflags)
  267. !elseif defined(crtst) && !defined(crtflags) # use Single Threaded CRT?
  268. crtflags = -ML$(DbgLibFlag) $(crtflags)
  269. !elseif defined(crtmt) # use Multithreaded CRT?
  270. crtflags = -MT$(DbgLibFlag) $(crtflags)
  271. !else # default to crtdll
  272. crtflags = -MD$(DbgLibFlag) $(crtflags)
  273. !endif # ifdef crtdll/else crtst/crtmt/else
  274. #---------------------------------------------
  275. # Determine app type Flags (console, gui, or DLL)
  276. #---------------------------------------------
  277. !if defined(unicode)
  278. crtflags=-D UNICODE -D _UNICODE $(crtflags)
  279. !endif #unicode
  280. !if defined(console) # console app
  281. !if !defined(unicode)
  282. linkflags=$(linkflags) -subsystem:console -entry:mainCRTStartup
  283. !else
  284. linkflags=$(linkflags) -subsystem:console -entry:wmainCRTStartup
  285. !endif #unicode
  286. !elseif !defined(dll) # not a dll, default to gui app
  287. !if !defined(unicode)
  288. linkflags=$(linkflags) -subsystem:windows -entry:WinMainCRTStartup
  289. !else
  290. linkflags=$(linkflags) -subsystem:windows -entry:wWinMainCRTStartup
  291. !endif #unicode
  292. !endif # ifdef console/else
  293. #*********************************************
  294. #
  295. # Libraries
  296. #
  297. #*********************************************
  298. #---------------------------------------------
  299. # Back Office SDK specific
  300. #---------------------------------------------
  301. !ifdef USE_SNA
  302. libs=$(libs) fmistr32.Lib ihvLink.Lib snacli.Lib wappc32.Lib wcpic32.Lib
  303. libs=$(libs) wincsv32.Lib winrui32.Lib winsli32.Lib
  304. !endif # USE_SNA
  305. !ifdef USE_SQL
  306. libs=$(libs) ntwdbLib.Lib
  307. !endif # USE_SQL
  308. !ifdef USE_ODS
  309. libs=$(libs) opends60.Lib
  310. !endif # USE_ODS
  311. !ifdef USE_DTC
  312. libs=$(libs) XOleHlp.Lib
  313. !endif # USE_ODS
  314. !ifdef USE_ODBC
  315. libs=$(libs) odbc32.Lib odbccp32.Lib
  316. !endif # USE_ODS
  317. !if defined(USE_MSM) || defined(USE_SMS)
  318. libs=$(libs) smsapi.Lib objectty.Lib
  319. !endif # USE_MSM || USE_SMS
  320. !ifdef USE_NETMON
  321. libs=$(libs) bhmon.Lib bhsupp.Lib filter.Lib friendly.Lib
  322. libs=$(libs) hexedit.Lib nal.Lib nmapi.Lib
  323. libs=$(libs) parser.Lib slbs.Lib toolbar.Lib
  324. !endif # USE_NETMON
  325. !ifdef USE_EXCHANGE
  326. ! ifndef Building_ExchSDK
  327. libs="ExchSDK$(DbgLibFlag).Lib" $(libs)
  328. ! endif # Building_ExchSDK
  329. # Note: when using MFC for Exchange Admin
  330. # extension dlls they must be statically linked to MFC.
  331. libs=$(libs) Mapi32.Lib Uuid.Lib
  332. !if "$(WARNING_LEVEL)" != "4"
  333. CL= $(CL) -WX
  334. !endif
  335. DLLFLAGS = $(DLLFLAGS) -def:$(@B).def
  336. !endif # USE_EXCHANGE
  337. #---------------------------------------------
  338. # Determine CRT Libraries
  339. #---------------------------------------------
  340. libc = libc$(DbgLibFlag).Lib oldnames.Lib
  341. libcmt = libcmt$(DbgLibFlag).Lib oldnames.Lib
  342. libcdll = msvcrt$(DbgLibFlag).Lib oldnames.Lib
  343. !ifdef crtdll # Use DLL CRT?
  344. libcrt=$(libcdll)
  345. !elseif defined(crtst) && !defined(crtflags) # use Single Threaded CRT?
  346. libcrt=$(libc)
  347. !elseif defined(crtmt) # use Multithreaded CRT?
  348. libcrt=$(libcmt)
  349. !else # default to crtdll
  350. libcrt=$(libcdll)
  351. !endif # endif crtdll/else crtst/crtmt/else
  352. #---------------------------------------------
  353. # Determine app type libraries (console, gui, or DLL)
  354. #---------------------------------------------
  355. !ifdef dll # is this a DLL?
  356. linklibs=$(libs) kernel32.Lib advapi32.Lib user32.Lib gdi32.Lib comctl32.Lib comdlg32.Lib ole32.Lib winspool.Lib version.Lib
  357. !elseif defined(console) # not a DLL, perhaps a console app
  358. linklibs=$(libs) kernel32.Lib advapi32.Lib user32.Lib ole32.Lib version.Lib
  359. !else # default to gui app
  360. linklibs=$(libs) kernel32.Lib $(optlibs) advapi32.Lib user32.Lib gdi32.Lib comdlg32.Lib ole32.Lib winspool.Lib version.Lib
  361. !endif # ifdef dll/else console/else
  362. #LinkLibs = $(LibList) $(linklibs) $(libcrt)
  363. # do not specify CRT libs if using MFC, let MFC fix this up in the default libs
  364. !ifdef Use_MFC
  365. LinkLibs = $(LibList) $(linklibs)
  366. !else
  367. LinkLibs = $(LibList) $(linklibs) $(libcrt)
  368. !endif
  369. #if necessary, force MSVCRT to be included in lib list
  370. !ifdef Use_MSCRT
  371. LinkLibs = $(LinkLibs) $(libcrt)
  372. !endif
  373. !if "$(BLDTYPE1)" == "Profile"
  374. LinkLibs = $(LinkLibs) cap.Lib
  375. !endif
  376. #---------------------------------------------
  377. # Additional MFC Libraries
  378. #---------------------------------------------
  379. # Note that linking order is important when using MFC!
  380. !ifdef Use_MFC
  381. !if !defined(nodebug)
  382. linklibs = mfco42$(UnicodeLibFlag)$(DbgLibFlag).Lib $(linklibs)
  383. !endif
  384. linklibs = mfcs42$(UnicodeLibFlag)$(DbgLibFlag).Lib mfc42$(UnicodeLibFlag)$(DbgLibFlag).Lib $(linklibs)
  385. !endif
  386. #*********************************************
  387. #
  388. # Inference Rules
  389. #
  390. #*********************************************
  391. .SUFFIXES: .c .Cpp .Cxx .Obj .Def .Lib .Dll .Exe .Idl .h .Mc .Rc .Res .Exp .Bin .Hpj .Ini .Pdb .Trg .Ocx .Tlb .Res .Srl .Odl
  392. # C Targets
  393. .c{$(ObjDir)\}.Obj:
  394. $(MkDest)
  395. !if "$(LOG)"=="YES"
  396. @echo $(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
  397. !endif
  398. $(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
  399. # C++ Targets
  400. .cpp{$(ObjDir)\}.Obj:
  401. $(MkDest)
  402. !if "$(LOG)"=="YES"
  403. @echo $(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
  404. !endif
  405. $(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
  406. # C++ Targets
  407. .cxx{$(ObjDir)\}.obj:
  408. $(MkDest)
  409. !if "$(LOG)"=="YES"
  410. @echo $(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
  411. !endif
  412. $(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
  413. # Resource Targets from .RC files
  414. {$(ResDir)\}.Rc{$(ObjDir)\}.Res:
  415. $(MkDest)
  416. !if "$(LOG)"=="YES"
  417. @echo $(RC) $(RFLAGS) $(ResDir)\$(@B).rc $(LogCmd)
  418. !endif
  419. $(RC) $(RFLAGS) $(ResDir)\$(@B).rc $(LogCmd)
  420. # Resource Targets from .MC files
  421. .Mc{$(ObjDir)\}.Res:
  422. $(MkDest)
  423. !if "$(LOG)"=="YES"
  424. @echo $(MC) $(MFLAGS) $< $(LogCmd)
  425. !endif
  426. $(MC) $(MFLAGS) $< $(LogCmd)
  427. !if "$(LOG)"=="YES"
  428. @echo $(RC) $(MRFLAGS) -fo$@ "$(ObjDir)\$(@B).rc" $(LogCmd)
  429. !endif
  430. $(RC) $(MRFLAGS) -fo$@ "$(ObjDir)\$(@B).rc" $(LogCmd)
  431. # Import Libraries
  432. .Def{$(ObjDir)\}.Lib:
  433. !if "$(LOG)"=="YES"
  434. @echo $(IMPLIB) -NOLOGO -MACHINE:$(CPU) -DEF:$(@B).DEF -OUT:$@ $(LogCmd)
  435. !endif
  436. $(IMPLIB) -NOLOGO -MACHINE:$(CPU) -DEF:$(@B).DEF -OUT:$@ $(LogCmd)
  437. set copycmd=/Y
  438. xcopy "$@" "$(LibDir)\" $(LogCmd)
  439. .Def{$(ObjDir)\}.Exp:
  440. !if "$(LOG)"=="YES"
  441. @echo $(IMPLIB) -NOLOGO -MACHINE:$(CPU) -DEF:$(@B).DEF -OUT:"$(@R).Lib" $(LogCmd)
  442. !endif
  443. $(IMPLIB) -NOLOGO -MACHINE:$(CPU) -DEF:$(@B).DEF -OUT:"$(@R).Lib" $(LogCmd)
  444. # Static Libraries
  445. {$(ObjDir)\}.Obj{$(ObjDir)\}.Lib:
  446. !if "$(LOG)"=="YES"
  447. @echo $(LIBU) $(LIBFLAGS) $** $(LogCmd)
  448. !endif
  449. $(LIBU) $(LIBFLAGS) $** $(LogCmd)
  450. !ifdef USE_EXCHANGE
  451. !if "$(LOG)"=="YES"
  452. @echo xcopy "$(@R).Lib" "$(LibDir)" $(LogCmd)
  453. !endif
  454. set copycmd=/Y
  455. -xcopy "$(@R).Lib" "$(LibDir)\" $(LogCmd)
  456. !endif # USE_EXCHANGE
  457. # DLLs
  458. {$(ObjDir)\}.Obj{$(ObjDir)\}.Dll:
  459. @echo $** > "$(ObjDir)\objfiles.lst"
  460. @echo $(LinkLibs) > "$(ObjDir)\libfiles.lst"
  461. !if "$(LOG)"=="YES"
  462. @echo $(LINK) $(LFLAGS) $(DLLFLAGS) $(linkflags) "@$(ObjDir)\objfiles.lst" "@$(ObjDir)\libfiles.lst" $(LogCmd)
  463. !endif
  464. $(LINK) $(LFLAGS) $(DLLFLAGS) $(linkflags) "@$(ObjDir)\objfiles.lst" "@$(ObjDir)\libfiles.lst" $(LogCmd)
  465. !ifdef USE_EXCHANGE
  466. !if "$(LOG)"=="YES"
  467. @echo xcopy "$(@R).Lib" "$(LibDir)" $(LogCmd)
  468. !endif
  469. set copycmd=/Y
  470. -xcopy "$(@R).Lib" "$(LibDir)\" $(LogCmd)
  471. !endif # USE_EXCHANGE
  472. # OCXs
  473. {$(ObjDir)\}.obj{$(ObjDir)\}.Ocx:
  474. @echo $** > "$(ObjDir)\objfiles.lst"
  475. @echo $(LinkLibs) > "$(ObjDir)\libfiles.lst"
  476. !if "$(LOG)"=="YES"
  477. @echo $(LINK) $(LFLAGS) $(DLLFLAGS) $(linkflags) "@$(ObjDir)\objfiles.lst" "@$(ObjDir)\libfiles.lst" $(LogCmd)
  478. !endif
  479. $(LINK) $(LFLAGS) $(DLLFLAGS) $(linkflags) "@$(ObjDir)\objfiles.lst" "@$(ObjDir)\libfiles.lst" $(LogCmd)
  480. !ifdef USE_EXCHANGE
  481. !if "$(LOG)"=="YES"
  482. @echo xcopy "$(@R).Lib" "$(LibDir)" $(LogCmd)
  483. !endif
  484. set copycmd=/Y
  485. -xcopy "$(@R).Lib" "$(LibDir)\" $(LogCmd)
  486. !endif # USE_EXCHANGE
  487. # BINs
  488. {$(ObjDir)\}.Obj{$(ObjDir)\}.Bin:
  489. @echo $(LinkLibs) > "$(ObjDir)\libfiles.lst"
  490. !if "$(LOG)"=="YES"
  491. @echo $(LINK) $(LFLAGS) $(linkflags) $** "@$(ObjDir)\libfiles.lst" $(LogCmd)
  492. !endif
  493. $(LINK) $(LFLAGS) $(linkflags) $** "@$(ObjDir)\libfiles.lst" $(LogCmd)
  494. # EXEs
  495. {$(ObjDir)\}.Obj{$(ObjDir)\}.Exe:
  496. @echo $** > "$(ObjDir)\objfiles.lst"
  497. @echo $(LinkLibs) > "$(ObjDir)\libfiles.lst"
  498. !if "$(LOG)"=="YES"
  499. @echo $(LINK) $(LFLAGS) $(linkflags) "@$(ObjDir)\objfiles.lst" "@$(ObjDir)\libfiles.lst" $(LogCmd)
  500. !endif
  501. $(LINK) $(LFLAGS) $(linkflags) "@$(ObjDir)\objfiles.lst" "@$(ObjDir)\libfiles.lst" $(LogCmd)
  502. # Helpfiles
  503. .Hpj{$(ObjDir)\}.Hlp:
  504. $(MkDest)
  505. !if "$(LOG)"=="YES"
  506. @echo $(HC) $(HFLAGS) $(@B).Hpj
  507. !endif
  508. $(HC) $(HFLAGS) $(@B).Hpj
  509. !if "$(LOG)"=="YES"
  510. @echo xcopy "$(@F)" "$(ObjDir)"
  511. !endif
  512. set copycmd=/Y
  513. -xcopy "$(@F)" "$(ObjDir)" $(LogCmd)
  514. # TRGs
  515. {$(ObjDir)\}.Exe{$(ObjDir)\}.Trg:
  516. $(MkDest)
  517. !if "$(LOG)"=="YES"
  518. @echo $? /RegServer "$(ObjDir)\regsvr32.Trg" $(LogCmd)
  519. !endif
  520. @-$? /RegServer $(LogCmd)
  521. echo regsvr32 exec. time > "$(ObjDir)\regsvr32.Trg" $(LogCmd)
  522. {$(ObjDir)\}.Dll{$(ObjDir)\}.Trg:
  523. $(MkDest)
  524. !if "$(LOG)"=="YES"
  525. @echo regsvr32 /s $? regsvr32.trg
  526. !endif
  527. @-regsvr32 /s $? $(LogCmd)
  528. echo regsvr32 exec. time > "$(ObjDir)\regsvr32.Trg"
  529. # .Hs
  530. .Idl{$(ObjDir)\}.H:
  531. $(MkDest)
  532. !if "$(LOG)"=="YES"
  533. @echo $(MIDL) /Oicf /out "$(ObjDir)" $** $(LogCmd)
  534. !endif
  535. $(MIDL) /Oicf /out "$(ObjDir)" $** $(LogCmd)
  536. # .Tlbs
  537. .Odl{$(ObjDir)\}.Tlb:
  538. $(MkDest)
  539. !if "$(LOG)"=="YES"
  540. @echo $(MIDL) /nologo /out "$(ObjDir)" $** $(LogCmd)
  541. !endif
  542. $(MIDL) /nologo /out "$(ObjDir)" $** $(LogCmd)
  543. #*********************************************
  544. #
  545. # Make Targets
  546. #
  547. #*********************************************
  548. #---------------------------------------------
  549. # List Output Files
  550. #---------------------------------------------
  551. ListDir:
  552. dir "$(ObjDir)"
  553. #---------------------------------------------
  554. # Display Output Listing File
  555. #---------------------------------------------
  556. !ifndef ERRVIEW
  557. ERRVIEW=start notepad.Exe
  558. !endif
  559. ListOut:
  560. $(ERRVIEW) "$(ObjDir)\$(Proj).out"
  561. #---------------------------------------------
  562. # Delete Output Listing File
  563. #---------------------------------------------
  564. DelOut:
  565. del "$(ObjDir)\$(Proj).out"
  566. #---------------------------------------------
  567. # Clean Output Directories
  568. #---------------------------------------------
  569. clean:
  570. $(MkDest)
  571. !if "$(OS)" == "Windows_NT"
  572. -del /q "$(ObjDir)\*.Obj" \
  573. "$(ObjDir)\*.out" \
  574. "$(ObjDir)\*.h" \
  575. "$(ObjDir)\*.dbg" \
  576. "$(ObjDir)\*.Lib" \
  577. "$(ObjDir)\*.Exe" \
  578. "$(ObjDir)\*.Dll" \
  579. "$(ObjDir)\*.Map" \
  580. "$(ObjDir)\*.Res" \
  581. "$(ObjDir)\*.rc" \
  582. "$(ObjDir)\*.bin" \
  583. "$(ObjDir)\*.lst" \
  584. "$(ObjDir)\*.blt" \
  585. "$(ObjDir)\*.hlp" \
  586. "$(ObjDir)\*.trg" \
  587. "$(ObjDir)\*.srl" \
  588. "$(ObjDir)\*.ini" \
  589. "$(ObjDir)\*.tlb" \
  590. "$(ObjDir)\*.pdb" \
  591. "$(ObjDir)\*.exp" >NUL 2>NUL
  592. !else # Win95 doesn't support "2>" on command line, multiple files on a Del command, or /q
  593. -erase "$(ObjDir)\*.Obj" >NUL
  594. -erase "$(ObjDir)\*.out" >NUL
  595. -erase "$(ObjDir)\*.h" >NUL
  596. -erase "$(ObjDir)\*.dbg" >NUL
  597. -erase "$(ObjDir)\*.Lib" >NUL
  598. -erase "$(ObjDir)\*.Exe" >NUL
  599. -erase "$(ObjDir)\*.Dll" >NUL
  600. -erase "$(ObjDir)\*.Map" >NUL
  601. -erase "$(ObjDir)\*.Res" >NUL
  602. -erase "$(ObjDir)\*.rc" >NUL
  603. -erase "$(ObjDir)\*.bin" >NUL
  604. -erase "$(ObjDir)\*.lst" >NUL
  605. -erase "$(ObjDir)\*.blt" >NUL
  606. -erase "$(ObjDir)\*.hlp" >NUL
  607. -erase "$(ObjDir)\*.trg" >NUL
  608. -erase "$(ObjDir)\*.srl" >NUL
  609. -erase "$(ObjDir)\*.ini" >NUL
  610. -erase "$(ObjDir)\*.pdb" >NUL
  611. -erase "$(ObjDir)\*.exp" >NUL
  612. -erase "$(ObjDir)\*.tlb" >NUL
  613. -erase "$(ObjDir)\*.c" >NUL
  614. -erase "$(ObjDir)\*.trg" >NUL
  615. !endif # OS == Windows_NT
  616. !endif # BASEMAKE_INCLUDED