#
# Makefile file for TSLIP
#

# NOTE: You must first build Taylor UUCP 1.04 (with the patches in
# PATCHES_TO_STOCK_TAYLOR1.04).  Several .o and .a files built in the
# Taylor source tree are linked into the slip dialing daemon (see util/slipd).


# Set "prefix" to the root directory for "lib", "bin", "man", etc. where you
# stuff installed.
#prefix = /usr/local
prefix = /local

# Set taylorsrc to the root of the Taylor UUCP 1.04 source tree.
taylorsrc=../uucp-1.04-w-tslip-patch

# Owner of suid uucp programs
owner = uucp

CC = cc
CFLAGS = -O
RANLIB = @:
LIBS =  -lsocket -lnsl
INSTALL = /usr/ucb/install -c

######## END OF CONFIGURATION SECTION ##########

sbindir = $(prefix)/lib/uucp
bindir = $(prefix)/bin

MDEFINES=bindir=$(bindir) sbindir=$(sbindir) taylorsrc=$(taylorsrc)

MDEFINES = CC='$(CC)' CFLAGS='$(CFLAGS)' RANLIB='$(RANLIB)' owner='$(owner)' bindir='$(bindir)' sbindir='$(sbindir)'

all:
	cd $(taylorsrc); $(MAKE)
	cd driver/io; $(MAKE) $(MDEFINES) all
	taylorsrc=`(cd $(taylorsrc);pwd)`; \
	 cd utils; $(MAKE) $(MDEFINES) taylorsrc=$$taylorsrc all
	cd dialin;  $(MAKE) $(MDEFINES) all

install:
	cd driver/io; $(MAKE) $(MDEFINES) install
	taylorsrc=`(cd $(taylorsrc);pwd)`; \
	 cd utils; $(MAKE) $(MDEFINES) taylorsrc=$$taylorsrc install
	cd dialin;  $(MAKE) $(MDEFINES) install

clean:
	cd driver/io; $(MAKE) $(MDEFINES) clean
	cd utils;     $(MAKE) $(MDEFINES) clean
	cd dialin;  $(MAKE) $(MDEFINES) clean
