OSDN Git Service

(no commit message)
[ccunit/ccunit.git] / tests / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 #    Copyright (C) 2003 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 
24 runFailure_SOURCES = runFailure.c
25 BUILT_SOURCES = suiteSuccess.c $(TESTSRCS) suiteFailure.c $(FAILSRCS)
26
27 TESTSRCS=test*.c
28 TESTOBJS=$(TESTSRCS:%.c=%.o)
29 runSuccess_LDADD = suiteSuccess.o $(TESTOBJS) -lccunit
30 runSuccess_DEPENDENCIES = suiteSuccess.o $(TESTOBJS)
31
32 FAILSRCS=fail*.c
33 FAILOBJS=$(FAILSRCS:%.c=%.o)
34 runFailure_LDADD = suiteFailure.o $(FAILOBJS) -lccunit
35 runFailure_DEPENDENCIES = suiteFailure.o $(FAILOBJS)
36
37 AM_CPPFLAGS=-I$(top_srcdir)/src
38 AM_CFLAGS=-ggdb -Wall -Werror
39 AM_LDFLAGS=-L$(top_srcdir)/src/ccunit
40
41 TESTS = ./runSuccess ./runFailure
42
43 $(TESTOBJS): $(TESTSRCS)
44         $(COMPILE) -c $+
45
46 $(FAILOBJS): $(FAILSRCS)
47         $(COMPILE) -c $+
48
49 CLEANFILES=*~ *.log makeSuite.c
50
51 MAKETEST=$(top_srcdir)/src/tools/ccunit_makeTest
52
53 suiteSuccess.c suiteFailure:: $(MAKETEST)
54 suiteSuccess.c:: test*.c
55         $(MAKETEST) -o $@ -v $+ /dev/null
56 suiteFailure.c:: fail*.c
57         $(MAKETEST) -o $@ -v $+ /dev/null