--- /dev/null
+#
+# Makefile.ad
+#
+# Author: Pekka Riikonen <priikone@silcnet.org>
+#
+# Copyright (C) 2000 - 2005 Pekka Riikonen
+#
+# This program 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; version 2 of the License.
+#
+# This program 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.
+#
+
+AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
+
+if SILC_MP_NSS_MPI
+SUBDIRS = mpi
+else
+SUBDIRS =
+endif
+
+DIST_SUBDIRS = mpi
+
+noinst_LTLIBRARIES = libsilcmath.la
+
+if SILC_MP_NSS_MPI
+MP_SOURCE = mp_mpi.c
+else
+MP_SOURCE = mp_gmp.c
+endif
+
+libsilcmath_la_SOURCES = \
+ silcprimegen.c \
+ modinv.c \
+ mpbin.c \
+ $(MP_SOURCE)
+
+#ifdef SILC_DIST_TOOLKIT
+MP_HEADER = mpi/mpi.h mpi/mplogic.h mpi/mpi-config.h
+include_HEADERS = \
+ mp_gmp.h \
+ mp_mpi.h \
+ silcmath.h \
+ silcmp.h \
+ $(MP_HEADER)
+#endif SILC_DIST_TOOLKIT
+
+EXTRA_DIST = mp_gmp.c mp_mpi.c *.h
+
+include $(top_srcdir)/Makefile.defines.in