# Generated automatically from Makefile.in by configure.
# This is the Makefile for Taylor UUCP
#
# The file Makefile.in should be processed by configure to generate
# Makefile.  If you want to generate Makefile by hand, you must find
# all variables surrounded by @ and replace them with the correct
# value (e.g. gcc -O must be replaced by something like cc or gcc).
#
# Once you have done that, you should check the definitions at the top
# of this file to make sure that they are reasonable for your system.

# Prefix directory for installation directories.
prefix = /usr

# The user name that should own the resulting executables, several of
# which are suid.
owner = uucp

# Where to install uucico and uuxqt, and where to read configuration files
# from by default.  If you use this definition, $(prefix)/lib must exist.
libdir = $(prefix)/lib/uucp

# Where to install uucp, uux, uuchk, uustat, uuname and uulog.
bindir = $(prefix)/bin

# Where to install man pages.  Section 1 for user programs, 8 for daemons.
man1dir = $(prefix)/man/man1
man1ext = .1
man8dir = $(prefix)/man/man8
man8ext = .8

# Where to install the info files.
infodir = $(prefix)/emacs/info

# The directory to look in for new style configuration files (when
# using HAVE_TAYLOR_CONFIG).
newconfigdir = $(libdir)

# The directory to look in for BNU (when using HAVE_BNU_CONFIG) or
# V2 (when using HAVE_V2_CONFIG) style configuration files.
oldconfigdir = /usr/lib/uucp

# If you don't want to compile tstuu, which requires BSD style ptys
# and the Taylor configuration files, comment out the following line
# The tstuu program is only used to test the package; it is described
# further in the documentation.
TSTUU = tstuu

#
# The next few lines are set up by the configuration script.  You may
# want to look them over.
#

# If you do not have the mkdir system call, undefine the following three
# lines.  This will install uudir as an suid root program.  This is
# necessary because invoking /bin/mkdir from an suid program will
# leave the directories owned by the wrong user.
# UUDIR = uudir
# uudirdir = $(libdir)/util
# UUDIRFLAGS = -DUUDIR_PROGRAM=\"$(uudirdir)/$(UUDIR)\"

# Define programs and flags
CC = gcc
#
# make with DEBUG=2 for everything except uux* executables (sigh)
#
# make with DEBUG=2, touch policy.h, make with DEBUG=0, then
# do a "make install"
#
#CFLAGS = -DDEBUG=2 -s -Wall -Wshadow -Wwrite-strings -O3
CFLAGS = -Wall -Wshadow -Wwrite-strings -O6
LIBS = 
ALLOCA = 

INSTALL = cp
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = cp

#
# Nothing else to configure
#

SHELL = /bin/sh

VERSION = beta1.03

CONFIG = -DLIBDIR=\"$(libdir)\" -DNEWCONFIGLIB=\"$(newconfigdir)\" -DOLDCONFIGLIB=\"$(oldconfigdir)\" $(UUDIRFLAGS)

PROGRAMS = uucico uuxqt uux uucp uuchk uustat uuname uulog

UUOBJS = uucico.o prot.o protg.o protf.o prott.o prote.o config.o v2.o bnu.o \
	file.o util.o sysinf.o prtinf.o time.o log.o chat.o port.o tcp.o \
	parse.o copy.o sys1.o sys2.o sys3.o sys4.o version.o getopt.o \
	protz.o $(ALLOCA)
XQTOBJS = uuxqt.o config.o v2.o bnu.o util.o sysinf.o prtinf.o log.o \
	copy.o sys1.o sys3.o sys5.o version.o getopt.o $(ALLOCA)
UUXOBJS = uux.o config.o v2.o bnu.o util.o sysinf.o prtinf.o log.o \
	copy.o sys1.o sys3.o sys6.o version.o getopt.o $(ALLOCA)
UUCPOBJS = uucp.o config.o v2.o bnu.o util.o sysinf.o prtinf.o log.o \
	copy.o sys1.o sys3.o sys6.o version.o getopt.o $(ALLOCA)
UUCHKOBJS = uuchk.o config.o v2.o bnu.o util.o sysinf.o prtinf.o time.o \
	log.o sys1.o version.o getopt.o $(ALLOCA)
UUSTATOBJS = uustat.o config.o v2.o bnu.o util.o sysinf.o prtinf.o \
	log.o parse.o copy.o sys1.o sys3.o sys4.o sys5.o sys7.o version.o \
	getopt.o $(ALLOCA)
