# How many arguments can your execv() call take at once? This can be a
# conservative estimate. It determines the maximum number of
# recipients at a time that MAIL_AGENT will be invoked with by
# smtpfwdd. 
# N.B. MAXARGS must be at least 6, or 5 if SENDMAIL_OITRUE is 1.
# You may wish to change this to be 6 if you want your sendmail to be
# invoked seperately for each receipient.  
MAXARGS = 100

# LD_LIBS=-lresolv  # you may or may not need this.
OPTIONS = -DMAXARGS=$(MAXARGS) 

GMKPATH = ..
include $(GMKPATH)/Makefile.config

CFLAGS = -I.. -I../nlib $(OPTIONS) $(COPT) -I$(DBM_INCDIR) 
LDFLAGS = $(LDFL) -L.. -lfwall $(AUXLIB) $(LD_LIBS) $(DBMLIB)

BINOBJS = smtpd smtpfwdd
MANOBJS = smtpd.8 smtpfwdd.8
SGWOBJS = smtpd.o accumlog.o nospam.o
SWDOBJS = smtpfwdd.o accumlog.o
ALLOBJS = $(SGWOBJS) $(SWDOBJS) $(BINOBJS) $(MANOBJS)

all: $(ALLOBJS)

smtpd: $(SGWOBJS) ../libfwall.a 
	$(OFWTKLINK) $(SGWOBJS)

smtpfwdd: $(SWDOBJS)
	$(OFWTKLINK) $(SWDOBJS)
