home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / inetsdk.mak < prev    next >
Text File  |  1998-04-24  |  21KB  |  731 lines

  1. #----------------------------------------------------------------------------
  2. #
  3. # Description:
  4. #   Make File Header for Internet Software Development Kit
  5. #   Based in large part on BkOffice.Mak from the BackOffice SDK
  6. #
  7. # Copyright:
  8. #   Copyright (C) Microsoft Corp. 1995-1997.  All Rights Reserved.
  9. #
  10. #----------------------------------------------------------------------------
  11.  
  12. !ifndef _INETSDK_MAK_       # Prevent multiple inclusions
  13. _INETSDK_MAK_ = 1
  14.  
  15. #*********************************************
  16. #
  17. # Parameter Checking and Defaults
  18. #
  19. #*********************************************
  20. !ifndef Proj
  21. !     ERROR Component name (Proj) has not been defined.
  22. !endif
  23.  
  24. !ifndef INCLUDE
  25. !   ERROR INCLUDE variable is empty; must include at least system include directory
  26. !endif
  27.  
  28. !ifndef LIB
  29. !   ERROR LIB variable is empty; must include at least system lib directory
  30. !endif
  31.  
  32. !ifdef USE_ISAPI
  33.  
  34. !ifndef WWWSCRIPTS
  35. !   MESSAGE WWWSCRIPTS environment variable is empty; defaulting to .
  36. WWWSCRIPTS = .
  37. !endif
  38.  
  39. !ifndef WWWROOT
  40. !   MESSAGE WWWROOT environment variable is empty; defaulting to .
  41. WWWROOT = .
  42. !endif
  43.  
  44. !endif # USE_ISAPI
  45.  
  46. !if defined(clean)
  47. $(Proj): Clean
  48. !else
  49. $(Proj): All
  50. !endif
  51.  
  52. !if defined(nodebug)
  53. BLDTYPE=Retail
  54. !endif
  55.  
  56. !if "$(BLDTYPE)" == "Retail" | "$(BLDTYPE)" == "RETAIL" | "$(BLDTYPE)" == "retail" | "$(BLDTYPE)" == "RTL" | "$(BLDTYPE)" == "rtl"
  57. BLDTYPE=Retail
  58. !else if "$(BLDTYPE)" == "Profile" | "$(BLDTYPE)" == "PROFILE" | "$(BLDTYPE)" == "profile"
  59. BLDTYPE=Profile
  60. !else if "$(BLDTYPE)" == "Debug" | "$(BLDTYPE)" == "DEBUG" | "$(BLDTYPE)" == "debug" | "$(BLDTYPE)" == "DBG" | "$(BLDTYPE)" == "dbg"
  61. BLDTYPE=Debug
  62. !else ifndef BLDTYPE
  63. BLDTYPE=Debug
  64. !else
  65. !   ERROR BLDTYPE must be either Retail, Profile or Debug.
  66. !endif   
  67.  
  68. !if "$(BLDTYPE)" == "Retail"
  69. nodebug=1
  70. !endif
  71.  
  72. !ifndef CALL
  73. CALL=C
  74. !endif
  75.  
  76. !ifndef PACK
  77. PACK=YES
  78. !endif
  79.  
  80. !ifndef LOG
  81. LOG=NO
  82. !endif
  83.  
  84. !ifndef WARNING_LEVEL
  85. WARNING_LEVEL=3
  86. !endif
  87.  
  88. !ifndef PROCESSOR_ARCHITECTURE
  89. PROCESSOR_ARCHITECTURE = x86
  90. !endif # default to x86
  91.  
  92. !ifndef CPU
  93. CPU=$(PROCESSOR_ARCHITECTURE)
  94. !if "$(CPU)"=="x86" | "$(CPU)"=="X86"
  95. CPU = i386
  96. !endif
  97. !endif
  98.  
  99. !ifndef APPVER
  100. APPVER=4.0
  101. !endif
  102.  
  103. !ifndef USE_EXCHANGE
  104. !include <win32.mak>
  105. !endif
  106.  
  107. # Save build args for any recursive nmakes 
  108. BLDARGS= BLDTYPE=$(BLDTYPE) LOG=$(LOG) CPU=$(CPU)
  109.  
  110. #*********************************************
  111. #
  112. # Paths
  113. #
  114. #*********************************************
  115.  
  116. !ifndef BKOFFICE
  117. !ifdef PROJROOT
  118. BKOFFICE=$(PROJROOT)\        # must add trailing backslash
  119. !else
  120. BKOFFICE=\BkOffice\          # assume a reasonable default
  121. !endif
  122. !endif
  123.  
  124. !ifdef MAKEDIRS
  125. MkDest=
  126. !include $(MAKEDIRS)
  127. !else
  128. ResDir=.
  129. ObjDir=$(BLDTYPE)
  130. IncDir=$(BKOFFICE)Include
  131. LibDir=$(BKOFFICE)Lib
  132.  
  133. INCLUDE=$(ObjDir);$(IncDir);$(INCLUDE);
  134. LIB=$(LibDir);$(LIB);
  135.  
  136. # Win95 doesn't support "&" on command line
  137. MkDest=@if not exist $(ObjDir) md $(ObjDir)
  138.  
  139. MkWWWDest=@for %d in ($(WWWROOT)\SDK $(WWWROOT)\SDK\$(Proj) $(WWWSCRIPTS)\SDK) do @$(COMSPEC) /c if not exist %d md %d
  140.  
  141. !endif
  142.  
  143. # ObjList is used for making .Libs from .Defs, and as a convenience in other places.
  144.  
  145. !ifndef ObjList
  146. ObjList=$(ObjDir)\$(@B).OBJ
  147. !endif
  148.  
  149. #*********************************************
  150. #
  151. # Tools
  152. #
  153. #*********************************************
  154.  
  155. MAKEEXE = nmake
  156. IMPLIB  = lib
  157. CC      = cl
  158. LIBU    = lib
  159. LINK    = link
  160. RC      = rc
  161. MC      = mc
  162. HC      = start /wait hcrtf
  163.  
  164.  
  165. #*********************************************
  166. #
  167. # Flags
  168. #
  169. #*********************************************
  170.  
  171. # CL is for all C and C++ files
  172. #   -WX     Warnings as errors
  173. #   -J      char becomes unsigned char
  174. #   
  175. CL=$(cflags) -c -W$(WARNING_LEVEL) -J -Fo$@ /nologo $(CL)
  176.  
  177. # LFLAGS is for all links
  178. LFLAGS=-nologo -nodefaultlib -machine:$(CPU) -out:$@ -incremental:no -pdb:none $(LFLAGS)
  179.  
  180. # DLLFLAGS is for linking DLLs
  181. DLLFLAGS=-dll -map:$(ObjDir)\$(@B).map $(DLLFLAGS)
  182.  
  183. # LIBFLAGS is for making libraries
  184. LIBFLAGS=-nologo -machine:$(CPU) -out:$@ $(LIBFLAGS)
  185.  
  186. # RFLAGS is for Windows resources
  187. RFLAGS= -I$(ResDir) -fo$@ -DWIN32 $(noansi) -r -D_WIN32 $(RFLAGS) 
  188.  
  189. # MFLAGS is for the message compiler
  190. MFLAGS=-v -c -s -h $(ObjDir) -r $(ObjDir) -x $(ObjDir) $(MFLAGS)
  191.  
  192. # MRFLAGS is for the resource compiler when used after the message compiler
  193. MRFLAGS=-l 409 -r -x -i$(ObjDir) $(MRFLAGS)
  194.  
  195. # HFLAGS is for the help compiler 
  196. HFLAGS=-xn
  197.  
  198. #---------------------------------------------
  199. # Calling convention Flag
  200. #---------------------------------------------
  201.  
  202. !if "$(CALL)"=="PASCAL"
  203. CL=-Gc $(CL)
  204. !endif
  205.  
  206. #---------------------------------------------
  207. # Function Packaging Flag
  208. #---------------------------------------------
  209.  
  210. !if "$(PACK)" == "YES"
  211. CL=-Gy $(CL)
  212. cDefines=-Gy $(cDefines)
  213. !endif
  214.  
  215. #---------------------------------------------
  216. # Output Redirection
  217. #---------------------------------------------
  218. !if "$(LOG)" == "NO"
  219. LogCmd=
  220. !else
  221. LogCmd= >> $(ObjDir)\$(Proj).Out
  222. !endif 
  223.  
  224. #---------------------------------------------
  225. # Optimization Flags
  226. #---------------------------------------------
  227. !if "$(BLDTYPE)" == "Retail"
  228. CL=-O2 $(CL)
  229. !else if "$(BLDTYPE)" == "Profile"
  230. CL=-Od -Z7 -Gh $(CL)
  231. !else
  232. CL=-Od -Z7 $(CL)
  233. !endif
  234.  
  235. #---------------------------------------------
  236. # CPU specific Flags
  237. #---------------------------------------------
  238. !if "$(CPU)" == "I386"
  239. CL = $(CL) -D_X86_=1
  240. scall  = -Gz
  241. lflags   = $(lflags) -align:0x1000
  242. !endif
  243.  
  244. !if "$(CPU)" == "MIPS"
  245. CL = $(CL) -D_MIPS_=1
  246. scall  =
  247. !endif
  248.  
  249. !if "$(CPU)" == "PPC"
  250. CL = $(CL) -D_PPC_=1
  251. scall  =
  252. lflags   = $(lflags) -ignore:4078
  253. !endif
  254.  
  255. !if "$(CPU)" == "ALPHA"
  256. CL = $(CL) -D_ALPHA_=1
  257. scall  =
  258. !endif
  259.  
  260. #---------------------------------------------
  261. # Windows version
  262. #---------------------------------------------
  263. !if "$(APPVER)" == "4.0"
  264. CL = $(CL) -DWINVER=0x0400
  265. rflags=$(rflags) -DWINVER=0x0400
  266. !endif
  267.  
  268. #---------------------------------------------
  269. # Additional MFC Flags
  270. #---------------------------------------------
  271.  
  272. !ifdef Use_MFC
  273. CL= $(CL) /GX /DSTRICT /DWIN32 /D_WINDOWS /D_MBCS /D_WINDLL 
  274. CL= $(CL) /D_USRDLL -D_AFX_NO_BSTR_SUPPORT /D_AFXDLL
  275.  
  276. RFLAGS = $(RFLAGS) /DSTRICT /DWIN32 /D_WINDOWS /D_MBCS /D_WINDLL /D_USRDLL -D_AFX_NO_BSTR_SUPPORT /D_AFXDLL
  277.  
  278. !if "$(BLDTYPE)"=="Debug"
  279. CL= $(CL) /D_DEBUG
  280. RFLAGS = $(RFLAGS) /D_DEBUG
  281. !endif # BLDTYPE == Debug
  282.  
  283. !ifdef crtdll                                 # Use DLL CRT? (which is multithreaded)
  284. crtflags = -MD$(DbgLibFlag) $(crtflags)
  285. !elseif defined(crtst) && !defined(crtflags)  # use Single Threaded CRT?
  286. crtflags = -ML$(DbgLibFlag) $(crtflags)
  287. !elseif defined(crtmt)                        # use Multithreaded CRT?
  288. crtflags = -MT$(DbgLibFlag) $(crtflags)
  289. !else                                         # default to crtdll
  290. crtflags = -MD$(DbgLibFlag) $(crtflags)
  291. !endif                                        # ifdef crtdll/else crtst/crtmt/else
  292.  
  293. !endif # Use_MFC
  294.  
  295. #---------------------------------------------
  296. # BaseCtl Framework Flags
  297. #---------------------------------------------
  298. !ifdef USE_BASECTL
  299.  
  300. # flags to support the BaseCtl framework.  Only DLLs are supported.
  301.  
  302. dll = 1
  303.  
  304. # These are "extra" libs beyond the standard set that BaseCtl controls need
  305.  
  306. libs= urlmon.lib wininet.lib shell32.lib oleaut32.lib
  307.  
  308.  
  309.  
  310. !ifdef nodebug
  311. libs = $(libs) CtlFwR32.Lib
  312. !else
  313. libs = $(libs) CtlFwD32.Lib
  314. !endif
  315.  
  316. # Commands to be added to the compile line... in this case to locate headers and to
  317. # override the warning level on certain behaviors that VC++ 4.1 started flagging as
  318. # warnings that causes warnigns in system headers.
  319.  
  320. cDefines= -I$(INETSDK)\Samples\COM\ActiveXControl\BaseCtl\Include -I..\include -I..\BaseCtl\Include $(cDefines) -FI VC41Warn.h
  321. RFLAGS= -I$(INETSDK)\Samples\COM\ActiveXControl\BaseCtl\Include -I..\include -I..\BaseCtl\Include $(RFLAGS)
  322.  
  323. linkflags = $(linkflags) -Def:$(Proj).Def
  324.  
  325. Register: $(ObjDir)\$(Proj).Ocx
  326.   regsvr32 /s $?
  327.  
  328. # provide a standard rule for Odl generated headers named $(ObjDir)\$(Proj)Ifc.h
  329.  
  330. $(ObjDir)\$(Proj)Ifc.h $(ObjDir)\$(Proj).Tlb: $(Proj).Odl
  331.   $(MkDest)
  332.   mktyplib /DWIN32 -I$(INETSDK)\Samples\COM\ActiveXControl\BaseCtl\Include -I..\include /h $(ObjDir)\$(Proj)Ifc.h /tlb $(ObjDir)\$(Proj).tlb $(Proj).Odl
  333.  
  334. !endif # USE_BASECTL
  335.  
  336. #---------------------------------------------
  337. # Build Type Flags  (Retail/Debug)
  338. #---------------------------------------------
  339.  
  340. !if "$(BLDTYPE)"=="Retail"
  341. CL=-DSHIP $(CL)
  342. LFLAGS = $(LFLAGS) -release
  343. !else if "$(BLDTYPE)"=="Profile"
  344. CL=-DDEBUG -DTEST -DPROFILE $(CL)
  345. LFLAGS = $(LFLAGS) -debug:mapped,partial -debugtype:coff -PROFILE
  346. libs = $(libs) CAP.LIB
  347. !else 
  348. CL=-DDEBUG -DTEST $(CL) 
  349. LFLAGS = $(LFLAGS) -debug:full -debugtype:cv
  350. !endif
  351.  
  352.  
  353. #---------------------------------------------
  354. # Determine CRT Flags
  355. #---------------------------------------------
  356.  
  357. !ifdef crtdll                                 # Use DLL CRT? (which is multithreaded)
  358. crtflags = -DWIN32 $(noansi) -D_WIN32 -D_MT -D_DLL
  359. !elseif defined(crtst) && !defined(crtflags)  # use Single Threaded CRT?
  360. crtflags = -DWIN32 $(noansi) -D_WIN32
  361. !elseif defined(crtmt)                        # use Multithreaded CRT?
  362. crtflags = -DWIN32 $(noansi) -D_WIN32 -D_MT
  363. !else                                         # default to crtdll
  364. crtflags = -DWIN32 $(noansi) -D_WIN32 -D_MT -D_DLL
  365. !endif                                        # ifdef crtdll/else crtst/crtmt/else
  366.  
  367. #---------------------------------------------
  368. # Determine app type Flags (console, gui, or DLL)
  369. #---------------------------------------------
  370.  
  371. !if defined(console)                          # console app
  372. linkflags=$(linkflags) -subsystem:console -entry:mainCRTStartup
  373. !elseif !defined(dll)                         # not a dll, default to gui app
  374. linkflags=$(linkflags) -subsystem:windows -entry:WinMainCRTStartup
  375. !endif                                        # ifdef console/else
  376.  
  377.  
  378.  
  379. #*********************************************
  380. #
  381. # Libraries
  382. #
  383. #*********************************************
  384.  
  385. !if "$(BLDTYPE)"=="Retail"
  386. DbgLibFlag =
  387. !else
  388. DbgLibFlag = d
  389. !endif
  390.  
  391. #---------------------------------------------
  392. # Back Office SDK specific
  393. #---------------------------------------------
  394. !ifdef USE_SNA
  395. libs=$(libs) fmistr32.lib ihvLink.lib snacli.lib wappc32.lib wcpic32.lib
  396. libs=$(libs) wincsv32.lib winrui32.lib winsli32.lib
  397. !endif # USE_SNA
  398.  
  399. !ifdef USE_SQL
  400. libs=$(libs) ntwdbLib.lib
  401. !endif # USE_SQL
  402.  
  403. !ifdef USE_ODS
  404. libs=$(libs) opends60.lib
  405. !endif # USE_ODS
  406.  
  407. !if defined(USE_MSM) || defined(USE_SMS)
  408. libs=$(libs) smsapi.lib objectty.lib
  409. !endif # USE_MSM || USE_SMS
  410.  
  411. !ifdef USE_NETMON
  412. libs=$(libs) atalk.lib bhmon.lib bhsupp.lib browser.lib filter.lib friendly.lib
  413. libs=$(libs) hexedit.lib llc.lib nal.lib ncp.lib netlogon.lib nmapi.lib
  414. libs=$(libs) parser.lib ppp.lib slbs.lib toolbar.lib
  415. !endif # USE_NETMON
  416.  
  417. !ifdef USE_EXCHANGE
  418. !  ifndef Building_ExchSDK
  419. libs=ExchSDK$(DbgLibFlag).Lib $(libs)
  420. !  endif # Building_ExchSDK
  421.  
  422. libs=$(libs) Mapi32.Lib Uuid.Lib
  423.  
  424. !  if "$(WARNING_LEVEL)" != "4"
  425. CL= $(CL) -WX
  426. !  endif
  427.  
  428. DLLFLAGS = $(DLLFLAGS) -def:$(@B).def
  429. !endif # USE_EXCHANGE
  430.  
  431. #---------------------------------------------
  432. # Determine CRT Libraries
  433. #---------------------------------------------
  434. libc = libc$(DbgLibFlag).lib oldnames.lib
  435. libcmt = libcmt$(DbgLibFlag).lib oldnames.lib
  436. libcdll = msvcrt$(DbgLibFlag).lib oldnames.lib
  437.  
  438. !ifdef crtdll                                 # Use DLL CRT?
  439. libcrt=$(libcdll)
  440. !elseif defined(crtst) && !defined(crtflags)  # use Single Threaded CRT?
  441. libcrt=$(libc)
  442. !elseif defined(crtmt)                        # use Multithreaded CRT?
  443. libcrt=$(libcmt)
  444. !else                                         # default to crtdll
  445. libcrt=$(libcdll)
  446. !endif                                        # endif crtdll/else crtst/crtmt/else
  447.  
  448. #---------------------------------------------
  449. # Determine app type libraries (console, gui, or DLL)
  450. #---------------------------------------------
  451.  
  452. !ifdef dll                                    # is this a DLL?
  453. linklibs=$(libs) kernel32.lib advapi32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib ole32.lib oleaut32.lib uuid.lib winspool.lib version.lib
  454. !elseif defined(console)                      # not a DLL, perhaps a console app
  455. linklibs=$(libs) kernel32.lib advapi32.lib user32.lib ole32.lib version.lib
  456. !else                                         # default to gui app
  457. linklibs=$(libs) kernel32.lib $(optlibs) advapi32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib oleaut32.lib uuid.lib winspool.lib version.lib
  458. !endif                                        # ifdef dll/else console/else
  459.  
  460. LinkLibs = $(LibList) $(linklibs) $(libcrt)
  461.  
  462. !if "$(BLDTYPE)" == "Profile"
  463. LinkLibs = $(LinkLibs) cap.lib
  464. !endif
  465.  
  466.  
  467. #---------------------------------------------
  468. # Additional MFC Libraries
  469. #---------------------------------------------
  470. # Note that linking order is important when using MFC!
  471.  
  472. !ifdef Use_MFC
  473. !if !defined(nodebug)
  474. linklibs = mfco42$(DbgLibFlag).lib $(linklibs)
  475. !endif
  476. linklibs = mfcs42$(DbgLibFlag).lib mfc42$(DbgLibFlag).lib $(linklibs)
  477. !endif
  478.  
  479.  
  480. #*********************************************
  481. #
  482. # Inference Rules
  483. #
  484. #*********************************************
  485. .SUFFIXES:
  486. .SUFFIXES: .c .cpp .obj .def .lib .dll .exe .mc .rc .res .exp .bin .hpj .htm .stm .h .mak .cpl .gif .jpg .cxx .hxx .ocx
  487.  
  488. # C Targets
  489. .c{$(ObjDir)\}.obj:
  490.     $(MkDest)
  491. !if "$(LOG)"=="YES"
  492.     @echo $(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
  493. !endif
  494.     $(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
  495.  
  496. # C++ Targets
  497. .cpp{$(ObjDir)\}.obj:
  498.     $(MkDest)
  499. !if "$(LOG)"=="YES"
  500.     @echo $(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
  501. !endif
  502.     $(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
  503.  
  504. # C++ Targets
  505. .cxx{$(ObjDir)\}.obj:
  506.     $(MkDest)
  507. !if "$(LOG)"=="YES"
  508.     @echo $(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
  509. !endif
  510.     $(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
  511.  
  512. # Resource Targets from .RC files
  513. {$(ResDir)\}.rc{$(ObjDir)\}.res:
  514.     $(MkDest)
  515. !if "$(LOG)"=="YES"
  516.     @echo $(RC) $(RFLAGS) $(ResDir)\$(@B).rc $(LogCmd)
  517. !endif
  518.     $(RC) $(RFLAGS) $(ResDir)\$(@B).rc $(LogCmd)
  519.  
  520. # Resource Targets from .MC files
  521. .mc{$(ObjDir)\}.res:
  522.     $(MkDest)
  523. !if "$(LOG)"=="YES"
  524.     @echo $(MC) $(MFLAGS) $< $(LogCmd)
  525. !endif
  526.     $(MC) $(MFLAGS) $< $(LogCmd)
  527. !if "$(LOG)"=="YES"
  528.     @echo $(RC) $(MRFLAGS) -fo$@ $(ObjDir)\$(@B).rc $(LogCmd)
  529. !endif
  530.     $(RC) $(MRFLAGS) -fo$@ $(ObjDir)\$(@B).rc $(LogCmd)
  531.  
  532. # Import Libraries
  533. .Def{$(ObjDir)\}.lib:
  534. !if "$(LOG)"=="YES"
  535.     @echo $(IMPLIB) -nologo -machine:$(CPU) -def:$(@B).Def $(ObjList) -OUT:$@ $(LogCmd)
  536. !endif
  537.     $(IMPLIB) -nologo -machine:$(CPU) -def:$(@B).Def $(ObjList) -OUT:$@ $(LogCmd)
  538.  
  539. .Def{$(ObjDir)\}.exp:
  540. !if "$(LOG)"=="YES"
  541.     @echo $(IMPLIB) -nologo -machine:$(CPU) -def:$(@B).Def -OUT:$(@R).Lib $(ObjDir)\*.Obj $(STATICLIBS) $(LogCmd)
  542. !endif
  543.     $(IMPLIB) -nologo -machine:$(CPU) -def:$(@B).Def -OUT:$(@R).Lib $(ObjDir)\*.Obj $(STATICLIBS) $(LogCmd)
  544.  
  545. # Static Libraries
  546. {$(ObjDir)\}.obj{$(ObjDir)\}.lib:
  547. !if "$(LOG)"=="YES"
  548.     @echo $(LIBU) $(LIBFLAGS)  $** $(LogCmd)
  549. !endif
  550.     $(LIBU) $(LIBFLAGS) $** $(LogCmd)
  551.  
  552. # DLLs
  553. {$(ObjDir)\}.obj{$(ObjDir)\}.dll:
  554.     @echo $** > $(ObjDir)\objfiles.lst
  555.     @echo $(LinkLibs) > $(ObjDir)\libfiles.lst
  556. !if "$(LOG)"=="YES"
  557.     @echo   $(LINK) $(LFLAGS) $(DLLFLAGS) $(linkflags) @$(ObjDir)\objfiles.lst @$(ObjDir)\libfiles.lst $(LogCmd)
  558. !endif
  559.     $(LINK) $(LFLAGS) $(DLLFLAGS) $(linkflags) @$(ObjDir)\objfiles.lst @$(ObjDir)\libfiles.lst $(LogCmd)
  560.  
  561. # OCs
  562. {$(ObjDir)\}.obj{$(ObjDir)\}.Ocx:
  563.     @echo $** > $(ObjDir)\objfiles.lst
  564.     @echo $(LinkLibs) > $(ObjDir)\libfiles.lst
  565. !if "$(LOG)"=="YES"
  566.     @echo   $(LINK) $(LFLAGS) $(DLLFLAGS) $(linkflags) @$(ObjDir)\objfiles.lst @$(ObjDir)\libfiles.lst $(LogCmd)
  567. !endif
  568.     $(LINK) $(LFLAGS) $(DLLFLAGS) $(linkflags) @$(ObjDir)\objfiles.lst @$(ObjDir)\libfiles.lst $(LogCmd)
  569.  
  570. # CPLs
  571. {$(ObjDir)\}.obj{$(ObjDir)\}.Cpl:
  572.     @echo $** > $(ObjDir)\objfiles.lst
  573.     @echo $(LinkLibs) > $(ObjDir)\libfiles.lst
  574. !if "$(LOG)"=="YES"
  575.     @echo   $(LINK) $(LFLAGS) $(DLLFLAGS) $(linkflags) @$(ObjDir)\objfiles.lst @$(ObjDir)\libfiles.lst $(LogCmd)
  576. !endif
  577.     $(LINK) $(LFLAGS) $(DLLFLAGS) $(linkflags) @$(ObjDir)\objfiles.lst @$(ObjDir)\libfiles.lst $(LogCmd)
  578.  
  579. # BINs
  580. {$(ObjDir)\}.obj{$(ObjDir)\}.bin:
  581.     @echo $(LinkLibs) > $(ObjDir)\libfiles.lst
  582. !if "$(LOG)"=="YES"
  583.     @echo $(LINK) $(LFLAGS) $(linkflags) $** @$(ObjDir)\libfiles.lst $(LogCmd)
  584. !endif
  585.     $(LINK) $(LFLAGS) $(linkflags) $** @$(ObjDir)\libfiles.lst $(LogCmd)
  586.  
  587. # EXEs
  588. {$(ObjDir)\}.obj{$(ObjDir)\}.exe:
  589.     @echo $**  > $(ObjDir)\objfiles.lst
  590.     @echo $(LinkLibs) > $(ObjDir)\libfiles.lst
  591. !if "$(LOG)"=="YES"
  592.     @echo $(LINK) $(LFLAGS) $(linkflags) @$(ObjDir)\objfiles.lst @$(ObjDir)\libfiles.lst $(LogCmd)
  593. !endif
  594.     $(LINK) $(LFLAGS) $(linkflags) @$(ObjDir)\objfiles.lst @$(ObjDir)\libfiles.lst $(LogCmd)
  595.  
  596. # Helpfiles
  597. .hpj{$(ObjDir)\}.hlp:
  598.     $(MkDest)
  599. !if "$(LOG)"=="YES"
  600.     @echo  $(HC) $(HFLAGS) $(@B).Hpj
  601. !endif
  602.     $(HC) $(HFLAGS) $(@B).Hpj
  603. !if "$(LOG)"=="YES"
  604.     @echo   xcopy $(@F) $(ObjDir)
  605. !endif
  606.     -xcopy $(@F) $(ObjDir) $(LogCmd)
  607.  
  608. # ISAPI DLLs to Web Roots
  609. {$(ObjDir)}.Dll{$(WWWSCRIPTS)\SDK}.Dll:
  610.  $(MkWWWDest)
  611.  !copy $? $(WWWSCRIPTS)\SDK
  612.  
  613. # Test EXEs to Web Roots
  614. {$(ObjDir)}.Exe{$(WWWSCRIPTS)\SDK}.Exe:
  615.  $(MkWWWDest)
  616.  !copy $? $(WWWSCRIPTS)\SDK
  617.  
  618. # HTML files to webroots
  619. .Htm{$(WWWROOT)\SDK\$(Proj)}.Htm:
  620.  $(MkWWWDest)
  621.  !copy $? $(WWWROOT)\SDK\$(Proj)
  622.  
  623. # GIF files to webroots
  624. .Gif{$(WWWROOT)\SDK\$(Proj)}.Gif:
  625.  $(MkWWWDest)
  626.  !copy $? $(WWWROOT)\SDK\$(Proj)
  627.  
  628. # JPEG files to webroots
  629. .Jpg{$(WWWROOT)\SDK\$(Proj)}.Jpg:
  630.  $(MkWWWDest)
  631.  !copy $? $(WWWROOT)\SDK\$(Proj)
  632.  
  633. # ISAPI sources to web roots
  634. .Cpp{$(WWWROOT)\SDK\$(Proj)}.Cpp:
  635.  $(MkWWWDest)
  636.  !copy $? $(WWWROOT)\SDK\$(Proj)
  637.  
  638. # ISAPI sources to web roots
  639. .C{$(WWWROOT)\SDK\$(Proj)}.C:
  640.  $(MkWWWDest)
  641.  !copy $? $(WWWROOT)\SDK\$(Proj)
  642.  
  643. # ISAPI sources to web roots
  644. .h{$(WWWROOT)\SDK\$(Proj)}.h:
  645.  $(MkWWWDest)
  646.  !copy $? $(WWWROOT)\SDK\$(Proj)
  647.  
  648. # ISAPI sources to web roots
  649. .Def{$(WWWROOT)\SDK\$(Proj)}.Def:
  650.  $(MkWWWDest)
  651.  !copy $? $(WWWROOT)\SDK\$(Proj)
  652.  
  653. # ISAPI sources to web roots
  654. .Mak{$(WWWROOT)\SDK\$(Proj)}.Mak:
  655.  $(MkWWWDest)
  656.  !copy $? $(WWWROOT)\SDK\$(Proj)
  657.  
  658. #*********************************************
  659. #
  660. # Make Targets
  661. #
  662. #*********************************************
  663.  
  664. #---------------------------------------------
  665. # List Output Files
  666. #---------------------------------------------
  667. ListDir:
  668.     dir $(ObjDir)
  669.  
  670. #---------------------------------------------
  671. # Display Output Listing File
  672. #---------------------------------------------
  673. !ifndef ERRVIEW
  674. ERRVIEW=start notepad.exe
  675. !endif
  676.  
  677. ListOut:
  678.     $(ERRVIEW) $(ObjDir)\$(Proj).out
  679.  
  680. #---------------------------------------------
  681. # Delete Output Listing File
  682. #---------------------------------------------
  683. DelOut:
  684.     del $(ObjDir)\$(Proj).out
  685.  
  686. #---------------------------------------------
  687. # Clean Output Directories
  688. #---------------------------------------------
  689. clean:
  690.  $(MkDest)
  691. !if "$(OS)" == "Windows_NT"
  692.  del /q $(ObjDir)\*.obj \
  693.         $(ObjDir)\*.out \
  694.         $(ObjDir)\*.h   \
  695.         $(ObjDir)\*.dbg \
  696.         $(ObjDir)\*.ocx \
  697.         $(ObjDir)\*.log \
  698.         $(ObjDir)\*.lib \
  699.         $(ObjDir)\*.exe \
  700.         $(ObjDir)\*.dll \
  701.         $(ObjDir)\*.map \
  702.         $(ObjDir)\*.res \
  703.         $(ObjDir)\*.rc  \
  704.         $(ObjDir)\*.bin \
  705.         $(ObjDir)\*.lst \
  706.         $(ObjDir)\*.blt \
  707.         $(ObjDir)\*.hlp \
  708.         $(ObjDir)\*.srl \
  709.         $(ObjDir)\*.exp >NUL 2>NUL
  710. !else  # Win95 doesn't support "2>" on command line, multiple files on a Del command, or /q
  711.  erase  $(ObjDir)\*.obj >NUL
  712.  erase  $(ObjDir)\*.out >NUL
  713.  erase  $(ObjDir)\*.h   >NUL
  714.  erase  $(ObjDir)\*.dbg >NUL
  715.  erase  $(ObjDir)\*.ocx >NUL
  716.  erase  $(ObjDir)\*.log >NUL
  717.  erase  $(ObjDir)\*.lib >NUL
  718.  erase  $(ObjDir)\*.exe >NUL
  719.  erase  $(ObjDir)\*.dll >NUL
  720.  erase  $(ObjDir)\*.map >NUL
  721.  erase  $(ObjDir)\*.res >NUL
  722.  erase  $(ObjDir)\*.rc  >NUL
  723.  erase  $(ObjDir)\*.bin >NUL
  724.  erase  $(ObjDir)\*.lst >NUL
  725.  erase  $(ObjDir)\*.blt >NUL
  726.  erase  $(ObjDir)\*.hlp >NUL
  727.  erase  $(ObjDir)\*.srl >NUL
  728.  erase  $(ObjDir)\*.exp >NUL
  729. !endif  # OS == Windows_NT
  730. !endif      # _INETSDK_MAK_
  731.