# ============================================================================
# File: M A K E F I L E
#
# NMAKE description file for the DEBUG HANDLER sample
#
# This is a part of the Microsoft OLE 2.0 sample library.
# Copyright (C) Microsoft Corporation, 1992-1993.  All Rights Reserved.
# ============================================================================
#
# Usage:    NMAKE           (build DEBUG DLL)
#           NMAKE DEBUG=0   (build RELEASE DLL)
#
# ============================================================================

DEBUG=1
GOAL: dbghndlr.dll

PCH=stdafx.h

SRCS=stdafx.cpp dbghndlr.cpp object.cpp classfct.cpp cdebug.cpp utils.cpp

INCS=stdafx.h dbghndlr.h object.h classfct.h cdebug.h utils.h

OBJS=$(SRCS:cpp=obj)

#############################################################################

G_LIBS=ole2 compobj storage libw commdlg shell

G_CPPFLAGS=/ALw /GD /GEd /W3 /Zp /G2 /Yu$(PCH) /D_USRDLL
D_CPPFLAGS=/Zi /Od /f /D_DEBUG
R_CPPFLAGS=/O1 /Gs
G_LINKFLAGS=/NOD /ONERROR:NOEXE /NOE /BATCH
D_LINKFLAGS=/COD
R_LINKFLAGS=/NOFAR /PACKC
D_LIBS=lafxdwd ldllcew
R_LIBS=lafxdw ldllcew

!if "$(DEBUG)"=="0"
CPPFLAGS=$(G_CPPFLAGS) $(R_CPPFLAGS)
LINKFLAGS=$(G_LINKFLAGS) $(R_LINKFLAGS)
LIBS=$(R_LIBS) $(G_LIBS)
!else
CPPFLAGS=$(G_CPPFLAGS) $(D_CPPFLAGS)
LINKFLAGS=$(G_LINKFLAGS) $(D_LINKFLAGS)
LIBS=$(D_LIBS) $(G_LIBS)
!endif #//DEBUG

#############################################################################

stdafx.obj: stdafx.cpp $(INCS)
	nmake clean
	cl $(CPPFLAGS) /Yc$(PCH) -c stdafx.cpp

.cpp.obj:
	$(CPP) @<<
$(CPPFLAGS) /c $<
<<

dbghndlr.dll: $(OBJS) dbghndlr.res dbghndlr.def
	link $(LINKFLAGS) @<<
$(OBJS: = +^
),
dbghndlr.dll,
dbghndlr.MAP/MAP,
$(LIBS),
dbghndlr.def;
<<
	rc /k /t dbghndlr.res dbghndlr.dll

#############################################################################

clean:
	if exist *.pch erase *.pch
	if exist *.obj erase *.obj
	if exist *.sbr erase *.sbr
	if exist *.pdb erase *.pdb
	if exist *.map erase *.map
	if exist *.res erase *.res
	if exist *.aps erase *.aps
	if exist *.bsc erase *.bsc
	if exist *.wsp erase *.wsp
	if exist *.vcw erase *.vcw

#############################################################################
