d8cd904967176a9ba4f964e7ab6fcd7885476bf5
[shibboleth/cpp-xmltooling.git] / xmltoolingtest / Makefile.am
1 AUTOMAKE_OPTIONS = foreign
2
3 if BUILD_UNITTEST
4 bin_PROGRAMS = xmltoolingtest
5 xmltoolingtest_CXXFLAGS = $(CXXFLAGS) $(CXXTESTFLAGS)
6 else
7 bin_PROGRAMS = 
8 endif
9
10 if BUILD_XMLSEC
11 xmlsec_sources = \
12     SignatureTest.h
13 else
14 xmlsec_sources =
15 endif
16
17 xmltoolingtest_h = \
18     ComplexXMLObjectTest.h \
19     ExceptionTest.h \
20     KeyInfoTest.h \
21     MarshallingTest.h \
22     UnmarshallingTest.h \
23     xmltoolingtest.h \
24     ${xmlsec_sources}
25
26 noinst_HEADERS = \
27     XMLObjectBaseTestCase.h
28
29 nodist_xmltoolingtest_SOURCES = $(xmltoolingtest_h:.h=.cpp)
30
31 CLEANFILES = $(nodist_xmltoolingtest_SOURCES)
32
33 do-cxxtestgen:
34         if test $(HFILE) = "xmltoolingtest.h"; then \
35                 $(CXXTEST) --error-printer --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \
36         else \
37                 $(CXXTEST) --part --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \
38         fi;
39
40 $(nodist_xmltoolingtest_SOURCES): %.cpp: %.h
41         $(MAKE) do-cxxtestgen HFILE=$< CPPFILE=$@
42
43 xmltoolingtest_LDADD = $(top_builddir)/xmltooling/libxmltooling.la
44
45 EXTRA_DIST = xmltoolingtest.vcproj $(xmltoolingtest_h) data