home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / advanced / dlltrace / makefile < prev    next >
Makefile  |  1998-03-26  |  2KB  |  89 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.  
  12. # Build dlltrace application and Trace DLL
  13. #
  14. # Options to NMAKE:
  15. #     "OPT" => use to set custom compile options
  16.  
  17. !if "$(DEBUG)" == ""
  18. DEBUG=1
  19. !endif
  20. !if "$(DEBUG)" != "0"
  21. DEBUG_SUFFIX=d
  22. !endif
  23.  
  24. CPPFLAGS=/c /W3 /GX /MT$(DEBUG_SUFFIX) $(DEBUGFLAGS) $(OPT)
  25. LINKFLAGS=/subsystem:windows
  26. !if "$(DEBUG)" == "0"
  27. CPPFLAGS=$(CPPFLAGS) /O1
  28. !else
  29. CPPFLAGS=$(CPPFLAGS) /Od /D_DEBUG
  30. !endif
  31. !if "$(UNICODE)" != "1"
  32. CPPFLAGS=$(CPPFLAGS) /D_MBCS
  33. !else
  34. CPPFLAGS=$(CPPFLAGS) /D_UNICODE
  35. LINKFLAGS=$(LINKFLAGS) /entry:wWinMainCRTStartup
  36. !endif
  37.  
  38. !if "$(CODEVIEW)" != "0"
  39. CPPFLAGS=$(CPPFLAGS) /Z7
  40. LINKFLAGS=$(LINKFLAGS) /debug:full /debugtype:cv
  41. !endif
  42.  
  43. !if "$(NO_PDB)" == "1"
  44. LINKFLAGS=$(LINKFLAGS) /pdb:none
  45. PDB_NONE=/pdb:none
  46. !endif
  47.  
  48. goal: dlltrace.exe trace.dll
  49.  
  50. #############################################################################
  51.  
  52. dlltrace.obj: dlltrace.cpp resource.h traceapi.h
  53.     cl $(CPPFLAGS) dlltrace.cpp
  54.  
  55. dlltrace.exe: dlltrace.obj dlltrace.res trace.lib
  56.     link $(LINKFLAGS) /out:dlltrace.exe dlltrace.obj trace.lib dlltrace.res
  57.  
  58. dlltrace.res: dlltrace.rc resource.h hello.ico
  59.     rc /r dlltrace.rc
  60.  
  61. #############################################################################
  62.  
  63. trace.obj: trace.cpp traceapi.h
  64.     cl $(CPPFLAGS) /D_WINDLL /D_USRDLL trace.cpp
  65.  
  66. trace.dll trace.lib: trace.obj trace.res
  67.     link /debug:full /debugtype:cv /dll $(PDB_NONE) \
  68.     /out:trace.dll /def:trace.def /implib:trace.lib /map:trace.map \
  69.     trace.obj trace.res
  70.  
  71. trace.res: trace.rc traceres.h
  72.     rc /r trace.rc
  73.  
  74. #############################################################################
  75.  
  76. clean::
  77.     if exist *.exe erase *.exe
  78.     if exist *.dll erase *.dll
  79.     if exist *.aps erase *.aps
  80.     if exist *.pch erase *.pch
  81.     if exist *.map erase *.map
  82.     if exist *.obj erase *.obj
  83.     if exist *.pdb erase *.pdb
  84.     if exist *.map erase *.map
  85.     if exist *.lib erase *.lib
  86.     if exist *.res erase *.res
  87.  
  88. #############################################################################
  89.