home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 39 / IOPROG_39.ISO / SOFT / sdkjava40.exe / data1.cab / fg_Samples / Samples / Profiler / heapmon / makefile < prev    next >
Encoding:
Makefile  |  2000-05-04  |  2.9 KB  |  111 lines

  1. ###############################################################################
  2. #
  3. #  Copyright (C) Microsoft Corporation 1995-1999
  4. #  All Rights Reserved.
  5. #
  6. #  Sample heap profiler makefile
  7. #
  8. ###############################################################################
  9.  
  10.  
  11. ####################
  12. # macro definitions
  13. ####################
  14.  
  15. BASE_NAME         = heapmon
  16.  
  17.  
  18. SDK_ROOT = ..\..\..
  19. SDK_INC = $(SDK_ROOT)\Include
  20. SDK_LIB = $(SDK_ROOT)\Lib\i386
  21.  
  22. !if "$(CFG)" == ""
  23. CFG = debug
  24. !endif
  25.  
  26. !if "$(CFG)" != "debug" && "$(CFG)" != "release" && "$(CFG)" != "all"
  27. !error Invalid build configuration "$(CFG)".  Must be "debug", "release", or "all".
  28. !endif
  29.  
  30. !if "$(CFG)" == "debug"
  31. DEFINES = -DDEBUG
  32. CL_OPT_SWITCHES = -Od -Zi
  33. JVC_OPT_SWITCHES = -g -x- -nomessage -nologo
  34. !else
  35. DEFINES = -DNDEBUG
  36. CL_OPT_SWITCHES = -Ox
  37. JVC_OPT_SWITCHES = -O
  38. !endif
  39.  
  40. CL_SWITCHES = -W4 -WX -MT -I$(SDK_INC:;= -I) $(CL_OPT_SWITCHES) $(DEFINES)
  41.  
  42. DEST = $(CFG)
  43.  
  44.  
  45. LIBS = user32.lib libcmt.lib kernel32.lib comctl32.lib uuid.lib advapi32.lib ole32.lib shell32.lib
  46.  
  47. OBJS =                      \
  48.     $(DEST)\baseview.obj    \
  49.     $(DEST)\clsview.obj     \
  50.     $(DEST)\gcview.obj      \
  51.     $(DEST)\guids.obj       \
  52.     $(DEST)\heapview.obj    \
  53.     $(DEST)\hpmonmgr.obj    \
  54.     $(DEST)\instview.obj    \
  55.     $(DEST)\main.obj        \
  56.     $(DEST)\objlist.obj     \
  57.     $(DEST)\objview.obj     \
  58.     $(DEST)\obsearch.obj    \
  59.     $(DEST)\refsview.obj    \
  60.     $(DEST)\utf8.obj        \
  61.     $(DEST)\utils.obj
  62.  
  63.  
  64. !if "$(CFG)" == "all"
  65.  
  66. all:
  67.     @echo ----------------------------------------------------------------
  68.     @echo Building debug configuration...
  69.     @nmake CFG=debug
  70.     @echo ----------------------------------------------------------------
  71.     @echo Building release configuration...
  72.     @nmake CFG=release
  73.  
  74. !else
  75.  
  76. all: $(DEST)\$(BASE_NAME).dll 
  77.  
  78. $(DEST):
  79.     @if not exist $(DEST)\nul mkdir $(DEST)
  80.  
  81. $(DEST)\$(BASE_NAME).dll: $(DEST) $(OBJS) $(DEST)\$(BASE_NAME).def $(DEST)\$(BASE_NAME).res
  82.     link /dll /nodefaultlib /def:$(DEST)\$(BASE_NAME).def /debug /pdb:$(DEST)\$(BASE_NAME).pdb /out:$@ $(OBJS) $(LIBS) $(DEST)\$(BASE_NAME).res
  83.  
  84.  
  85. $(OBJS): $(DEST)\heapmon.pch
  86.  
  87. $(DEST)\heapmon.pch: pch.hpp pch.cpp
  88.     cl -Yc -Fp$(DEST)\heapmon.pch $(CL_SWITCHES) /Fd$(DEST)\$(BASE_NAME).pdb /Fo$(DEST)\pch.obj /c pch.cpp
  89.  
  90. .cpp{$(DEST)}.obj:
  91.     @if not exist $(DEST)\nul mkdir $(DEST)
  92.     cl -Yu -Fp$(DEST)\heapmon.pch $(CL_SWITCHES) /Fd$(DEST)\$(BASE_NAME).pdb /Fo$@ /c $<
  93.  
  94. # no pch for guids.c
  95. $(DEST)\guids.obj: $(DEST) guids.c
  96.     cl $(CL_SWITCHES) -W3 /Fd$(DEST)\$(BASE_NAME).pdb /Fo$@ /c guids.c
  97.  
  98. $(DEST)\$(BASE_NAME).def: $(BASE_NAME).def
  99.     cl -EP $(CL_SWITCHES) -Tc$(BASE_NAME).def > $@
  100.  
  101. $(DEST)\$(BASE_NAME).res: $(BASE_NAME).rc
  102.     rc $(DEFINES) -Fo$@ $(BASE_NAME).rc
  103.  
  104.  
  105. clean:
  106.     @if exist debug\nul deltree /y debug
  107.     @if exist release\nul deltree /y release
  108.  
  109. !endif
  110.  
  111.