#
# Makefile for GNU e?grep
#
# NT port by Michael Caldwell (mcaldwel@netcom.com).
# 
# Alpha AXP Port by David Hunter (dhunter@amc.pa.dec.com)
#	** Note **
#		You need to insure that the variable "setargv"
#		points to the location of the SDK directory
#		mstools.  This is the only thing you should
#		need to change.
#

!include <ntwin32.mak>

.c.obj:
	$(cc) $(cflags) $(cvars) -DSTDC_HEADERS $*.c


OBJS = alloca.obj dfa.obj regex.obj getopt.obj
GOBJ = grep.obj
EOBJ = egrep.obj
setargv =setargv.obj

all:		grep.exe egrep.exe  clean

grep.exe:	$(OBJS) $(GOBJ)
   $(link) $(conflags) -out:grep.exe $(OBJS) $(GOBJ) $(setargv) $(conlibs)

egrep.exe:	$(OBJS) $(EOBJ)
   $(link) $(conflags) -out:egrep.exe $(OBJS) $(EOBJ) $(setargv) $(conlibs)

egrep.obj:	grep.c
	$(cc) $(cflags) $(cvars) -DEGREP -DSTDC_HEADERS grep.c
	rename grep.obj egrep.obj
#!IF "$(CPU)" == "MIPS"
#	$(cvtobj) $*.obj
#!ENDIF

$(OBJS) $(GOBJ) $(EOBJ):	*.h

clean:
	del *.obj