MAKEFILE
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:3k
源码类别:

Windows编程

开发平台:

Visual C++

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