LIBNAME=	libc
#
# ZMailer routines destined for the system C library
#
SHELL=		/bin/sh
CC=		cc # gcc -Wall -pedantic
COPTS=		-g
DEFS=
RANLIB=		ranlib # : ar does the work of ranlib under System V
LIBC_INCL=	
#
INCL=		-I../include
CFLAGS=		$(COPTS) $(DEFS) $(INCL) $(LIBC_INCL)
#
# If you are on a Xenix or other SVR3-based system, add the "setreuid" module:
OBJS	= mail.o mail_alloc.o mail_host.o fullname.o getopt.o myhostname.o \
	getzenv.o bcopy.o setvbuf.o strchr.o siglist.o strerror.o
SOURCE	= mail.c mail_alloc.c mail_host.c fullname.c getopt.c myhostname.c \
	getzenv.c bcopy.c setvbuf.c strchr.c siglist.c strerror.c

$(LIBNAME).a:	$(SOURCE)
	$(CC) $(CFLAGS) -c $?
	ar rv $@ *.o
	-rm -f *.o
	$(RANLIB) $@

lintlib:	llib-l$(LIBNAME).ln

llib-l$(LIBNAME).ln:	$(SOURCE)
	lint $(INCL) -o $(LIBNAME) $(LIBC_INCL) *.c

lint:
	lint $(DEFS) $(INCL) $(LIBC_INCL) $(SOURCE)

clean:
	-rm -f $(LIBNAME).a make.log Makefile.bak
	-rm -f *.o *.out *.ln

depend:
	../bin/mklibdep $(CFLAGS) $(SOURCE)

# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.

mail.c: ../include/mail.h
	@touch $@
myhostname.c: ../include/libsupport.h
	@touch $@
getzenv.c: ../include/mail.h
	@touch $@
bcopy.c: ../include/libsupport.h
	@touch $@

# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
