Unix build fixes
[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 xmltoolingtest_h = \
11         xmltoolingtest.h \
12         MarshallingTest.h \
13         UnknownTest.h \
14         UnmarshallingTest.h
15
16 noinst_HEADERS = \
17         XMLObjectBaseTestCase.h
18
19 nodist_xmltoolingtest_SOURCES = $(xmltoolingtest_h:.h=.cpp)
20
21 CLEANFILES = $(nodist_xmltoolingtest_SOURCES)
22
23 do-cxxtestgen:
24         if test $(HFILE) = "xmltoolingtest.h"; then \
25                 $(CXXTEST) --error-printer --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \
26         else \
27                 $(CXXTEST) --part --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \
28         fi;
29
30 $(nodist_xmltoolingtest_SOURCES): %.cpp: %.h
31         $(MAKE) do-cxxtestgen HFILE=$< CPPFILE=$@
32
33 xmltoolingtest_LDADD = $(top_builddir)/xmltooling/libxmltooling.la
34
35 EXTRA_DIST = xmltoolingtest.vcproj $(xmltoolingtest_h) data