##############################################################################
#    Instructions to Make, for compilation of SendMail/SMTP-MTS library
#
#	@(MHWARNING)
# @(#)$Id: sendmail,v 1.1 1995/11/11 03:09:16 H.Ueno Exp $
##############################################################################

# The following entries were inserted during MH configuration
OPTIONS	=	@(MHOPTIONS) -I..

CC	=	@(MHCOMPILER)
@BEGIN: OPTIM
CFLAGS	=	$(OPTIONS)
@END: OPTIM
@BEGIN: DEBUG
CFLAGS	=	$(OPTIONS)
@END: DEBUG
LFLAGS	=	-bhu $(OPTIONS)
CP	=	@(CP)
LN	=	@(LN)

LIB	=	sendmts.a

CFILES	=	hosts.c smail.c
OFILES	=	hosts.o smail.o


@BEGIN: OPTIM
##############################################################################
#	Generation Rules
##############################################################################

.c.o:;		$(CC) $(CFLAGS) -c $*.c
@BEGIN: NEWLOAD
		-ld -x -r $@
		mv a.out $@
@END: NEWLOAD
@BEGIN: OLDLOAD
		${CC} -s -o $@
@END: OLDLOAD


@END: OPTIM
##############################################################################
#	Here it is...
##############################################################################

all:		$(LIB)
lint:		l-sendmts

$(LIB):		$(OFILES)
		-mv $@ z$@
		ar rs $@ $(OFILES)
		-rm -f ../libmts.a
		-cd .. & $(CP) sendmail/$@ libmts.a
		-@ls -l $@
		-@echo "SendMail/SMTP-MTS library built normally"

l-sendmts:;	lint $(LFLAGS) $(CFILES) $(LLIBS)

hosts.o:	Makefile
smail.o:	Makefile smail.h


##############################################################################
#	Miscellaneous tasks
##############################################################################

clean:;	-rm -f *.o $(LIB) z$(LIB) core _*
