home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / DLLTRAC.PAK / MAKEFILE < prev    next >
Encoding:
Text File  |  1997-05-06  |  3.3 KB  |  127 lines

  1. # This is a part of the Microsoft Foundation Classes C++ library.
  2. # Copyright (C) 1992-1995 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. BORINCL=$(MAKEDIR)\..\include
  18. BORLIB=$(MAKEDIR)\..\lib
  19.  
  20. !if "$(DEBUG)" == ""
  21. DEBUG=1
  22. !endif
  23. !if "$(DEBUG)" != "0"
  24. DEBUG_SUFFIX=d
  25. !endif
  26.  
  27. LIBRARIES=nafxcw$(DEBUG_SUFFIX).lib $(OTHERLIBS) cw32mt.lib import32.lib
  28.  
  29. #CPPFLAGS=/c /W3 /GX /MT$(DEBUG_SUFFIX) $(DEBUGFLAGS) $(OPT)
  30. CPPFLAGS=/c /w- $(DEBUG_FLAG) /I$(BORINCL);$(BORINCL)\mfc /D_RTLDLL
  31. #LINKFLAGS=/subsystem:windows
  32. LINKFLAGS=/aa /w-inq /n /s /L$(BORLIB)
  33. !if "$(DEBUG)" == "0"
  34. #CPPFLAGS=$(CPPFLAGS) /O1
  35. CPPFLAGS=$(CPPFLAGS) /v-
  36. LINKFLAGS=$(LINKFLAGS) /v-
  37. !else
  38. #CPPFLAGS=$(CPPFLAGS) /Od /D_DEBUG
  39. CPPFLAGS=$(CPPFLAGS) /D_DEBUG /v /vi
  40. LINKFLAGS=$(LINKFLAGS) /v
  41. !endif
  42. !if "$(UNICODE)" != "1"
  43. #CPPFLAGS=$(CPPFLAGS) /D_MBCS
  44. CPPFLAGS=$(CPPFLAGS)
  45. !else
  46. CPPFLAGS=$(CPPFLAGS) /D_UNICODE
  47. #LINKFLAGS=$(LINKFLAGS) /entry:wWinMainCRTStartup
  48. !endif
  49.  
  50. !if "$(CODEVIEW)" != "0"
  51. #CPPFLAGS=$(CPPFLAGS) /Z7
  52. CPPFLAGS=$(CPPFLAGS)
  53. #LINKFLAGS=$(LINKFLAGS) /debug:full /debugtype:cv
  54. !endif
  55.  
  56. !if "$(NO_PDB)" == "1"
  57. LINKFLAGS=$(LINKFLAGS) /pdb:none
  58. PDB_NONE=/pdb:none
  59. !endif
  60.  
  61. goal: dlltrace.exe trace.dll
  62.  
  63. #############################################################################
  64.  
  65. dlltrace.obj: dlltrace.cpp resource.h traceapi.h
  66. #       cl $(CPPFLAGS) dlltrace.cpp
  67.     bcc32 $(CPPFLAGS) dlltrace.cpp
  68.  
  69. dlltrace.exe: dlltrace.obj dlltrace.res trace.lib
  70. #       link $(LINKFLAGS) /out:dlltrace.exe dlltrace.obj trace.lib dlltrace.res
  71.     tlink32 /Tpe @&&~
  72. $(LINKFLAGS) +
  73. $(BORLIB)\c0w32.obj dlltrace.obj
  74. dlltrace.exe
  75. dlltrace.map
  76. trace.lib $(LIBRARIES)
  77.  
  78. dlltrace.res
  79. ~
  80.  
  81. dlltrace.res: dlltrace.rc resource.h hello.ico
  82. #       rc /r dlltrace.rc
  83.     brc32 -I$(BORINCL);$(BORINCL)\mfc -r dlltrace.rc
  84.  
  85. #############################################################################
  86.  
  87. trace.obj: trace.cpp traceapi.h
  88. #       cl $(CPPFLAGS) /D_WINDLL /D_USRDLL trace.cpp
  89.     bcc32 $(CPPFLAGS) /D_WINDLL /D_USRDLL trace.cpp
  90.  
  91. trace.dll: trace.obj trace.res
  92. #       link /debug:full /debugtype:cv /dll $(PDB_NONE) \
  93. #       /out:trace.dll /def:trace.def /implib:trace.lib /map:trace.map \
  94. #       trace.obj trace.res
  95.     tlink32 /Tpd @&&~
  96. $(LINKFLAGS) +
  97. $(BORLIB)\c0d32.obj trace.obj
  98. trace.dll
  99. trace.map
  100. $(LIBRARIES)
  101. trace.def
  102. trace.res
  103. ~
  104.  
  105. trace.lib: trace.dll
  106.     implib trace.lib trace.dll
  107.  
  108. trace.res: trace.rc traceres.h
  109. #       rc /r trace.rc
  110.     brc32 -I$(BORINCL);$(BORINCL)\mfc -r trace.rc
  111.  
  112. #############################################################################
  113.  
  114. clean::
  115.     if exist *.exe erase *.exe
  116.     if exist *.dll erase *.dll
  117.     if exist *.aps erase *.aps
  118.     if exist *.pch erase *.pch
  119.     if exist *.map erase *.map
  120.     if exist *.obj erase *.obj
  121.     if exist *.pdb erase *.pdb
  122.     if exist *.map erase *.map
  123.     if exist *.lib erase *.lib
  124.     if exist *.res erase *.res
  125.  
  126. #############################################################################
  127.