Multi-line svn commit, see body.
[shibboleth/cpp-xmltooling.git] / xmltoolingtest / Makefile.am
1 AUTOMAKE_OPTIONS = foreign
2
3 if BUILD_UNITTEST
4
5 bin_PROGRAMS = xmltoolingtest
6 xmltoolingtest_CXXFLAGS = $(CXXTESTFLAGS)
7 if BUILD_XMLSEC
8 xmltoolingtest_LDFLAGS = $(XMLSEC_LIBS)
9 xmltoolingtest_LDADD = $(top_builddir)/xmltooling/libxmltooling.la
10 else
11 xmltoolingtest_LDADD = $(top_builddir)/xmltooling/libxmltooling-lite.la
12 endif
13
14 else
15
16 bin_PROGRAMS = 
17
18 endif
19
20 if BUILD_XMLSEC
21 xmlsec_sources = \
22     EncryptionTest.h \
23     FilesystemCredentialResolverTest.h \
24     InlineKeyResolverTest.h \
25     MemoryStorageServiceTest.h \
26     SignatureTest.h
27 else
28 xmlsec_sources =
29 endif
30
31 xmltoolingtest_h = \
32     ComplexXMLObjectTest.h \
33     ExceptionTest.h \
34     KeyInfoTest.h \
35     MarshallingTest.h \
36     UnmarshallingTest.h \
37     TemplateEngineTest.h \
38     xmltoolingtest.h \
39     ${xmlsec_sources}
40
41 noinst_HEADERS = \
42     XMLObjectBaseTestCase.h
43
44 nodist_xmltoolingtest_SOURCES = $(xmltoolingtest_h:.h=.cpp)
45
46 CLEANFILES = $(nodist_xmltoolingtest_SOURCES)
47
48 do-cxxtestgen:
49         if test $(HFILE) = "xmltoolingtest.h"; then \
50                 $(CXXTEST) --error-printer --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \
51         else \
52                 $(CXXTEST) --part --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \
53         fi;
54
55 $(nodist_xmltoolingtest_SOURCES): %.cpp: %.h
56         $(MAKE) do-cxxtestgen HFILE=$< CPPFILE=$@
57
58 EXTRA_DIST = xmltoolingtest.vcproj $(xmltoolingtest_h) data