####
#makefile - makefile for tibrowse.exe
#
#	Copyright (C) 1992, Microsoft Corporation
#
#Purpose:
#  Builds the OLE 2.0 sample IDispatch server, tibrowse.exe.
#
#
#  Usage: NMAKE			; build with defaults
#     or: NMAKE option		; build with the given option(s)
#     or: NMAKE clean		; erase all compiled files
#
# option: DEBUG=[0|1]		; DEBUG=1 is the default
#
#Notes:
#  This makefile assumes that the PATH, INCLUDE and LIB environment
#  variables are setup properly.
#
##############################################################################


# defaults
#
!if "$(DEBUG)" == ""
DEBUG = 1
!endif


# build variables
#
CC = cl

CFLAGS = -W3 -AM -GA -GEs
LINKFLAGS = /NOD /NOI /BATCH /ONERROR:NOEXE

!if "$(DEBUG)" == "1"
CFLAGS = $(CFLAGS) -Od -Zi -D_DEBUG $(CL)
LINKFLAGS = $(LINKFLAGS) /COD
!else
CFLAGS = $(CFLAGS) -Ox $(CL)
LINKFLAGS = $(LINKFLAGS) /FAR /PACKC
!endif

LIBS = libw mlibcew ole2 compobj ole2disp typelib commdlg

OBJS = \
	tibrowse.obj


# targets
#
goal : setflags tibrowse.exe

setflags :
	set CL=$(CFLAGS)

clean :
	-erase *.obj
	-erase tibrowse.exe
	-erase tibrowse.map
	-erase tibrowse.res


tibrowse.exe : $(OBJS) tibrowse.def tibrowse.res tibrowse.ico
	link $(LINKFLAGS) @<<
$(OBJS),
$@,,
$(LIBS),
tibrowse.def
<<
	rc -k -t tibrowse.res $@

tibrowse.res : tibrowse.rc
	rc -r -fo$@ $?


# dependencies
#
tibrowse.obj : tibrowse.cpp resource.h
	$(CC) -c tibrowse.cpp
