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

  1. ###############################################################################
  2. #
  3. #  (C) Copyright 1995 - 1999 Microsoft Corporation.  All rights reserved.
  4. #  All Rights Reserved.
  5. #
  6. #  Sample JVIEW profiler hook DLL makefile
  7. #
  8. ###############################################################################
  9.  
  10.  
  11. BASE_NAME = jviewprf
  12.  
  13. SDK_ROOT = ..\..\..
  14. SDK_INC = $(SDK_ROOT)\Include;$(SDK_ROOT)\Samples\native\JView
  15. SDK_LIB = $(SDK_ROOT)\Lib\i386
  16.  
  17. !if "$(CFG)" == ""
  18. CFG = debug
  19. !endif
  20.  
  21. !if "$(CFG)" != "debug" && "$(CFG)" != "release" && "$(CFG)" != "all"
  22. !error Invalid build configuration "$(CFG)".  Must be "debug", "release", or "all".
  23. !endif
  24.  
  25. !if "$(CFG)" == "debug"
  26. DEFINES = -DDEBUG
  27. CL_OPT_SWITCHES = -Od -Zi
  28. JVC_OPT_SWITCHES = -g -x- -nomessage -nologo
  29. !else
  30. DEFINES = -DNDEBUG
  31. CL_OPT_SWITCHES = -Ox
  32. JVC_OPT_SWITCHES = -O
  33. !endif
  34.  
  35. CL_SWITCHES = -W3 -WX -MT -I$(SDK_INC:;= -I) $(CL_OPT_SWITCHES) $(DEFINES)
  36.  
  37. DEST = $(CFG)
  38.  
  39. LIBS = kernel32.lib ole32.lib uuid.lib user32.lib libcmt.lib
  40.  
  41. OBJS =                      \
  42.     $(DEST)\allocprf.obj    \
  43.     $(DEST)\callprof.obj    \
  44.     $(DEST)\calltrac.obj    \
  45.     $(DEST)\dllmain.obj     \
  46.     $(DEST)\gcprof.obj      \
  47.     $(DEST)\guids.obj       \
  48.     $(DEST)\main.obj        \
  49.     $(DEST)\sampler.obj     \
  50.     $(DEST)\timer.obj       \
  51.     $(DEST)\utils.obj
  52.  
  53.  
  54. !if "$(CFG)" == "all"
  55.  
  56. all:
  57.     @echo ----------------------------------------------------------------
  58.     @echo Building debug configuration...
  59.     @nmake CFG=debug
  60.     @echo ----------------------------------------------------------------
  61.     @echo Building release configuration...
  62.     @nmake CFG=release
  63.  
  64. !else
  65.  
  66. all: $(DEST)\$(BASE_NAME).dll 
  67.  
  68. $(DEST):
  69.     @if not exist $(DEST)\nul mkdir $(DEST)
  70.  
  71. $(DEST)\$(BASE_NAME).dll: $(DEST) $(OBJS) $(DEST)\$(BASE_NAME).def $(DEST)\$(BASE_NAME).res
  72.     link /dll /nodefaultlib /def:$(DEST)\$(BASE_NAME).def /debug /pdb:$(DEST)\$(BASE_NAME).pdb /out:$@ $(OBJS) $(LIBS) $(DEST)\$(BASE_NAME).res
  73.  
  74.  
  75. .cpp{$(DEST)}.obj:
  76.     @if not exist $(DEST)\nul mkdir $(DEST)
  77.     cl /YX $(CL_SWITCHES) /Fd$(DEST)\$(BASE_NAME).pdb /Fo$@ /c $<
  78.  
  79. $(DEST)\guids.obj: $(DEST) guids.cpp
  80.     cl $(CL_SWITCHES) /Fd$(DEST)\$(BASE_NAME).pdb /Fo$@ /c guids.cpp
  81.  
  82. $(DEST)\$(BASE_NAME).def: $(BASE_NAME).def
  83.     cl -EP $(CL_SWITCHES) -Tc$(BASE_NAME).def > $@
  84.  
  85. $(DEST)\$(BASE_NAME).res: $(BASE_NAME).rc $(DEST)\classes.dat
  86.     rc $(DEFINES) -DDEST=$(DEST) -Fo$@ $(BASE_NAME).rc
  87.  
  88. $(DEST)\classes.dat: $(DEST)\classes\com\ms\samples\jviewprf\JVIEWProfiler.class
  89.     jexegen -raw -out:$@ -base:$(DEST)\classes com\ms\samples\jviewprf\JVIEWProfiler.class
  90.  
  91. $(DEST)\classes\com\ms\samples\jviewprf\JVIEWProfiler.class: JVIEWProfiler.java
  92.     @if not exist $(DEST)\nul mkdir $(DEST)
  93.     @if not exist $(DEST)\classes\nul mkdir $(DEST)\classes
  94.     jvc  -x- -nomessage -d $(DEST)\classes JVIEWProfiler.java
  95.  
  96.  
  97. clean:
  98.     @if exist debug\nul deltree /y debug
  99.     @if exist release\nul deltree /y release
  100.  
  101. !endif
  102.  
  103.