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     SecurityHelperTest.h \
27     SignatureTest.h
28 else
29 xmlsec_sources =
30 endif
31
32 xmltoolingtest_h = \
33     ComplexXMLObjectTest.h \
34     ExceptionTest.h \
35     KeyInfoTest.h \
36     MarshallingTest.h \
37     UnmarshallingTest.h \
38     TemplateEngineTest.h \
39     xmltoolingtest.h \
40     ${xmlsec_sources}
41
42 noinst_HEADERS = \
43     XMLObjectBaseTestCase.h
44
45 nodist_xmltoolingtest_SOURCES = $(xmltoolingtest_h:.h=.cpp)
46
47 CLEANFILES = $(nodist_xmltoolingtest_SOURCES)
48
49 do-cxxtestgen:
50         if test $(HFILE) = "xmltoolingtest.h"; then \
51                 $(CXXTEST) --error-printer --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \
52         else \
53                 $(CXXTEST) --part --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \
54         fi;
55
56 $(nodist_xmltoolingtest_SOURCES): %.cpp: %.h
57         $(MAKE) do-cxxtestgen HFILE=$< CPPFILE=$@
58
59 EXTRA_DIST = xmltoolingtest.vcproj $(xmltoolingtest_h) data