INSDIR = /lib
LOGINSDIR = /bin
TESTDIR = .
FRC =
OBJECTS = \
	accreat.o crc.o enter.o errors.o fini_remote.o finish.o \
	fquit.o get.o getblk.o getline.o getreply.o help.o \
	init_remote.o inlist.o lflush.o log.o main.o mesgs.o okuse.o \
	put.o putblk.o receive.o rep.o rproto.o send.o \
	sentinel.o set_rate.o sh.o sync.o transfer.o tread.o \
	tty.o xproto.o
CFLAGS = -O
LDFLAGS = -s -n

.s.o:
	-as - -o $@ $*.s

all:	log

log:	$(OBJECTS)
	$(CC) $(LDFLAGS) -o $(TESTDIR)/log $(OBJECTS)

accreat.o:	log.h access.h proto.h bytes.h $(FRC)
crc.o:		proto.h bytes.h list.h $(FRC)
enter.o:	proto.h list.h $(FRC)
errors.o:	err.h $(FRC)
fini_remote.o:	log.h $(FRC)
finish.o:	log.h $(FRC)
fquit.o:	log.h quit.h $(FRC)
get.o:		log.h $(FRC)
getblk.o:	log.h proto.h bytes.h rep.h err.h timeouts.h $(FRC)
getline.o:	log.h $(FRC)
getreply.o:	proto.h list.h err.h bytes.h timeouts.h $(FRC)
help.o:		log.h $(FRC)
init_remote.o:	log.h proto.h timeouts.h $(FRC)
inlist.o:	proto.h list.h $(FRC)
lflush.o:	log.h timeouts.h $(FRC)
log.o:		log.h quit.h access.h $(FRC)
main.o:		log.h proto.h bytes.h $(FRC)
mesgs.o:	bytes.h $(FRC)
okuse.o:	$(FRC)
put.o:		log.h access.h proto.h $(FRC)
putblk.o:	log.h proto.h jmp.h list.h err.h $(FRC)
receive.o:	log.h proto.h bytes.h $(FRC)
rep.o:		proto.h $(FRC)
rproto.o:	log.h proto.h err.h bytes.h rep.h list.h $(FRC)
send.o:		timeouts.h access.h proto.h bytes.h $(FRC)
sentinel.o:	timeouts.h $(FRC)
set_rate.o:	log.h $(FRC)
sh.o:		log.h $(FRC)
sync.o:		log.h timeouts.h proto.h bytes.h $(FRC)
transfer.o:	log.h $(FRC)
tread.o:	timeouts.h $(FRC)
tty.o:		log.h quit.h $(FRC)
xproto.o:	log.h bytes.h proto.h err.h list.h jmp.h $(FRC)

install:	all
	-chmod 700 $(INSDIR)/send
	-$(INSDIR)/send
	-rm -f $(LOGINSDIR)/log $(INSDIR)/send $(INSDIR)/receive
	cp $(TESTDIR)/log $(INSDIR)/send
	ln $(INSDIR)/send $(INSDIR)/receive
	ln $(INSDIR)/send $(LOGINSDIR)/log
	chmod 5701 $(INSDIR)/send
	ls -l $(INSDIR)/send

clean:
	-rm -f *.o

clobber:	clean
	-rm -f $(TESTDIR)/log

FRC:
