First check-in of gedcom object model.
[gedcom-parse.git] / t / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 # $Id$
3 # $Name$
4
5 SUBDIRS=input
6 INCLUDES = -DPKGDATADIR=\"$(pkgdatadir)\" -I $(srcdir)/../include
7 CFLAGS   = -g -O2
8
9 noinst_PROGRAMS = testgedcom pathtest gomtest @EXTRA_PROGS@
10 EXTRA_PROGRAMS  = gomtest_static
11
12 testgedcom_SOURCES = standalone.c utf8-locale.c
13 noinst_HEADERS     = utf8-locale.h
14 testgedcom_LDFLAGS = -L ../gedcom/.libs -lgedcom
15 testgedcom_LDADD  = @INTLLIBS@
16
17 pathtest_SOURCES = pathtest.c
18 pathtest_LDFLAGS = -L ../gedcom/.libs -lgedcom
19
20 gomtest_SOURCES = gomtest.c
21 gomtest_LDFLAGS = -L ../gedcom/.libs -L ../gom/.libs -lgedcom_gom -lgedcom
22
23 gomtest_static_SOURCES = gomtest.c
24 gomtest_static_LDADD = ../gedcom/.libs/libgedcom.a ../gom/.libs/libgedcom_gom.a
25
26 TEST_SCRIPT=test_script test_gom test_gom_static
27 TESTS := $(wildcard $(srcdir)/*.test)
28
29 EXTRA_DIST=$(TEST_SCRIPT) $(TESTS)
30
31 all-local:
32         @rm -f testgedcom.out dmalloc.log
33
34 check-% :       %.test all-local
35         @srcdir=$(srcdir); export srcdir; \
36         if $(TESTS_ENVIRONMENT) ./$<; then \
37           echo "Test succeeded"; \
38         else \
39           echo "Test failed"; \
40         fi
41
42 check-dmalloc-%:        %.test all-local
43         @if [ "@EXTRA_PROGS@" = "" ]; then \
44           echo "Please run './configure --with-dmalloc' first"; \
45           exit; \
46         fi; \
47         srcdir=$(srcdir); export srcdir; \
48         GOM_DMALLOC_TEST=1; export GOM_DMALLOC_TEST; \
49         if $(TESTS_ENVIRONMENT) ./$<; then \
50           echo "Test succeeded"; \
51         else \
52           echo "Test failed"; \
53         fi
54