##************************************************************************
##**
##**  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) 1993, 1994 Microsoft Corporation. All Rights Reserved.
##**
##**  makefile
##**
##**  HISTORY:
##**     04/26/93       created.
##**
##**------------------------------------------------------------------------;
##**
##**   Command line examples are:
##**
##**       c:\path>nmake               ; builds default output (debug)
##**       c:\path>nmake DEBUG=NO      ; builds non-debug output
##**       c:\path>nmake DEBUG=YES     ; builds debug output
##**
##**   The default is DEBUG=YES. You can set the DEBUG environment variable
##**   to either YES or NO if you want to change the default output type.
##**
##************************************************************************

NAME	=reverse
EXT	=exe
GOALS	=$(NAME).$(EXT) $(NAME).sym
LIBS	=libw slibcew mmsystem
OBJS	=$(NAME).obj

!if "$(DEBUG)" == "NO"

LOPT	=
COPT	=
AOPT	=

!else

LOPT	=/CO /LI
COPT	=-Zid -Fc -DDEBUG
AOPT	=-Zi -DDEBUG
ROPT	=-v -DDEBUG

!endif

CC	=cl -nologo -c -W3 -AS -GA3s -Ox -Z7p $(COPT)
LINK	=link /NOLOGO /MAP/NOE/NOD/AL:16 $(LOPT)
ASM	=ml -nologo -c $(AOPT)
RC	=rc -nologo $(ROPT)


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

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

#
#  Explicit Rules
#

goal: $(GOALS)

$(NAME).$(EXT) $(NAME).map: $(OBJS) $*.res $*.def
	$(LINK) @<<
	$(OBJS),
	$*.$(EXT),
	$*.map,
	$(LIBS),
	$*.def
<<
	$(RC) $*.res $*.$(EXT)

$(NAME).sym:	$*.map
	mapsym -s $*.map

#
#  Dependencies
#
reverse.obj: $*.c

reverse.res: $*.rc $*.ico $*.h $*.rcv

#
#  Clean up
#

clean:
            -@del *.obj
            -@del *.cod
            -@del $(NAME).$(EXT)
            -@del $(NAME).res
            -@del $(NAME).map
            -@del $(NAME).sym