UUNAMEOBJS = uuname.o config.o v2.o bnu.o util.o sysinf.o prtinf.o \
	log.o sys1.o version.o getopt.o $(ALLOCA)
UULOGOBJS = uulog.o config.o v2.o bnu.o util.o sysinf.o prtinf.o \
	log.o sys1.o version.o getopt.o $(ALLOCA)
TSTOBJS = tstuu.o version.o getopt.o $(ALLOCA)

ALLOBJS = uucico.o uuxqt.o uux.o uucp.o uuchk.o uustat.o uuname.o uulog.o \
	uudir.o tstuu.o prot.o protg.o protf.o prott.o prote.o config.o v2.o \
	bnu.o file.o util.o sysinf.o prtinf.o time.o log.o chat.o port.o \
	tcp.o parse.o copy.o sys1.o sys2.o sys3.o sys4.o sys5.o sys6.o \
	sys7.o version.o getopt.o protz.o

all: $(PROGRAMS) $(TSTUU) $(UUDIR)

install: # $(PROGRAMS) uucp.info $(UUDIR)
	-mkdir $(libdir) $(bindir)
	-ln $(libdir)/uucico $(libdir)/uucico.old
	-ln $(libdir)/uuxqt $(libdir)/uuxqt.old
	rm -f $(libdir)/uucico $(libdir)/uuxqt
	$(INSTALL_PROGRAM) uucico $(libdir)/uucico
	$(INSTALL_PROGRAM) uuxqt $(libdir)/uuxqt
	$(INSTALL_PROGRAM) uuchk $(libdir)/uuchk
	chown $(owner) $(libdir)/uucico $(libdir)/uuxqt $(libdir)/uuchk
	chmod 4555 $(libdir)/uucico $(libdir)/uuxqt
	-if test "$(UUDIR)X" != "X"; then if test ! -d $(uudirdir); then mkdir $(uudirdir); fi; chown $(owner) $(uudirdir); chmod 100 $(uudirdir); $(INSTALL_PROGRAM) uudir $(uudirdir)/uudir; chown root $(uudirdir)/uudir; chmod 4555 $(uudirdir)/uudir; else true; fi
	-ln $(bindir)/uux $(bindir)/uux.old
	-ln $(bindir)/uucp $(bindir)/uucp.old
	-ln $(bindir)/uustat $(bindir)/uustat.old
	-ln $(bindir)/uuname $(bindir)/uuname.old
	-ln $(bindir)/uulog $(bindir)/uulog.old
	rm -f $(bindir)/uux $(bindir)/uucp $(bindir)/uustat 
	rm -f $(bindir)/uuname $(bindir)/uulog
	$(INSTALL_PROGRAM) uux $(bindir)/uux
	$(INSTALL_PROGRAM) uucp $(bindir)/uucp
	$(INSTALL_PROGRAM) uustat $(bindir)/uustat
	$(INSTALL_PROGRAM) uuname $(bindir)/uuname
	$(INSTALL_PROGRAM) uulog $(bindir)/uulog
	chown $(owner) $(bindir)/uux $(bindir)/uucp $(bindir)/uustat 
	chown $(owner) $(bindir)/uuname
	chmod 4555 $(bindir)/uux $(bindir)/uucp $(bindir)/uustat 
	chmod 4555 $(bindir)/uuname
	$(INSTALL_DATA) uucico.8 $(man8dir)/uucico$(man8ext)
	$(INSTALL_DATA) uuxqt.8 $(man8dir)/uuxqt$(man8ext)
	$(INSTALL_DATA) uux.1 $(man1dir)/uux$(man1ext)
	$(INSTALL_DATA) uucp.1 $(man1dir)/uucp$(man1ext)
	-$(INSTALL_DATA) uucp.info $(infodir)/uucp.info
	-$(INSTALL_DATA) uucp.info-1 $(infodir)/uucp.info-1
	-$(INSTALL_DATA) uucp.info-2 $(infodir)/uucp.info-2
	-$(INSTALL_DATA) uucp.info-3 $(infodir)/uucp.info-3

