OSDN Git Service

Added AM_PROG_AR
[ccunit/ccunit.git] / tests / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 ##    Copyright (C) 2003, 2010 TSUTSUMI Kikuo.
3 ##    This file is part of the CCUnit Library.
4
5 ##    The CCUnit Library is free software; you can redistribute it and/or
6 ##    modify it under the terms of the GNU Lesser General Public License
7 ##    as published by the Free Software Foundation; either version 2.1 of
8 ##    the License, or (at your option) any later version.
9
10 ##    The CCUnit Library is distributed in the hope that it will be
11 ##    useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12 ##    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 ##    GNU Lesser General Public License for more details.
14
15 ##    You should have received a copy of the GNU Lesser General Public
16 ##    License along with the CCUnit Library; see the file COPYING.LESSER.
17 ##    If not, write to the Free Software Foundation, Inc., 59 Temple
18 ##    Place - Suite 330, Boston, MA 02111-1307, USA.  
19
20 # $Id$
21
22 check_PROGRAMS = runSuccess runFailure
23 runSuccess_SOURCES = runSuccess.c $(TESTSRCS)
24 runFailure_SOURCES = runFailure.c $(FAILSRCS)
25 nodist_runSuccess_SOURCES = suiteSuccess.c 
26 nodist_runFailure_SOURCES = suiteAssert.c
27 runSuccess_DEPENDENCIES = $(top_builddir)/src/ccunit/libccunit.la
28 runFailure_DEPENDENCIES = $(top_builddir)/src/ccunit/libccunit.la
29
30 ## ls -1 test*.c | sed -e 's/^\(.*\)$/  \1 \\/' -e '$s/ \\$//'
31 TESTSRCS= \
32         $(top_srcdir)/tests/testAssert.c \
33         $(top_srcdir)/tests/testReadSuite.c \
34         $(top_srcdir)/tests/testSuite.c \
35         $(top_srcdir)/tests/testSetup.c
36
37 ## ls -1 fail*.c | sed -e 's/^\(.*\)$/  \1 \\/' -e '$s/ \\$//'
38 FAILSRCS= \
39         $(top_srcdir)/tests/failAssert.c
40
41 runSuccess_LDADD = -lccunit
42 runFailure_LDADD = -lccunit
43
44 EXTRA_DIST=
45
46 AM_CPPFLAGS=-I$(top_srcdir)/src -I$(top_builddir)/src
47 AM_CFLAGS=-Wall -Werror
48 AM_LDFLAGS=-L$(top_builddir)/src/ccunit
49
50 TESTS = runSuccess $(XFAIL_TESTS)
51 XFAIL_TESTS = runFailure
52
53 CLEANFILES=*~ .*~ ./\#*\# *.log suiteSuccess.c suiteAssert.c
54
55 MAKESUITE = PATH="$(top_builddir)/src/tools:$$PATH" ccunit_makeSuite
56
57 suiteSuccess.c: $(TESTSRCS)
58         $(MAKESUITE) -o $@ $(TESTSRCS)
59
60 suiteAssert.c: $(FAILSRCS)
61         $(MAKESUITE) -o $@ -f failAssert_suite $(FAILSRCS)