home *** CD-ROM | disk | FTP | other *** search
Makefile | 2000-05-04 | 3.3 KB | 98 lines |
- # ----------------------------------------------------------------------------
- # Standard Microsoft SDK for Java MAKEFILE for Samples
- # ----------------------------------------------------------------------------
-
- # ----------------------------------------------------------------------------
- # Tools
- # ----------------------------------------------------------------------------
-
- CPP=cl.exe
- LINK=link.exe
- RC=rc.exe
-
- # ----------------------------------------------------------------------------
- # Set different switches for different jview
- # ---------------------------------------------------------------------------
-
- CPP_SWITCHES_DEF=/c /nologo /MLd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D_DEBUG /DWIN32 /D_MBCS /Fo"$(OUTDIR)\\" /FD /GZ
- RC_SWITCHES_DEF= /l 0x409
-
- !IF "$(CFG)" == ""
- CFG=JView
- !ENDIF
-
- !IF "$(CFG)" == "JView"
- SWITCHES_EXT = /D_CONSOLE
- !ELSEIF "$(CFG)" == "WJView"
- SWITCHES_EXT = /D_WINDOWS /DNO_CONSOLE
- !ELSEIF "$(CFG)" == "appletviewer"
- SWITCHES_EXT = /D_CONSOLE /DAPPLETVIEWER
- !ELSEIF "$(CFG)" == "PJView"
- SWITCHES_EXT = /D_CONSOLE /DPROFILER_HOOK
- !ELSEIF "$(CFG)" == "PWJView"
- SWITCHES_EXT = /D_WINDOWS /DNO_CONSOLE /DPROFILER_HOOK
- !ELSE
- !ERROR An invalid configuration is specifiled.
- !ENDIF
-
- CPP_SWITCHES = $(CPP_SWITCHES_DEF) $(SWITCHES_EXT)
- RC_SWITCHES = $(RC_SWITCHES_DEF) $(SWITCHES_EXT)
-
-
- # ----------------------------------------------------------------------------
- # Set destination directory.
- # ----------------------------------------------------------------------------
-
- OUTDIR=.\Debug
-
- # ----------------------------------------------------------------------------
- # Set Obj and Lib files.
- # ----------------------------------------------------------------------------
-
- OBJS=$(OUTDIR)\CRESPROP.obj $(OUTDIR)\javaprop.obj $(OUTDIR)\JView.obj $(OUTDIR)\JView.res
-
- LIBS_DEF=kernel32.lib user32.lib ole32.lib oleaut32.lib uuid.lib /nologo /incremental:yes /debug /machine:I386 /pdb:"$(OUTDIR)\$(CFG).pdb" /out:"$(OUTDIR)\$(CFG).exe" /pdbtype:sept
-
- !IF "$(CFG)" == "JView" || "$(CFG)" == "appletviewer" || "$(CFG)" == "PJView"
- LIBS = $(LIBS_DEF) /subsystem:console
- !ELSEIF "$(CFG)" == "WJView" || "$(CFG)" == "PWJView"
- LIBS = $(LIBS_DEF) /subsystem:windows
- !ELSE
- !ERROR An invalid configuration is specifiled.
- !ENDIF
-
- # ----------------------------------------------------------------------------
- # Build the sample.
- # ----------------------------------------------------------------------------
-
- all: clean $(OUTDIR) $(OUTDIR)\JView.exe copyexe
-
- $(OUTDIR)\JView.exe : $(OBJS)
- $(LINK) @<<
- $(OBJS) $(LIBS)
- <<
-
- $(OUTDIR)\CRESPROP.obj : CRESPROP.cpp
- $(CPP) $(CPP_SWITCHES) CRESPROP.cpp
- $(OUTDIR)\javaprop.obj : javaprop.cpp
- $(CPP) $(CPP_SWITCHES) javaprop.cpp
- $(OUTDIR)\JView.obj : JView.cpp
- $(CPP) $(CPP_SWITCHES) JView.cpp
- $(OUTDIR)\JView.res : JView.rc
- $(RC) $(RC_SWITCHES) /fo"$(OUTDIR)\JView.res" JView.rc
-
- "$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
- copyexe:
- if exist $(OUTDIR)/*.exe @copy $(OUTDIR)\*.exe
-
- # ----------------------------------------------------------------------------
- # Clean up the output files.
- # ----------------------------------------------------------------------------
-
- clean:
- if exist *.res del *.res
- if exist *.pdb del *.pdb
- if exist *.idb del *.idb
- if exist $(OUTDIR)\nul @rd /S /Q $(OUTDIR)