# Makefile.am
#   Automake makefile for atftp
#
# $Id: Makefile.am,v 1.5 2002/03/26 02:01:21 jp Exp $
#
# Copyright (c) 2001 Jean-Pierre Lefebvre <helix@step.polymtl.ca>
#                and Remi Lefebvre <remi@debian.org>
#
# atftp is free software; you can redistribute them and/or modify them
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later

AUTOMAKE_OPTIONS = foreign
SUBDIRS          = .
DIST_SUBDIRS     = $(SUBDIRS)
CLEANFILES       = *~
DISTCLEANFILES   = libtool config.status

man_MANS         = atftp.1 atftpd.8
EXTRA_DIST       = BUGS FAQ acconfig.h $(man_MANS)

bin_PROGRAMS     = atftp
atftp_LDADD      = $(LIBTERMCAP) $(LIBREADLINE)
atftp_SOURCES    = tftp.c tftp_io.c logger.c options.c tftp_def.c tftp_file.c

sbin_PROGRAMS    = atftpd
atftpd_LDADD     = $(LIBPTHREAD) $(LIBWRAP)
atftpd_SOURCES   = tftpd.c logger.c options.c stats.c tftp_io.c tftp_def.c \
                   tftpd_file.c tftpd_list.c tftpd_mcast.c

install-exec-hook:
	(cd $(sbindir); ln -s atftpd in.tftpd)

install-data-local:
	(cd $(mandir)/man8; ln -s atftpd.8 in.tftpd.8)

uninstall-local:
	rm -f $(sbindir)/in.tftpd $(mandir)/man8/in.tftpd.8
