##############################################################################
#	COPYRIGHT 1986-1991 FTP SOFTWARE, INC.
#
# Makefile for 2.1 examples: COOKIE.EXE and VRFY.EXE
#
# Edit History
#  21-Jul-92  rcq  lib references unqualified (use env variable)
#
##############################################################################

# The distributed COOKIE.EXE is small model.  As an example, it is useful
# to show procedures for building both small and large model.  Other memory
# models are left as an exercise for the reader (see BUILTINS.MAK for more
# information on the way we do it).
SOBJS = cookie.so vrfy.so
LOBJS = cookie.lo vrfy.lo

LIBS =  snetlib.lib spc.lib sconfig.lib
LLIBS = lnetlib.lib lpc.lib lconfig.lib

# Small memory model versions
EXES = cookie.exe vrfy.exe
# Large memory model versions
LEXES = lcookie.exe lvrfy.exe

# Disable stack checking for possible asynch routines.
CFLAGS = -Gs -Ox -W4
# for debugging
#CFLAGS = -Gs -Od -W4 -Zd -Zi

all: cookie.exe vrfy.exe

large: $(LEXES)

cookie.exe: cookie.so
	link cookie.so,,, $(LIBS) /stack:5000;

lcookie.exe: cookie.lo 
	link cookie.lo,lcookie,, $(LLIBS) /stack:5000;

# Basic VRFY uses the standard gethostbyname() routine.
vrfy.exe: vrfy.so
	link vrfy.so,,,ssocket.lib $(LIBS) /stack:4000;

lvrfy.exe: vrfy.lo
	link vrfy.lo,lvrfy,,lsocket.lib $(LLIBS) /stack:4000;

# This VRFY uses the DOMAIN library's gethostbyname() routine.
dvrfy.exe: vrfy.so
	link vrfy.so,dvrfy,,sdomain.lib ssocket.lib $(LIBS) /stack:4000;

clean:
	del *.?o
	del *.map
	del *.cod

cleanall: clean
	del *.exe
