home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / advanced / dllhusk / makefile < prev    next >
Makefile  |  1998-03-26  |  3KB  |  101 lines

  1. # This is a part of the Microsoft Foundation Classes C++ library.
  2. # Copyright (C) 1992-1998 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. AFXDLL=1
  12. EXTRA_LIBS=testdll1.lib testdll2.lib
  13.  
  14. goal: $(EXTRA_LIBS) testdll1.dll testdll2.dll dllhusk.exe
  15.  
  16. PROJ=DLLHUSK
  17. OBJS=dllhusk.obj mainfrm.obj
  18. !if "$(PLATFORM)" == "M68K" || "$(PLATFORM)" == "MPPC"
  19. MACPROJ=DLLHusk
  20. MACSIG=DLLH
  21. !endif
  22.  
  23. !include <mfcsamps.mak>
  24.  
  25. clean::
  26.     if exist *.dll erase *.dll
  27.  
  28. #############################################################################
  29. # Common rules and values for building MFC Extension DLLs
  30.  
  31. DLL_CPPFLAGS=/D_WINDLL /D_AFXEXT /W3
  32. DLL_LINKFLAGS=/dll
  33. !if "$(DEBUG)" == "0"
  34. DLL_CPPFLAGS=$(DLL_CPPFLAGS) /O1 /MD
  35. DLL_LINKFLAGS=$(DLL_LINKFLAGS) /debug:none
  36. !else
  37. DLL_CPPFLAGS=$(DLL_CPPFLAGS) /D_DEBUG /Od /Z7 /MDd
  38. DLL_LINKFLAGS=$(DLL_LINKFLAGS) /debug:full /debugtype:cv
  39. !endif
  40. !if "$(UNICODE)" != "1"
  41. DLL_CPPFLAGS=$(DLL_CPPFLAGS) /D_MBCS
  42. !else
  43. DLL_CPPFLAGS=$(DLL_CPPFLAGS) /D_UNICODE
  44. !endif
  45. !if "$(MACOS)" == "1"
  46. DLL_LINKFLAGS=$(DLL_LINKFLAGS) /mac:init=WlmConnectionInit
  47. DLL_LINKFLAGS=$(DLL_LINKFLAGS) /mac:type=shlb /mac:creator=cfmg
  48. DLL_CPPFLAGS=$(DLL_CPPFLAGS) /D_MAC
  49. DLL_MRCFLAGS=/DARCHITECTURE=$(ARCHITECTURE)
  50. !endif
  51.  
  52. RFLAGS=$(RFLAGS) /D_AFXDLL
  53.  
  54. #############################################################################
  55. # Special rules for building TESTDLL1
  56.  
  57. !if "$(MACOS)" == "1"
  58. TESTDLL1_RESOURCES=testdll1.rsc tdll1mac.rsc
  59. !else
  60. TESTDLL1_RESOURCES=testdll1.res
  61. !endif
  62.  
  63. testdll1.obj: testdll1.cpp testdll1.h
  64.     cl $(DLL_CPPFLAGS) /c testdll1.cpp
  65.  
  66. tdll1mac.rsc: testdll.r
  67.     mrc $(DLL_MRCFLAGS) /DLIBNAME=\"testdll1.dll\" /o tdll1mac.rsc testdll.r
  68.  
  69. testdll1.dll testdll1.lib: testdll1.obj $(TESTDLL1_RESOURCES)
  70.     link $(DLL_LINKFLAGS) /out:testdll1.dll /map:testdll1.map \
  71. # REVIEW_ERICSC: can remove .def file once dllexport works
  72. !if "$(MACOS)" == "1"
  73.     /def:testdll1.def \
  74. !endif
  75.     /implib:testdll1.lib testdll1.obj $(TESTDLL1_RESOURCES)
  76.  
  77. #############################################################################
  78. # Special rules for building TESTDLL2
  79.  
  80. !if "$(MACOS)" == "1"
  81. TESTDLL2_RESOURCES=testdll2.rsc tdll2mac.rsc
  82. !else
  83. TESTDLL2_RESOURCES=testdll2.res
  84. !endif
  85.  
  86. testdll2.obj: testdll2.cpp testdll2.h
  87.     cl $(DLL_CPPFLAGS) /c testdll2.cpp
  88.  
  89. tdll2mac.rsc: testdll.r
  90.     mrc $(DLL_MRCFLAGS) /DLIBNAME=\"testdll2.dll\" /o tdll2mac.rsc testdll.r
  91.  
  92. testdll2.dll testdll2.lib: testdll2.obj $(TESTDLL2_RESOURCES)
  93.     link $(DLL_LINKFLAGS) /out:testdll2.dll /map:testdll2.map \
  94. # REVIEW_ERICSC: can remove .def file once dllexport works
  95. !if "$(MACOS)" == "1"
  96.     /def:testdll2.def \
  97. !endif
  98.     /implib:testdll2.lib testdll2.obj $(TESTDLL2_RESOURCES)
  99.  
  100. #############################################################################
  101.