xref: /netbsd-src/external/lgpl3/gmp/dist/tests/cxx/Makefile.am (revision 72c7faa4dbb41dbb0238d6b4a109da0d4b236dd4)
1## Process this file with automake to generate Makefile.in
2
3# Copyright 2001-2004 Free Software Foundation, Inc.
4#
5# This file is part of the GNU MP Library test suite.
6#
7# The GNU MP Library test suite is free software; you can redistribute it
8# and/or modify it under the terms of the GNU General Public License as
9# published by the Free Software Foundation; either version 3 of the License,
10# or (at your option) any later version.
11#
12# The GNU MP Library test suite is distributed in the hope that it will be
13# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
15# Public License for more details.
16#
17# You should have received a copy of the GNU General Public License along with
18# the GNU MP Library test suite.  If not, see https://www.gnu.org/licenses/.
19
20
21# LDADD has an explicit -L of $(top_builddir)/.libs for the benefit of gcc
22# 3.2 on itanium2-hp-hpux11.22.  Without this option, the libgmp.sl.6
23# required by libgmpxx.sl (ie. in its NEEDED records) is not found by the
24# linker.  FIXME: Presumably libtool should do something about this itself.
25# -lm is needed for t-ops2 which compares the results of trunc and mpf_trunc.
26#
27AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests
28AM_LDFLAGS = -no-install
29LDADD = -L$(top_builddir)/.libs \
30  $(top_builddir)/tests/libtests.la \
31  $(top_builddir)/libgmpxx.la \
32  $(top_builddir)/libgmp.la \
33  -lm
34
35if WANT_CXX
36check_PROGRAMS = t-binary t-cast t-cxx11 \
37  t-headers t-iostream t-istream t-locale t-misc t-mix \
38  t-ops t-ops2qf t-ops2f t-ops3 t-ostream t-prec \
39  t-ternary t-unary \
40  t-do-exceptions-work-at-all-with-this-compiler \
41  t-ops2z t-assign t-constr t-rand
42
43TESTS = $(check_PROGRAMS)
44endif
45
46EXTRA_DIST = t-ops2.h
47
48t_assign_SOURCES  = t-assign.cc
49t_binary_SOURCES  = t-binary.cc
50t_cast_SOURCES    = t-cast.cc
51t_constr_SOURCES  = t-constr.cc
52t_cxx11_SOURCES   = t-cxx11.cc
53t_headers_SOURCES = t-headers.cc
54t_iostream_SOURCES= t-iostream.cc
55t_istream_SOURCES = t-istream.cc
56t_locale_SOURCES  = t-locale.cc clocale.c
57t_misc_SOURCES    = t-misc.cc
58t_mix_SOURCES     = t-mix.cc
59t_ops_SOURCES     = t-ops.cc
60t_ops2z_SOURCES   = t-ops2z.cc
61t_ops2qf_SOURCES  = t-ops2qf.cc
62t_ops2f_SOURCES   = t-ops2f.cc
63t_ops3_SOURCES    = t-ops3.cc
64t_ostream_SOURCES = t-ostream.cc
65t_prec_SOURCES    = t-prec.cc
66t_rand_SOURCES    = t-rand.cc
67t_ternary_SOURCES = t-ternary.cc
68t_unary_SOURCES   = t-unary.cc
69t_do_exceptions_work_at_all_with_this_compiler_SOURCES = \
70  t-do-exceptions-work-at-all-with-this-compiler.cc
71
72$(top_builddir)/tests/libtests.la:
73	cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la
74
75
76# Libtool (1.5) somehow botches its uninstalled shared library setups on
77# OpenBSD 3.2, making the C++ test programs here fail.  libgmpxx.so ends up
78# with a NEEDED record asking for ./.libs/libgmp.so.N, but the loader can't
79# find that unless it exists in the current directory.
80#
81# FIXME: Clearly libtool ought to handle this itself, in which case the hack
82# here can be removed.
83#
84# Note this fix applies only when running "make check".  The cp here should
85# be done manually if just one program is to be built and run.
86#
87TESTS_ENVIRONMENT = cp $(top_builddir)/.libs/libgmp.so.* .libs 2>/dev/null || true;
88