home *** CD-ROM | disk | FTP | other *** search
/ Enter 1999 November / ENTER11_1.bin / WARSZTAT / SDKJava32.exe / data1.cab / fg_Samples / Samples / Profiler / jviewprf / makefile < prev    next >
Encoding:
Makefile  |  1999-03-17  |  3.3 KB  |  106 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 = -I$(SDK_INC:;= -I) $(CL_OPT_SWITCHES) $(DEFINES)
  36.  
  37. DEST = $(CFG)
  38.  
  39. LIBS = kernel32.lib ole32.lib uuid.lib libcmt.lib oldnames.lib user32.lib
  40.  
  41. OBJS =                      \
  42.     $(DEST)\allocprf.obj    \
  43.     $(DEST)\callprof.obj    \
  44.     $(DEST)\calltrac.obj    \
  45.     $(DEST)\gcprof.obj      \
  46.     $(DEST)\guids.obj       \
  47.     $(DEST)\main.obj        \
  48.     $(DEST)\sampler.obj     \
  49.     $(DEST)\timer.obj       \
  50.     $(DEST)\utils.obj
  51.  
  52.  
  53. !if "$(CFG)" == "all"
  54.  
  55. all:
  56.     @echo ----------------------------------------------------------------
  57.     @echo Building debug configuration...
  58.     @nmake CFG=debug
  59.     @echo ----------------------------------------------------------------
  60.     @echo Building release configuration...
  61.     @nmake CFG=release
  62.  
  63. !else
  64.  
  65. all: $(DEST)\$(BASE_NAME).dll 
  66.  
  67. $(DEST):
  68.     @if not exist $(DEST)\nul mkdir $(DEST)
  69.  
  70. $(DEST)\$(BASE_NAME).dll: $(DEST) $(OBJS) $(DEST)\$(BASE_NAME).def $(DEST)\$(BASE_NAME).res
  71.     link /dll /nodefaultlib /def:$(DEST)\$(BASE_NAME).def /debug /pdb:$(DEST)\$(BASE_NAME).pdb /out:$@ $(OBJS) $(LIBS) $(DEST)\$(BASE_NAME).res
  72.  
  73.  
  74. .cpp{$(DEST)}.obj:
  75.     @if not exist $(DEST)\nul mkdir $(DEST)
  76.     cl /YX $(CL_SWITCHES) /Fd$(DEST)\$(BASE_NAME).pdb /Fo$@ /c $<
  77.  
  78. $(DEST)\guids.obj: $(DEST) guids.cpp
  79.     cl $(CL_SWITCHES) /Fd$(DEST)\$(BASE_NAME).pdb /Fo$@ /c guids.cpp
  80.  
  81. $(DEST)\$(BASE_NAME).def: $(BASE_NAME).def
  82.     cl -EP $(CL_SWITCHES) -Tc$(BASE_NAME).def > $@
  83.  
  84. $(DEST)\$(BASE_NAME).res: $(BASE_NAME).rc $(DEST)\classes.dat
  85.     rc $(DEFINES) -Fo$@ $(BASE_NAME).rc
  86.  
  87. $(DEST)\classes.dat: $(DEST)\classes\com\ms\samples\jviewprf\JVIEWProfiler.class
  88.     jexegen -raw -out:$@ -base:$(DEST)\classes com\ms\samples\jviewprf\JVIEWProfiler.class
  89.  
  90. $(DEST)\classes\com\ms\samples\jviewprf\JVIEWProfiler.class: JVIEWProfiler.java
  91.     @if not exist $(DEST)\nul mkdir $(DEST)
  92.     @if not exist $(DEST)\classes\nul mkdir $(DEST)\classes
  93.     @if not exist $(DEST)\classes\com\nul mkdir $(DEST)\classes\com
  94.     @if not exist $(DEST)\classes\com\ms\nul mkdir $(DEST)\classes\com\ms
  95.     @if not exist $(DEST)\classes\com\ms\samples\nul mkdir $(DEST)\classes\com\ms\samples
  96.     @if not exist $(DEST)\classes\com\ms\samples\jviewprf\nul mkdir $(DEST)\classes\com\ms\samples\jviewprf
  97.     jvc  -x- -nomessage -d $(DEST)\classes JVIEWProfiler.java
  98.  
  99.  
  100. clean:
  101.     @if exist debug\nul deltree /y debug
  102.     @if exist release\nul deltree /y release
  103.  
  104. !endif
  105.  
  106.