uninstall:
	rm -f $(libdir)/uucico $(libdir)/uuxqt
	cp $(libdir)/uucico.old $(libdir)/uucico
	cp $(libdir)/uuxqt.old $(libdir)/uuxqt
	rm -f $(bindir)/uux $(bindir)/uucp
	cp $(bindir)/uux.old $(bindir)/uux
	cp $(bindir)/uucp.old $(bindir)/uucp

uucico: $(UUOBJS)
	$(CC) $(CFLAGS) -o uucico $(UUOBJS) $(LIBS)

uuxqt: $(XQTOBJS)
	$(CC) $(CFLAGS) -o uuxqt $(XQTOBJS) $(LIBS)

uux: $(UUXOBJS)
	$(CC) $(CFLAGS) -o uux $(UUXOBJS) $(LIBS)

uucp: $(UUCPOBJS)
	$(CC) $(CFLAGS) -o uucp $(UUCPOBJS) $(LIBS)

uuchk: $(UUCHKOBJS)
	$(CC) $(CFLAGS) -o uuchk $(UUCHKOBJS) $(LIBS)

uustat: $(UUSTATOBJS)
	$(CC) $(CFLAGS) -o uustat $(UUSTATOBJS) $(LIBS)

uuname: $(UUNAMEOBJS)
	$(CC) $(CFLAGS) -o uuname $(UUNAMEOBJS) $(LIBS)

uulog: $(UULOGOBJS)
	$(CC) $(CFLAGS) -o uulog $(UULOGOBJS) $(LIBS)

tstuu: $(TSTOBJS)
	$(CC) $(CFLAGS) -o tstuu $(TSTOBJS) $(LIBS)

uudir: uudir.o
	$(CC) $(CFLAGS) -o uudir uudir.o $(LIBS)

uucico.o: uucico.c
	$(CC) -c $(CFLAGS) $(CONFIG) uucico.c
uuxqt.o: uuxqt.c
	$(CC) -c $(CFLAGS) $(CONFIG) uuxqt.c
uux.o: uux.c
	$(CC) -c $(CFLAGS) $(CONFIG) uux.c
uucp.o: uucp.c
	$(CC) -c $(CFLAGS) $(CONFIG) uucp.c
uuchk.o: uuchk.c
	$(CC) -c $(CFLAGS) $(CONFIG) uuchk.c
uustat.o: uustat.c
	$(CC) -c $(CFLAGS) $(CONFIG) uustat.c
uuname.o: uuname.c
	$(CC) -c $(CFLAGS) $(CONFIG) uuname.c
uulog.o: uulog.c
	$(CC) -c $(CFLAGS) $(CONFIG) uulog.c
config.o: config.c
	$(CC) -c $(CFLAGS) $(CONFIG) config.c
v2.o: v2.c
	$(CC) -c $(CFLAGS) $(CONFIG) v2.c
bnu.o: bnu.c
	$(CC) -c $(CFLAGS) $(CONFIG) bnu.c
sysinf.o: sysinf.c
	$(CC) -c $(CFLAGS) $(CONFIG) sysinf.c
prtinf.o: prtinf.c
	$(CC) -c $(CFLAGS) $(CONFIG) prtinf.c
sys1.o: sys1.c
	$(CC) -c $(CFLAGS) $(CONFIG) -DOWNER=\"$(owner)\" sys1.c
uudir.o: uudir.c
	$(CC) -c $(CFLAGS) $(CONFIG) -DOWNER=\"$(owner)\" uudir.c

sysdep.h: sysh.unx
	rm -f sysdep.h
	ln sysh.unx sysdep.h
sys1.c: sys1.unx
	rm -f sys1.c
	ln sys1.unx sys1.c
sys2.c: sys2.unx
	rm -f sys2.c
	ln sys2.unx sys2.c
sys3.c: sys3.unx
	rm -f sys3.c
	ln sys3.unx sys3.c
sys4.c: sys4.unx
	rm -f sys4.c
	ln sys4.unx sys4.c
sys5.c: sys5.unx
	rm -f sys5.c
	ln sys5.unx sys5.c
sys6.c: sys6.unx
	rm -f sys6.c
	ln sys6.unx sys6.c
sys7.c: sys7.unx
	rm -f sys7.c
	ln sys7.unx sys7.c

clean:
	rm -f $(ALLOBJS) $(PROGRAMS) sys?.c sysdep.h
	rm -f uucp-$(VERSION).tar.Z
	rm -rf uucp-$(VERSION)

