home *** CD-ROM | disk | FTP | other *** search
/ Supercompiler 1997 / SUPERCOMPILER97.iso / MS_VC.50 / VC / MFC / SRC / MFCNET.MAK < prev    next >
Encoding:
Text File  |  1996-12-12  |  4.5 KB  |  196 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. # MFCN42[D].DLL is a DLL
  12. #  which exports all the MFC/NET classes
  13. #
  14. # If you need a private build of the MFC NET DLL, be sure to rename
  15. #  "MFCN42.DLL" to something more appropriate for your application.
  16. # Please do not re-distribute a privately built version with the
  17. #  name "MFCN42.DLL".
  18. #
  19. # Use nmake /f mfcnet.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=MFCN42 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_NET_IMPL
  37. MFCDLL=MFC42
  38. LFLAGS=/nodefaultlib
  39.  
  40. !if "$(PLATFORM)" == "M68K"
  41. TARG=$(TARG)M
  42. MFCDLL=MFC42M
  43. MACOS=1
  44. !elseif "$(PLATFORM)" == "MPPC"
  45. TARG=$(TARG)P
  46. MFCDLL=MFC42P
  47. MACOS=1
  48. !endif
  49.  
  50. !if "$(UNICODE)" == "1"
  51. TARG=$(TARG)U
  52. MFCDLL=$(MFCDLL)U
  53. !endif
  54.  
  55. !if "$(DEBUG)" != "0"
  56. # Debug DLL build
  57. RCDEFINES=/D_DEBUG
  58. LFLAGS=$(LFLAGS)
  59. PCH_FILE=$D\stdafxn.pch
  60. PCH_CPP=dllnet
  61. TARG=$(TARG)D
  62. MFCDLL=$(MFCDLL)D
  63.  
  64. !ELSE
  65. # Release DLL build
  66. RCDEFINES=
  67. LFLAGS=$(LFLAGS)
  68. PCH_FILE=$D\stdafxn.pch
  69. PCH_CPP=dllnet
  70. !ENDIF
  71.  
  72. DEFFILE=$(PLATFORM)\$(TARG).DEF
  73.  
  74. MFCDLL=..\lib\$(MFCDLL).lib
  75.  
  76. !if "$(DEBUGTYPE)" == ""
  77. DEBUGTYPE=cv,fixup
  78. !endif
  79.  
  80. !if "$(CODEVIEW)" != "0"
  81. !if "$(REGEN)" != "1"
  82. LFLAGS=$(LFLAGS) /debug:full /debugtype:$(DEBUGTYPE)
  83. !else
  84. LFLAGS=$(LFLAGS) /debug:none
  85. !endif
  86. !if "$(NO_PDB)" != "1" && "$(REGEN)" != "1"
  87. LFLAGS=$(LFLAGS) /pdb:$(TARG).pdb
  88. !else
  89. LFLAGS=$(LFLAGS) /pdb:none
  90. !endif
  91. !else
  92. LFLAGS=$(LFLAGS) /debug:none /incremental:no
  93. !endif
  94.  
  95. !ifdef RELEASE # Release VERSION info
  96. RCDEFINES=$(RCDEFINES) /DRELEASE
  97. LFLAGS=$(LFLAGS) /release
  98. !endif
  99.  
  100. LFLAGS=$(LFLAGS) /dll
  101.  
  102. # OPT:noref keeps unreferenced functions (ie. no dead-code elimination)
  103. !if "$(REGEN)" == "1"
  104. LFLAGS=$(LFLAGS) /opt:noref
  105. !else
  106. LFLAGS=$(LFLAGS) /opt:ref
  107. !endif
  108.  
  109. !ifndef MACOS
  110. LFLAGS=$(LFLAGS) /version:4.2 /base:0x5F600000
  111.  
  112. LIBS=$(MFCDLL) $(CRTDLL) kernel32.lib gdi32.lib user32.lib
  113. !else
  114.  
  115. !if "$(BASE)" == "M68K"
  116. !error DLL build is not supported for 68K Macintosh
  117. !endif
  118.  
  119. LFLAGS=$(LFLAGS) /mac:nomfilepad
  120. RCFLAGS=$(RCFLAGS) /m
  121.  
  122. !if "$(DEBUG)" != "0"
  123. LIBS=msvcwlmd.lib
  124. !else
  125. LIBS=msvcwlm.lib
  126. !endif
  127. LIBS=$(MFCDLL) $(CRTDLL) $(LIBS) interfac.lib
  128. !endif
  129.  
  130. !if "$(ORDER)" == "1"
  131. !if exist($(PLATFORM)\$(TARG).prf)
  132. DEFS=$(DEFS) /D_AFX_FUNCTION_ORDER
  133. LFLAGS=$(LFLAGS) /order:@$(PLATFORM)\$(TARG).prf
  134. !endif
  135. !endif
  136.  
  137. dll_goal: create2.dir $(TARG).dll ..\lib\$(TARG).lib
  138.  
  139. #############################################################################
  140. # import most rules and library files from normal makefile
  141.  
  142. !include makefile
  143.  
  144. create2.dir:
  145.     @-if not exist $D\*.* mkdir $D
  146.  
  147. #############################################################################
  148. # Build target
  149.  
  150. $D\$(TARG).res: mfcnet.rc build_.h
  151.     rc /r $(RCFLAGS) $(RCDEFINES) /fo $D\$(TARG).res mfcnet.rc
  152. !ifdef MACOS
  153.     mrc /DRESFILE=\"$@\" /o $@ attribut.r
  154. !endif
  155.  
  156. $D\$(TARG).rsc: mfcdll.r
  157. !if "$(DEBUG)" == "0"
  158.     mrc /DARCHITECTURE=$(MACOS_ARCH) /DLIBNAME=\"MicrosoftMFCN42Lib\" \
  159.         /DCURRENTVER=0x04008000 /DOLDDEFVER=0x04008000 \
  160.         /DJDATE=$(JULIAN) -DJDATESTR=\"$(JULIAN)\" /o $D\$(TARG).rsc mfcdll.r
  161. !else
  162.     mrc /DARCHITECTURE=$(MACOS_ARCH) /DLIBNAME=\"MicrosoftMFCN42DLib\" \
  163.         /DCURRENTVER=0x04008000 /DOLDDEFVER=0x04008000 \
  164.         /DJDATE=$(JULIAN) -DJDATESTR=\"$(JULIAN)\" /o $D\$(TARG).rsc mfcdll.r
  165. !endif
  166.  
  167. DLL_OBJS=$(SOCKETS)
  168.  
  169. !ifdef MACOS
  170. MRC_RESOURCES=$D\$(TARG).rsc
  171. !else
  172. MRC_RESOURCES=
  173. !endif
  174.  
  175. $(TARG).dll ..\lib\$(TARG).lib: $D\$(PCH_CPP).obj $(DLL_OBJS) $(DEFFILE) $D\$(TARG).res $(MRC_RESOURCES)
  176.     link @<<
  177. $(LFLAGS)
  178. $(LIBS)
  179. $D\$(PCH_CPP).obj
  180. $(DLL_OBJS)
  181. $D\$(TARG).res
  182. /def:$(DEFFILE)
  183. /out:$(TARG).DLL
  184. /map:$D\$(TARG).MAP
  185. /implib:..\lib\$(TARG).LIB
  186. !ifdef MACOS
  187. /mac:type=shlb /mac:creator=cfmg
  188. /mac:init=WlmConnectionInit
  189. /import:currentver=67141632,oldcodever=67141632,oldapiver=67141632
  190. $D\$(TARG).rsc
  191. !endif
  192. <<
  193.     if exist ..\lib\$(TARG).exp del ..\lib\$(TARG).exp
  194.  
  195. #############################################################################
  196.