# Generated automatically from Makefile.in by configure.
# Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
# 
# Permission to use, copy, modify, and distribute this material 
# for any purpose and without fee is hereby granted, provided 
# that the above copyright notice and this permission notice 
# appear in all copies, and that the name of Bellcore not be 
# used in advertising or publicity pertaining to this 
# material without the specific, prior written permission 
# of an authorized representative of Bellcore.  BELLCORE 
# MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY 
# OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", 
# WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
#
# Hacked December 1998 by Keith Moore to use Gnu configure
#
# hack to compile with -Bstatic on a sun4 sunos 4.x box
# XXX needs to be integrated with gnu configure -km
#
FOOBAR-sun4=-Bstatic
STATICFLAG=FOOBAR${HOST_ARCH}
CFLAGS = -g -O2 -I. ${$(STATICFLAG)} 
LDLIBS = 
CONFIGDIR = ..
LOCALCFLAGS= -I${CONFIGDIR} ${CFLAGS}
prefix=/usr/local
exec_prefix=${prefix}
BINDIR=${exec_prefix}/bin
RM=rm -f
SHELL=/bin/sh
OBJS=metamail mmencode mailto splitmail

.c.o:
	${RM} $@
	$(CC) -c  $(LOCALCFLAGS) $*.c

all: ${OBJS}

codes.o:  codes.c ../config.h

mailto.o: mailto.c ../config.h

metamail.o: metamail.c ../config.h

shared.o:  shared.c ../config.h

splitmail.o:  shared.c ../config.h

mmencode: mmencode.o codes.o
	${RM} mmencode
	$(CC) $(LOCALCFLAGS) -o mmencode  mmencode.o  codes.o $(LDLIBS)

mailto: mailto.o codes.o shared.o
	${RM} mailto
	$(CC) $(LOCALCFLAGS) -o mailto  mailto.o  codes.o shared.o -ltermcap $(LDLIBS)

splitmail: splitmail.o shared.o
	${RM} splitmail
	$(CC) $(LOCALCFLAGS) -o splitmail  splitmail.o shared.o $(LDLIBS)

metamail:  metamail.o codes.o uue.o shared.o putenv.o
	${RM} metamail
	$(CC) $(LOCALCFLAGS) -o metamail  metamail.o  putenv.o codes.o uue.o shared.o $(LDLIBS)

clean:
	${RM} metamail mmencode mailto splitmail *.o *.BAK

distclean: clean
	${RM} Makefile

install: all
	@for obj in ${OBJS}; do \
		echo ${RM} ${BINDIR}/$$obj ;\
		echo cp $$obj ${BINDIR}/$$obj ; \
		echo chmod 755 ${BINDIR}/$$obj ; \
	done | ${SHELL} -x
