##
## settings
##
prefix=@prefix@
exec_prefix=@exec_prefix@
sbindir=@sbindir@
bindir=@bindir@
mandir=@mandir@

##
## autoconf
##
CPP=@CPP@
CXXCPP=@CXXCPP@
CC=@CC@
CXX=@CXX@
DEFS=-D_USAGI -DINET6 @DEFS@
CFLAGS=@CFLAGS@ $(DEFS)
CXXFLAGS=@CXXFLAGS@ $(DEFS)

OBJS=
LIBOBJS=@LIBOBJS@
LDFLASG=@LDFLAGS@
LIBS=@LIBS@

INSTALL=@INSTALL@
INSTALL_PROG=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
INSTALL_DIR=@INSTALL_DIR@

LN_S=@LN_S@

##
## targets
##
TARGET = talkd

all:	$(TARGET)

clean:
	-rm -f *.o $(TARGET)
distclean: clean
	-rm -f config.*
	-rm -f Makefile

install: all
	$(INSTALL_DIR) $(sbindir)
	$(INSTALL_PROG) -s talkd $(sbindir)/in.ntalkd
	$(LN_S) -f in.ntalkd $(sbindir)/in.talkd
	$(INSTALL_DIR) $(mandir)/man8
	$(INSTALL_DATA) talkd.8 $(mandir)/man8/in.ntalkd.8
	$(LN_S) -f in.ntalkd.8 $(mandir)/man8/ntalkd
	$(LN_S) -f in.ntalkd.8 $(mandir)/man8/in.talkd.8
	$(LN_S) -f in.talkd.8 $(mandir)/man8/talkd.8

##
## dependencies
##
talkd: talkd.o \
	announce.o process.o table.o print.o repairs.o \
	talkaddr.o ctlmsg.o
	$(CC) $(LDFLAGS) $^ $(LIBS) -o $@

