#===========================================================================;
#
#  WRITEAVI -- Application to create AVI clip
#
#############################################################################
#
#   THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
#   KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
#   IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
#   PURPOSE.
#
#   Copyright (c) 1992, 1993  Microsoft Corporation.  All Rights Reserved.
#
#############################################################################
#
#   to make a NON-DEBUG build, type the following line:
#       nmake DEBUG=NO
#   just typing 'nmake' will build a DEBUG build
#
#   You can also set the environment variable DEBUG to NO
#
#===========================================================================;

NAME	= writeavi
EXENAME	= writeavi.exe
OBJ  	= writeavi.obj
LIBS 	= libw slibcew mmsystem commdlg vfw

!if "$(DEBUG)" == "NO"
COPT =
MOPT =
LOPT =
DEF  =
!else
COPT = -Zi -Fc
MOPT = -Zi -L
LOPT = /CO
DEF  = -DDEBUG
!endif

CC   = cl -c -nologo -AS -G2s -Zp -W3 -Oxwti -I. $(DEF) $(COPT)
RC   = rc $(DEF)
ASM  = masm -Mx -t $(MOPT) $(DEF)
LINK = link $(LOPT)/NOD/NOE/MAP/NOPACKC/AL:16/ONERROR:NOEXE

.c.obj:
	$(CC) $*.c

.asm.obj:
        $(ASM) $*;

.rc.res:
        $(RC) -r $*.rc



#################### Goal ########################

goal: $(EXENAME) $(EXENAME2) $(EXENAME3)

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


$(EXENAME): $(OBJ) $(NAME).res $(NAME).def makefile
        $(LINK) @<<
$(OBJ),
$(EXENAME),
$(NAME),
$(LIBS),
$(NAME).def
<<
        -cvpack -p $(EXENAME)
        -mapsym $(NAME).map
        $(RC) -31 $(NAME).res $(EXENAME)


#################### Clean ######################

clean:
        del $(EXENAME)
        del *.res
        del *.obj
        del *.map
        del *.sym
        del *.cod
        del *.pdb



##################### Copy ######################

copy:
	copy $(EXENAME)		..\..\bin
	copy $(NAME).sym	..\..\bin
