home *** CD-ROM | disk | FTP | other *** search
/ Supercompiler 1997 / SUPERCOMPILER97.iso / MS_VC.50 / VC / MFC / SRC / MFCDB.MAK < prev    next >
Encoding:
Text File  |  1996-12-12  |  4.6 KB  |  204 lines

  1. # This is a part of the Microsoft Foundation Classes C++ library.
  2. # Copyright (C) 1992-1997 Microsoft Corporation
  3. # All rights reserved.
  4. #
  5. # This source code is only intended as a supplement to the
  6. # Microsoft Foundation Classes Reference and related
  7. # electronic documentation provided with the library.
  8. # See these sources for detailed information regarding the
  9. # Microsoft Foundation Classes product.
  10.  
  11. # MFCD42[D].DLL is a DLL
  12. #  which exports all the MFC/DB classes
  13. #
  14. # If you need a private build of the MFC DB DLL, be sure to rename
  15. #  "MFCD42.DLL" to something more appropriate for you application.
  16. # Please do not re-distribute a privately built version with the
  17. #  name "MFCD42.DLL".
  18. #
  19. # Use nmake /f mfcdb.mak LIBNAME=<my name> to do this.
  20. #
  21. # Note: LIBNAME must be 6 characters or less.
  22.  
  23. !ifndef LIBNAME
  24. !error LIBNAME is not defined. LIBNAME=MFCD42 builds the prebuilt DLL.
  25. !endif
  26.  
  27. !if "$(DEBUG)" != "0"
  28. CRTDLL=msvcrtd.lib
  29. !else
  30. CRTDLL=msvcrt.lib
  31. !endif
  32.  
  33. TARGET=w
  34. DLL=2
  35. TARG=$(LIBNAME)
  36. TARGDEFS=/D_AFX_DB_IMPL
  37. MFCDLL=MFC42
  38. MFCOLE=MFCO42
  39. LFLAGS=/nodefaultlib
  40.  
  41. !if "$(PLATFORM)" == "M68K"
  42. TARG=$(TARG)M
  43. MFCDLL=MFC42M
  44. MFCOLE=MFCO42M
  45. MACOS=1
  46. !elseif "$(PLATFORM)" == "MPPC"
  47. TARG=$(TARG)P
  48. MFCDLL=MFC42P
  49. MFCOLE=MFCO42P
  50. MACOS=1
  51. !endif
  52.  
  53. !if "$(UNICODE)" == "1"
  54. TARG=$(TARG)U
  55. MFCDLL=$(MFCDLL)U
  56. MFCOLE=$(MFCOLE)U
  57. !endif
  58.  
  59. !if "$(DEBUG)" != "0"
  60. # Debug DLL build
  61. RCDEFINES=/D_DEBUG
  62. LFLAGS=$(LFLAGS)
  63. PCH_FILE=$D\stdafxd.pch
  64. PCH_CPP=dlldb
  65. TARG=$(TARG)D
  66. MFCDLL=$(MFCDLL)D
  67. MFCOLE=$(MFCOLE)D
  68.  
  69. !ELSE
  70. # Release DLL build
  71. RCDEFINES=
  72. LFLAGS=$(LFLAGS)
  73. PCH_FILE=$D\stdafxd.pch
  74. PCH_CPP=dlldb
  75. !ENDIF
  76.  
  77. DEFFILE=$(PLATFORM)\$(TARG).DEF
  78.  
  79. MFCDLL=..\lib\$(MFCDLL).lib
  80. MFCOLE=..\lib\$(MFCOLE).lib
  81.  
  82. !if "$(DEBUGTYPE)" == ""
  83. DEBUGTYPE=cv,fixup
  84. !endif
  85.  
  86. !if "$(CODEVIEW)" != "0"
  87. !if "$(REGEN)" != "1"
  88. LFLAGS=$(LFLAGS) /debug:full /debugtype:$(DEBUGTYPE)
  89. !else
  90. LFLAGS=$(LFLAGS) /debug:none
  91. !endif
  92. !if "$(NO_PDB)" != "1" && "$(REGEN)" != "1"
  93. LFLAGS=$(LFLAGS) /pdb:$(TARG).pdb
  94. !else
  95. LFLAGS=$(LFLAGS) /pdb:none
  96. !endif
  97. !else
  98. LFLAGS=$(LFLAGS) /debug:none /incremental:no
  99. !endif
  100.  
  101. !ifdef RELEASE # Release VERSION info
  102. RCDEFINES=$(RCDEFINES) /DRELEASE
  103. LFLAGS=$(LFLAGS) /release
  104. !endif
  105.  
  106. LFLAGS=$(LFLAGS) /dll
  107.  
  108. # OPT:noref keeps unreferenced functions (ie. no dead-code elimination)
  109. !if "$(REGEN)" == "1"
  110. LFLAGS=$(LFLAGS) /opt:noref
  111. !else
  112. LFLAGS=$(LFLAGS) /opt:ref
  113. !endif
  114.  
  115. !ifndef MACOS
  116. LFLAGS=$(LFLAGS) /version:4.2 /base:0x5F700000
  117.  
  118. LIBS=$(MFCDLL) $(MFCOLE) $(CRTDLL) kernel32.lib gdi32.lib user32.lib \
  119.     uuid.lib daouuid.lib
  120. !else
  121.  
  122. !if "$(BASE)" == "M68K"
  123. !error DLL build is not supported for 68K Macintosh
  124. !endif
  125.  
  126. LFLAGS=$(LFLAGS) /mac:nomfilepad
  127. RCFLAGS=$(RCFLAGS) /m
  128.  
  129. !if "$(DEBUG)" != "0"
  130. LIBS=msvcwlmd.lib
  131. !else
  132. LIBS=msvcwlm.lib
  133. !endif
  134. LIBS=$(MFCDLL) $(CRTDLL) $(LIBS) interfac.lib
  135. !endif
  136.  
  137.  
  138. !if "$(ORDER)" == "1"
  139. !if exist($(PLATFORM)\$(TARG).prf)
  140. DEFS=$(DEFS) /D_AFX_FUNCTION_ORDER
  141. LFLAGS=$(LFLAGS) /order:@$(PLATFORM)\$(TARG).prf
  142. !endif
  143. !endif
  144.  
  145. dll_goal: create2.dir $(TARG).dll ..\lib\$(TARG).lib
  146.  
  147. #############################################################################
  148. # import most rules and library files from normal makefile
  149.  
  150. !include makefile
  151.  
  152. create2.dir:
  153.     @-if not exist $D\*.* mkdir $D
  154.  
  155. #############################################################################
  156. # Build target
  157.  
  158. $D\$(TARG).res: mfcdb.rc build_.h
  159.     rc /r $(RCFLAGS) $(RCDEFINES) /fo $D\$(TARG).res mfcdb.rc
  160. !ifdef MACOS
  161.     mrc /DRESFILE=\"$@\" /o $@ attribut.r
  162. !endif
  163.  
  164. $D\$(TARG).rsc: mfcdll.r
  165. !if "$(DEBUG)" == "0"
  166.     mrc /DARCHITECTURE=$(MACOS_ARCH) /DLIBNAME=\"MicrosoftMFCD42Lib\" \
  167.         /DCURRENTVER=0x04008000 /DOLDDEFVER=0x04008000 \
  168.         /DJDATE=$(JULIAN) -DJDATESTR=\"$(JULIAN)\" /o $D\$(TARG).rsc mfcdll.r
  169. !else
  170.     mrc /DARCHITECTURE=$(MACOS_ARCH) /DLIBNAME=\"MicrosoftMFCD42DLib\" \
  171.         /DCURRENTVER=0x04008000 /DOLDDEFVER=0x04008000 \
  172.         /DJDATE=$(JULIAN) -DJDATESTR=\"$(JULIAN)\" /o $D\$(TARG).rsc mfcdll.r
  173. !endif
  174.  
  175. DLL_OBJS=$(DB) $(DAO)
  176.  
  177. !ifdef MACOS
  178. MRC_RESOURCES=$D\$(TARG).rsc
  179. !else
  180. MRC_RESOURCES=
  181. !endif
  182.  
  183. $(TARG).dll ..\lib\$(TARG).lib: $D\$(PCH_CPP).obj $(DLL_OBJS) $(DEFFILE) $D\$(TARG).res $(MRC_RESOURCES)
  184.     link @<<
  185. $(LFLAGS)
  186. $(LIBS)
  187. $D\$(PCH_CPP).obj
  188. $(DLL_OBJS)
  189. $D\$(TARG).res
  190. /def:$(DEFFILE)
  191. /out:$(TARG).DLL
  192. /map:$D\$(TARG).MAP
  193. /implib:..\lib\$(TARG).LIB
  194. !ifdef MACOS
  195. /mac:type=shlb /mac:creator=cfmg
  196. /mac:init=WlmConnectionInit
  197. /import:currentver=67141632,oldcodever=67141632,oldapiver=67141632
  198. $D\$(TARG).rsc
  199. !endif
  200. <<
  201.     if exist ..\lib\$(TARG).exp del ..\lib\$(TARG).exp
  202.  
  203. #############################################################################
  204.