1# Automake source file for the Parma Polyhedra Library. 2# Copyright (C) 2001-2010 Roberto Bagnara <bagnara@cs.unipr.it> 3# Copyright (C) 2010-2016 BUGSENG srl (http://bugseng.com) 4# 5# This file is part of the Parma Polyhedra Library (PPL). 6# 7# The PPL is free software; you can redistribute it and/or modify it 8# under the terms of the GNU General Public License as published by the 9# Free Software Foundation; either version 3 of the License, or (at your 10# option) any later version. 11# 12# The PPL is distributed in the hope that it will be useful, but WITHOUT 13# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15# for more details. 16# 17# You should have received a copy of the GNU General Public License 18# along with this program; if not, write to the Free Software Foundation, 19# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA. 20# 21# For the most up-to-date information see the Parma Polyhedra Library 22# site: http://bugseng.com/products/ppl/ . 23 24if VALGRIND_TESTS_ENABLED 25 26CHECKER = \ 27$(VALGRIND) --tool=memcheck -q --trace-children=yes --leak-check=yes \ 28--num-callers=40 --leak-resolution=high \ 29--suppressions=$(top_srcdir)/tests/valgrind_suppressions 30 31else !VALGRIND_TESTS_ENABLED 32 33CHECKER = 34 35endif !VALGRIND_TESTS_ENABLED 36 37TESTS_ENVIRONMENT = $(CHECKER) 38 39AM_CPPFLAGS = \ 40-I$(top_builddir)/interfaces/C \ 41@extra_includes@ \ 42@debug_flag@ 43 44if GCC 45 46if HOST_OS_MINGW 47 48# MinGW's <stdlib.h> cannot be compiled in c89 mode. 49AM_CFLAGS = -pedantic -std=gnu89 50 51else !HOST_OS_MINGW 52 53if ICC 54 55AM_CFLAGS = -std=c89 56 57else !ICC 58 59AM_CFLAGS = -pedantic -std=c89 60 61endif !ICC 62 63endif !HOST_OS_MINGW 64 65endif GCC 66 67check_LIBRARIES = libppl_c_tests.a 68 69libppl_c_tests_a_SOURCES = \ 70ppl_c_test.cc 71 72# Dummy C++ source to cause C++ linking. 73nodist_EXTRA_libppl_c_tests_a_SOURCES = \ 74dummy.cc 75 76libppl_c_tests_a_CPPFLAGS = \ 77-I$(top_builddir)/interfaces/C \ 78@extra_includes@ 79 80LDADD = \ 81libppl_c_tests.a \ 82$(top_builddir)/interfaces/C/libppl_c.la \ 83@extra_libraries@ 84 85TESTS = \ 86formatted_output \ 87pip_test \ 88watchdog1 \ 89weightwatch1 90 91 92# 93# Sources for the tests 94# 95 96formatted_output_SOURCES = \ 97formatted_output.c \ 98print_to_buffer.h \ 99print_to_buffer.c 100 101# Dummy C++ source to cause C++ linking. 102# FIXME: why isn't enough to do this for libppl_c_tests.a? 103nodist_EXTRA_formatted_output_SOURCES = \ 104dummy.cc 105 106pip_test_SOURCES = \ 107pip_test.c 108 109# Dummy C++ source to cause C++ linking. 110# FIXME: why isn't enough to do this for libppl_c_tests.a? 111nodist_EXTRA_pip_test_SOURCES = \ 112dummy.cc 113 114watchdog1_SOURCES = \ 115watchdog1.c 116 117# Dummy C++ source to cause C++ linking. 118# FIXME: why isn't enough to do this for libppl_c_tests.a? 119nodist_EXTRA_watchdog1_SOURCES = \ 120dummy.cc 121 122weightwatch1_SOURCES = \ 123weightwatch1.c 124 125# Dummy C++ source to cause C++ linking. 126# FIXME: why isn't enough to do this for libppl_c_tests.a? 127nodist_EXTRA_weightwatch1_SOURCES = \ 128dummy.cc 129 130 131noinst_HEADERS = \ 132ppl_c_test.h 133 134XFAIL_TESTS = 135 136check_PROGRAMS = $(TESTS) $(BUGS) 137 138BUGS = 139 140$(top_builddir)/interfaces/C/libppl_c.la: 141 $(MAKE) $(AM_MAKEFLAGS) -C $(top_builddir)/interfaces/C libppl_c.la 142