# The distribution targets are mostly for my own use; they are not
# expected to work on other systems.

dist: uucp.info conf.h-dist
	-rm -rf uucp-$(VERSION)
	-rm -f taylor-uucp-$(VERSION).tar taylor-uucp-$(VERSION).tar.Z
	mkdir uucp-$(VERSION)
	ln `cat MANIFEST` uucp-$(VERSION)
	rm -f uucp-$(VERSION)/policy.h uucp-$(VERSION)/Makefile.in
	cp policy.h Makefile.in uucp-$(VERSION)
	chmod 0644 uucp-$(VERSION)/policy.h uucp-$(VERSION)/Makefile.in
	mkdir uucp-$(VERSION)/contrib
	ln contrib/* uucp-$(VERSION)/contrib
	tar -cvf taylor-uucp-$(VERSION).tar uucp-$(VERSION)
	compress taylor-uucp-$(VERSION).tar

uucp.info: uucp.texi
	makeinfo uucp.texi

conf.h-dist: conf.h
	cp conf.h conf.h-dist

# conf.h Makefile: configure
#	configure

Makefile: Makefile.in

# configure: configure.in
# 	autoconf

# GNU standards want these targets

distclean: clean
realclean: clean

TAGS:
	etags *.h *.c

# Header file depedencies.  These are maintained by hand.

uucico.o: uucp.h conf.h policy.h system.h prot.h port.h sysdep.h uutime.h
uucico.o: getopt.h
uuxqt.o: uucp.h conf.h policy.h system.h getopt.h sysdep.h
uux.o: uucp.h conf.h policy.h system.h getopt.h sysdep.h
uucp.o: uucp.h conf.h policy.h system.h getopt.h sysdep.h
uuchk.o: uucp.h conf.h policy.h port.h sysdep.h system.h uutime.h getopt.h
uustat.o: uucp.h conf.h policy.h system.h sysdep.h getopt.h
uuname.o: uucp.h conf.h policy.h system.h sysdep.h getopt.h
uulog.o: uucp.h conf.h policy.h system.h sysdep.h getopt.h
tstuu.o: uucp.h conf.h policy.h sysdep.h getopt.h
uudir.o: uucp.h conf.h policy.h sysdep.h
prot.o: uucp.h conf.h policy.h system.h prot.h port.h sysdep.h
protg.o: uucp.h conf.h policy.h system.h prot.h port.h sysdep.h
protf.o: uucp.h conf.h policy.h prot.h port.h sysdep.h system.h
prott.o: uucp.h conf.h policy.h prot.h port.h sysdep.h system.h
prote.o: uucp.h conf.h policy.h prot.h port.h sysdep.h system.h
protz.o: uucp.h conf.h policy.h prot.h port.h sysdep.h system.h
config.o: uucp.h conf.h policy.h system.h sysdep.h
v2.o: uucp.h conf.h policy.h port.h sysdep.h
bnu.o: uucp.h conf.h policy.h port.h sysdep.h
file.o: uucp.h conf.h policy.h system.h
util.o: uucp.h conf.h policy.h
sysinf.o: uucp.h conf.h policy.h system.h port.h sysdep.h uutime.h
time.o: uucp.h conf.h policy.h uutime.h
log.o: uucp.h conf.h policy.h system.h
chat.o: uucp.h conf.h policy.h system.h port.h sysdep.h
port.o: uucp.h conf.h policy.h port.h sysdep.h
tcp.o: uucp.h conf.h policy.h port.h sysdep.h system.h
prtinf.o: uucp.h conf.h policy.h port.h sysdep.h
parse.o: uucp.h conf.h policy.h
copy.o: uucp.h conf.h policy.h system.h sysdep.h
sys1.o: uucp.h conf.h policy.h system.h sysdep.h
sys2.o: uucp.h conf.h policy.h system.h port.h sysdep.h
sys3.o: uucp.h conf.h policy.h system.h sysdep.h
sys4.o: uucp.h conf.h policy.h system.h sysdep.h
sys5.o: uucp.h conf.h policy.h system.h sysdep.h
sys6.o: uucp.h conf.h policy.h system.h sysdep.h
sys7.o: uucp.h conf.h policy.h system.h sysdep.h
version.o: uucp.h conf.h policy.h
getopt.o: getopt.h
alloca.o: uucp.h conf.h policy.h
