home *** CD-ROM | disk | FTP | other *** search
Makefile | 2000-05-04 | 3.0 KB | 103 lines |
- ###############################################################################
- #
- # (C) Copyright 1995 - 1999 Microsoft Corporation. All rights reserved.
- # All Rights Reserved.
- #
- # Sample JVIEW profiler hook DLL makefile
- #
- ###############################################################################
-
-
- BASE_NAME = jviewprf
-
- SDK_ROOT = ..\..\..
- SDK_INC = $(SDK_ROOT)\Include;$(SDK_ROOT)\Samples\native\JView
- SDK_LIB = $(SDK_ROOT)\Lib\i386
-
- !if "$(CFG)" == ""
- CFG = debug
- !endif
-
- !if "$(CFG)" != "debug" && "$(CFG)" != "release" && "$(CFG)" != "all"
- !error Invalid build configuration "$(CFG)". Must be "debug", "release", or "all".
- !endif
-
- !if "$(CFG)" == "debug"
- DEFINES = -DDEBUG
- CL_OPT_SWITCHES = -Od -Zi
- JVC_OPT_SWITCHES = -g -x- -nomessage -nologo
- !else
- DEFINES = -DNDEBUG
- CL_OPT_SWITCHES = -Ox
- JVC_OPT_SWITCHES = -O
- !endif
-
- CL_SWITCHES = -W3 -WX -MT -I$(SDK_INC:;= -I) $(CL_OPT_SWITCHES) $(DEFINES)
-
- DEST = $(CFG)
-
- LIBS = kernel32.lib ole32.lib uuid.lib user32.lib libcmt.lib
-
- OBJS = \
- $(DEST)\allocprf.obj \
- $(DEST)\callprof.obj \
- $(DEST)\calltrac.obj \
- $(DEST)\dllmain.obj \
- $(DEST)\gcprof.obj \
- $(DEST)\guids.obj \
- $(DEST)\main.obj \
- $(DEST)\sampler.obj \
- $(DEST)\timer.obj \
- $(DEST)\utils.obj
-
-
- !if "$(CFG)" == "all"
-
- all:
- @echo ----------------------------------------------------------------
- @echo Building debug configuration...
- @nmake CFG=debug
- @echo ----------------------------------------------------------------
- @echo Building release configuration...
- @nmake CFG=release
-
- !else
-
- all: $(DEST)\$(BASE_NAME).dll
-
- $(DEST):
- @if not exist $(DEST)\nul mkdir $(DEST)
-
- $(DEST)\$(BASE_NAME).dll: $(DEST) $(OBJS) $(DEST)\$(BASE_NAME).def $(DEST)\$(BASE_NAME).res
- link /dll /nodefaultlib /def:$(DEST)\$(BASE_NAME).def /debug /pdb:$(DEST)\$(BASE_NAME).pdb /out:$@ $(OBJS) $(LIBS) $(DEST)\$(BASE_NAME).res
-
-
- .cpp{$(DEST)}.obj:
- @if not exist $(DEST)\nul mkdir $(DEST)
- cl /YX $(CL_SWITCHES) /Fd$(DEST)\$(BASE_NAME).pdb /Fo$@ /c $<
-
- $(DEST)\guids.obj: $(DEST) guids.cpp
- cl $(CL_SWITCHES) /Fd$(DEST)\$(BASE_NAME).pdb /Fo$@ /c guids.cpp
-
- $(DEST)\$(BASE_NAME).def: $(BASE_NAME).def
- cl -EP $(CL_SWITCHES) -Tc$(BASE_NAME).def > $@
-
- $(DEST)\$(BASE_NAME).res: $(BASE_NAME).rc $(DEST)\classes.dat
- rc $(DEFINES) -DDEST=$(DEST) -Fo$@ $(BASE_NAME).rc
-
- $(DEST)\classes.dat: $(DEST)\classes\com\ms\samples\jviewprf\JVIEWProfiler.class
- jexegen -raw -out:$@ -base:$(DEST)\classes com\ms\samples\jviewprf\JVIEWProfiler.class
-
- $(DEST)\classes\com\ms\samples\jviewprf\JVIEWProfiler.class: JVIEWProfiler.java
- @if not exist $(DEST)\nul mkdir $(DEST)
- @if not exist $(DEST)\classes\nul mkdir $(DEST)\classes
- jvc -x- -nomessage -d $(DEST)\classes JVIEWProfiler.java
-
-
- clean:
- @if exist debug\nul deltree /y debug
- @if exist release\nul deltree /y release
-
- !endif
-
-