-## -*-makefile-*-
-##
-## $Id$
-##
-## Makefile for TrIPE server
-##
-## (c) 2001 Straylight/Edgeware
-##
-
-##----- Licensing notice ----------------------------------------------------
-##
-## This file is part of Trivial IP Encryption (TrIPE).
-##
-## TrIPE is free software; you can redistribute it and/or modify
-## it 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 version.
-##
-## TrIPE is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with TrIPE; if not, write to the Free Software Foundation,
-## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-AUTOMAKE_OPTIONS = foreign
-INCLUDES = -I$(top_srcdir)/common -I$(top_builddir)/common
-LDADD = ../common/libtripe.a $(catacomb_LIBS)
-configdir = @configdir@
-tun = @tun@
-
-sbin_PROGRAMS = tripe
-
-tripe_SOURCES = \
- tripe.h \
- servutil.c \
- tripe.c admin.c peer.c keymgmt.c keyexch.c keyset.c chal.c \
- tun-unet.c tun-bsd.c tun-linux.c tun-slip.c
-
-##----- That's all, folks ---------------------------------------------------
+### -*-makefile-*-
+###
+### Makefile for TrIPE server
+###
+### (c) 2001 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Trivial IP Encryption (TrIPE).
+###
+### TrIPE is free software: you can redistribute it and/or modify it under
+### the terms of the GNU General Public License as published by the Free
+### Software Foundation; either version 3 of the License, or (at your
+### option) any later version.
+###
+### TrIPE is distributed in the hope that it will be useful, but WITHOUT
+### ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+### FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+### for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with TrIPE. If not, see <https://www.gnu.org/licenses/>.
+
+include $(top_srcdir)/vars.am
+
+sbin_PROGRAMS =
+noinst_LIBRARIES =
+noinst_PROGRAMS =
+man_MANS =
+
+LDADD = $(libcommon) $(libpriv) \
+ $(catacomb_LIBS) $(ADNS_LIBS)
+
+###--------------------------------------------------------------------------
+### The main server.
+
+## Build a library, for special effects.
+noinst_LIBRARIES += libtripe.a
+libtripe_a_SOURCES =
+
+## Main header file.
+libtripe_a_SOURCES += tripe.h
+
+## Main sources.
+libtripe_a_SOURCES += servutil.c
+libtripe_a_SOURCES += addrmap.c
+libtripe_a_SOURCES += keymgmt.c
+libtripe_a_SOURCES += bulkcrypto.c
+libtripe_a_SOURCES += dh.c
+libtripe_a_SOURCES += keyset.c
+libtripe_a_SOURCES += keyexch.c
+libtripe_a_SOURCES += chal.c
+libtripe_a_SOURCES += peer.c
+libtripe_a_SOURCES += privsep.c
+libtripe_a_SOURCES += admin.c
+libtripe_a_SOURCES += tripe.c
+
+## Tunnel drivers.
+libtripe_a_SOURCES += tun-std.c
+libtripe_a_SOURCES += tun-slip.c
+
+## The main server.
+sbin_PROGRAMS += tripe
+tripe_SOURCES = standalone.c
+tripe_LDADD = libtripe.a $(LDADD)
+
+## Server manual page.
+man_MANS += tripe.8tripe
+CLEANFILES += tripe.8tripe
+EXTRA_DIST += tripe.8.in
+
+## The admin protocol manual page.
+man_MANS += tripe-admin.5tripe
+CLEANFILES += tripe-admin.5tripe
+EXTRA_DIST += tripe-admin.5.in
+
+## Services manual page.
+man_MANS += tripe-service.7tripe
+CLEANFILES += tripe-service.7tripe
+EXTRA_DIST += tripe-service.7.in
+
+###--------------------------------------------------------------------------
+### Unit-test program.
+
+noinst_PROGRAMS += tripe-test
+tripe_test_SOURCES = test.c
+tripe_test_LDADD = libtripe.a $(LDADD)
+
+###----- That's all, folks --------------------------------------------------